summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-11-04 01:39:04 +0100
committerSlávek Banko <slavek.banko@axis.cz>2012-11-04 01:42:18 +0100
commit8e80490e5e3ec38ca02268dc9b52bb0f1e1e9152 (patch)
treec3fd06bbdd85ab7833f4c355c3e09740f546f8f8
parentcedbe3eaaa6d5a182b28557844de1695023c9729 (diff)
downloadkmplayer-8e80490e5e3ec38ca02268dc9b52bb0f1e1e9152.tar.gz
kmplayer-8e80490e5e3ec38ca02268dc9b52bb0f1e1e9152.zip
Fix support for xine 1.2 libraries
(cherry picked from commit 824f886dae4c985f2d703bc9991eed4fc0558b1c)
-rw-r--r--src/xineplayer.cpp56
1 files changed, 29 insertions, 27 deletions
diff --git a/src/xineplayer.cpp b/src/xineplayer.cpp
index 884b3ed..5dad3f2 100644
--- a/src/xineplayer.cpp
+++ b/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++) {
TQString m (mrls[i]);
@@ -859,10 +859,10 @@ protected:
case XK_p: // previous
mutex.lock ();
if (stream) {
- xine_event_t xine_event = {
- XINE_EVENT_INPUT_PREVIOUS,
- stream, 0L, 0, { 0, 0 }
- };
+ xine_event_t xine_event;
+ memset(&xine_event, 0, sizeof(xine_event));
+ xine_event.type = XINE_EVENT_INPUT_PREVIOUS;
+ xine_event.stream = stream;
xine_event_send (stream, &xine_event);
}
mutex.unlock ();
@@ -871,10 +871,10 @@ protected:
case XK_n: // next
mutex.lock ();
if (stream) {
- xine_event_t xine_event = {
- XINE_EVENT_INPUT_NEXT,
- stream, 0L, 0, { 0, 0 }
- };
+ xine_event_t xine_event;
+ memset(&xine_event, 0, sizeof(xine_event));
+ xine_event.type = XINE_EVENT_INPUT_NEXT;
+ xine_event.stream = stream;
xine_event_send (stream, &xine_event);
}
mutex.unlock ();
@@ -883,10 +883,10 @@ protected:
case XK_u: // up menu
mutex.lock ();
if (stream) {
- xine_event_t xine_event = {
- XINE_EVENT_INPUT_MENU1,
- stream, 0L, 0, { 0, 0 }
- };
+ xine_event_t xine_event;
+ memset(&xine_event, 0, sizeof(xine_event));
+ xine_event.type = XINE_EVENT_INPUT_MENU1;
+ xine_event.stream = stream;
xine_event_send (stream, &xine_event);
}
mutex.unlock ();
@@ -895,10 +895,10 @@ protected:
case XK_r: // root menu
mutex.lock ();
if (stream) {
- xine_event_t xine_event = {
- XINE_EVENT_INPUT_MENU3,
- stream, 0L, 0, { 0, 0 }
- };
+ xine_event_t xine_event;
+ memset(&xine_event, 0, sizeof(xine_event));
+ xine_event.type = XINE_EVENT_INPUT_MENU3;
+ xine_event.stream = stream;
xine_event_send (stream, &xine_event);
}
mutex.unlock ();
@@ -973,11 +973,12 @@ protected:
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),
- { 0 , 0 }
- };
+ xine_event_t xine_event;
+ memset(&xine_event, 0, sizeof(xine_event));
+ xine_event.type = XINE_EVENT_INPUT_MOUSE_MOVE;
+ xine_event.stream = stream;
+ xine_event.data = &data;
+ xine_event.data_length = sizeof (xine_input_data_t);
mutex.lock ();
xine_event_send (stream, &xine_event);
mutex.unlock ();
@@ -1007,11 +1008,12 @@ protected:
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),
- { 0, 0 }
- };
+ xine_event_t xine_event;
+ memset(&xine_event, 0, sizeof(xine_event));
+ xine_event.type = XINE_EVENT_INPUT_MOUSE_BUTTON;
+ xine_event.stream = stream;
+ xine_event.data = &data;
+ xine_event.data_length = sizeof (xine_input_data_t);
mutex.lock ();
xine_event_send (stream, &xine_event);
mutex.unlock ();