Fix support for xine 1.2 libraries

pull/1/head
Slávek Banko 12 years ago
parent 5f33750491
commit 824f886dae

@ -528,7 +528,7 @@ void KXinePlayer::play (int repeat) {
xine_event_create_listener_thread (event_queue, event_listener, NULL); xine_event_create_listener_thread (event_queue, event_listener, NULL);
if (mrl == "cdda:/") { if (mrl == "cdda:/") {
int nr; int nr;
char ** mrls = xine_get_autoplay_mrls (xine, "CD", &nr); const char * const* mrls = xine_get_autoplay_mrls (xine, "CD", &nr);
running = 1; running = 1;
for (int i = 0; i < nr; i++) { for (int i = 0; i < nr; i++) {
TQString m (mrls[i]); TQString m (mrls[i]);
@ -859,10 +859,10 @@ protected:
case XK_p: // previous case XK_p: // previous
mutex.lock (); mutex.lock ();
if (stream) { if (stream) {
xine_event_t xine_event = { xine_event_t xine_event;
XINE_EVENT_INPUT_PREVIOUS, memset(&xine_event, 0, sizeof(xine_event));
stream, 0L, 0, { 0, 0 } xine_event.type = XINE_EVENT_INPUT_PREVIOUS;
}; xine_event.stream = stream;
xine_event_send (stream, &xine_event); xine_event_send (stream, &xine_event);
} }
mutex.unlock (); mutex.unlock ();
@ -871,10 +871,10 @@ protected:
case XK_n: // next case XK_n: // next
mutex.lock (); mutex.lock ();
if (stream) { if (stream) {
xine_event_t xine_event = { xine_event_t xine_event;
XINE_EVENT_INPUT_NEXT, memset(&xine_event, 0, sizeof(xine_event));
stream, 0L, 0, { 0, 0 } xine_event.type = XINE_EVENT_INPUT_NEXT;
}; xine_event.stream = stream;
xine_event_send (stream, &xine_event); xine_event_send (stream, &xine_event);
} }
mutex.unlock (); mutex.unlock ();
@ -883,10 +883,10 @@ protected:
case XK_u: // up menu case XK_u: // up menu
mutex.lock (); mutex.lock ();
if (stream) { if (stream) {
xine_event_t xine_event = { xine_event_t xine_event;
XINE_EVENT_INPUT_MENU1, memset(&xine_event, 0, sizeof(xine_event));
stream, 0L, 0, { 0, 0 } xine_event.type = XINE_EVENT_INPUT_MENU1;
}; xine_event.stream = stream;
xine_event_send (stream, &xine_event); xine_event_send (stream, &xine_event);
} }
mutex.unlock (); mutex.unlock ();
@ -895,10 +895,10 @@ protected:
case XK_r: // root menu case XK_r: // root menu
mutex.lock (); mutex.lock ();
if (stream) { if (stream) {
xine_event_t xine_event = { xine_event_t xine_event;
XINE_EVENT_INPUT_MENU3, memset(&xine_event, 0, sizeof(xine_event));
stream, 0L, 0, { 0, 0 } xine_event.type = XINE_EVENT_INPUT_MENU3;
}; xine_event.stream = stream;
xine_event_send (stream, &xine_event); xine_event_send (stream, &xine_event);
} }
mutex.unlock (); mutex.unlock ();
@ -973,11 +973,12 @@ protected:
data.x = rect.x; data.x = rect.x;
data.y = rect.y; data.y = rect.y;
data.button = 0; data.button = 0;
xine_event_t xine_event = { xine_event_t xine_event;
XINE_EVENT_INPUT_MOUSE_MOVE, memset(&xine_event, 0, sizeof(xine_event));
stream, &data, sizeof (xine_input_data_t), xine_event.type = XINE_EVENT_INPUT_MOUSE_MOVE;
{ 0 , 0 } xine_event.stream = stream;
}; xine_event.data = &data;
xine_event.data_length = sizeof (xine_input_data_t);
mutex.lock (); mutex.lock ();
xine_event_send (stream, &xine_event); xine_event_send (stream, &xine_event);
mutex.unlock (); mutex.unlock ();
@ -1007,11 +1008,12 @@ protected:
data.x = rect.x; data.x = rect.x;
data.y = rect.y; data.y = rect.y;
data.button = 1; data.button = 1;
xine_event_t xine_event = { xine_event_t xine_event;
XINE_EVENT_INPUT_MOUSE_BUTTON, memset(&xine_event, 0, sizeof(xine_event));
stream, &data, sizeof (xine_input_data_t), xine_event.type = XINE_EVENT_INPUT_MOUSE_BUTTON;
{ 0, 0 } xine_event.stream = stream;
}; xine_event.data = &data;
xine_event.data_length = sizeof (xine_input_data_t);
mutex.lock (); mutex.lock ();
xine_event_send (stream, &xine_event); xine_event_send (stream, &xine_event);
mutex.unlock (); mutex.unlock ();

Loading…
Cancel
Save