[MPlayer-dev-eng] mplayer on kfreebsd

Reinhard Tartler siretart at tauware.de
Thu Apr 22 21:50:42 CEST 2010


Hi,

while testing diego's patches for http://bugs.debian.org/578622, I've
noticed that this alone is not enough to get mplayer built on
kFreebsd/amd64. The first patch should be pretty much a no-brainer:

Index: libvo/vo_directfb2.c
===================================================================
--- libvo/vo_directfb2.c	(revision 31057)
+++ libvo/vo_directfb2.c	(working copy)
@@ -34,7 +34,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef __linux__
+#ifndef __linux__
 #include <sys/kd.h>
 #else
 #include <linux/kd.h>


The other thing I've noticed is that kfreebsd already defines a 'struct
keymap'. I therefore propose to rename the to 'struct m_keymap'

Index: libvo/video_out.c
===================================================================
--- libvo/video_out.c	(revision 31057)
+++ libvo/video_out.c	(working copy)
@@ -371,7 +371,7 @@
  * \result translation corresponding to key or "to" value of last mapping
  *         if not found.
  */
-int lookup_keymap_table(const struct keymap *map, int key) {
+int lookup_keymap_table(const struct m_keymap *map, int key) {
   while (map->from && map->from != key) map++;
   return map->to;
 }
Index: libvo/video_out.h
===================================================================
--- libvo/video_out.h	(revision 31057)
+++ libvo/video_out.h	(working copy)
@@ -269,11 +269,11 @@
 extern char *monitor_vfreq_str;
 extern char *monitor_dotclock_str;
 
-struct keymap {
+struct m_keymap {
   int from;
   int to;
 };
-int lookup_keymap_table(const struct keymap *map, int key);
+int lookup_keymap_table(const struct m_keymap *map, int key);
 struct vo_rect {
   int left, right, top, bottom, width, height;
 };
Index: libvo/vo_kva.c
===================================================================
--- libvo/vo_kva.c	(revision 31057)
+++ libvo/vo_kva.c	(working copy)
@@ -70,7 +70,7 @@
 
 #define HWNDFROMWINID(wid)    ((wid) + 0x80000000UL)
 
-static const struct keymap m_vk_map[] = {
+static const struct m_keymap m_vk_map[] = {
     {VK_NEWLINE, KEY_ENTER}, {VK_TAB, KEY_TAB}, {VK_SPACE, ' '},
 
     // control keys
@@ -92,7 +92,7 @@
     {0, 0}
 };
 
-static const struct keymap m_keypad_map[] = {
+static const struct m_keymap m_keypad_map[] = {
     // keypad keys
     {0x52, KEY_KP0}, {0x4F, KEY_KP1}, {0x50, KEY_KP2},   {0x51, KEY_KP3},
     {0x4B, KEY_KP4}, {0x4C, KEY_KP5}, {0x4D, KEY_KP6},   {0x47, KEY_KP7},
@@ -101,7 +101,7 @@
     {0, 0}
 };
 
-static const struct keymap m_mouse_map[] = {
+static const struct m_keymap m_mouse_map[] = {
     {WM_BUTTON1DOWN,   MOUSE_BTN0},
     {WM_BUTTON3DOWN,   MOUSE_BTN1},
     {WM_BUTTON2DOWN,   MOUSE_BTN2},
Index: libvo/w32_common.c
===================================================================
--- libvo/w32_common.c	(revision 31057)
+++ libvo/w32_common.c	(working copy)
@@ -60,7 +60,7 @@
 static BOOL (WINAPI* myGetMonitorInfo)(HMONITOR, LPMONITORINFO);
 static BOOL (WINAPI* myEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
 
-static const struct keymap vk_map[] = {
+static const struct m_keymap vk_map[] = {
     // special keys
     {VK_ESCAPE, KEY_ESC}, {VK_BACK, KEY_BS}, {VK_TAB, KEY_TAB}, {VK_CONTROL, KEY_CTRL},
 

OK to apply to trunk?

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



More information about the MPlayer-dev-eng mailing list