pkgsrc/multimedia/kmplayer-kde3/patches/patch-src_xineplayer_cpp
dholland 749bbcbef8 Previous wasn't complete (cost of cutting corners when build and commit
hosts aren't the same...)

More xine fixes; the ones to cope with xine_event_t member reordering
are obvious. The others are cribbed from the kdemultimedia3 xine patch
and I have no idea if they'll actually work.

Package now builds, at least for me.
2012-04-15 22:18:38 +00:00

124 lines
5.9 KiB
Text

$NetBSD: patch-src_xineplayer_cpp,v 1.2 2012/04/15 22:18:38 dholland Exp $
Fix build with xine-lib 1.2.x.
The vo_port bits are cribbed from the kdemultimedia3 patch.
--- src/xineplayer.cpp.orig 2007-12-21 21:51:44.000000000 +0000
+++ src/xineplayer.cpp
@@ -528,7 +528,7 @@ void KXinePlayer::play (int repeat) {
xine_event_create_listener_thread (event_queue, event_listener, NULL);
if (mrl == "cdda:/") {
int nr;
- char ** mrls = xine_get_autoplay_mrls (xine, "CD", &nr);
+ const char *const * mrls = xine_get_autoplay_mrls (xine, "CD", &nr);
running = 1;
for (int i = 0; i < nr; i++) {
QString m (mrls[i]);
@@ -549,7 +549,7 @@ void KXinePlayer::play (int repeat) {
return;
}
- xine_gui_send_vo_data(stream, XINE_GUI_SEND_VIDEOWIN_VISIBLE, (void *) 1);
+ xine_port_send_gui_data(vo_port, XINE_GUI_SEND_VIDEOWIN_VISIBLE, (void *) 1);
running = 1;
QString mrlsetup = mrl;
@@ -860,8 +860,9 @@ protected:
mutex.lock ();
if (stream) {
xine_event_t xine_event = {
+ stream, 0L, 0,
XINE_EVENT_INPUT_PREVIOUS,
- stream, 0L, 0, { 0, 0 }
+ { 0, 0 }
};
xine_event_send (stream, &xine_event);
}
@@ -872,8 +873,9 @@ protected:
mutex.lock ();
if (stream) {
xine_event_t xine_event = {
+ stream, 0L, 0,
XINE_EVENT_INPUT_NEXT,
- stream, 0L, 0, { 0, 0 }
+ { 0, 0 }
};
xine_event_send (stream, &xine_event);
}
@@ -884,8 +886,9 @@ protected:
mutex.lock ();
if (stream) {
xine_event_t xine_event = {
+ stream, 0L, 0,
XINE_EVENT_INPUT_MENU1,
- stream, 0L, 0, { 0, 0 }
+ { 0, 0 }
};
xine_event_send (stream, &xine_event);
}
@@ -896,8 +899,9 @@ protected:
mutex.lock ();
if (stream) {
xine_event_t xine_event = {
+ stream, 0L, 0,
XINE_EVENT_INPUT_MENU3,
- stream, 0L, 0, { 0, 0 }
+ { 0, 0 }
};
xine_event_send (stream, &xine_event);
}
@@ -939,7 +943,7 @@ protected:
if(xevent.xexpose.count != 0 || !stream || xevent.xexpose.window != wid)
break;
mutex.lock ();
- xine_gui_send_vo_data(stream, XINE_GUI_SEND_EXPOSE_EVENT, &xevent);
+ xine_port_send_gui_data(vo_port, XINE_GUI_SEND_EXPOSE_EVENT, &xevent);
mutex.unlock ();
break;
@@ -967,15 +971,15 @@ protected:
if (stream) {
XMotionEvent *mev = (XMotionEvent *) &xevent;
x11_rectangle_t rect = { mev->x, mev->y, 0, 0 };
- if (xine_gui_send_vo_data (stream, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, (void*) &rect) == -1)
+ if (xine_port_send_gui_data (vo_port, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, (void*) &rect) == -1)
break;
xine_input_data_t data;
data.x = rect.x;
data.y = rect.y;
data.button = 0;
xine_event_t xine_event = {
- XINE_EVENT_INPUT_MOUSE_MOVE,
stream, &data, sizeof (xine_input_data_t),
+ XINE_EVENT_INPUT_MOUSE_MOVE,
{ 0 , 0 }
};
mutex.lock ();
@@ -1001,15 +1005,15 @@ protected:
fprintf(stderr, "ButtonPress\n");
XButtonEvent *bev = (XButtonEvent *) &xevent;
x11_rectangle_t rect = { bev->x, bev->y, 0, 0 };
- if (xine_gui_send_vo_data (stream, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, (void*) &rect) == -1)
+ if (xine_port_send_gui_data (vo_port, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, (void*) &rect) == -1)
break;
xine_input_data_t data;
data.x = rect.x;
data.y = rect.y;
data.button = 1;
xine_event_t xine_event = {
- XINE_EVENT_INPUT_MOUSE_BUTTON,
stream, &data, sizeof (xine_input_data_t),
+ XINE_EVENT_INPUT_MOUSE_BUTTON,
{ 0, 0 }
};
mutex.lock ();
@@ -1036,7 +1040,7 @@ protected:
}
if(xevent.type == completion_event && stream)
- xine_gui_send_vo_data(stream, XINE_GUI_SEND_COMPLETION_EVENT, &xevent);
+ xine_port_send_gui_data(vo_port, XINE_GUI_SEND_COMPLETION_EVENT, &xevent);
}
}
};