From 2061581be06f404d8e99898edb0d4139824905f8 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 27 Sep 2012 21:22:17 +0000 Subject: [PATCH] - added macro for older libvlc compiling --- source/shared_lib/sources/graphics/video_player.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/shared_lib/sources/graphics/video_player.cpp b/source/shared_lib/sources/graphics/video_player.cpp index bbc3de646..d06fa25b7 100644 --- a/source/shared_lib/sources/graphics/video_player.cpp +++ b/source/shared_lib/sources/graphics/video_player.cpp @@ -311,10 +311,12 @@ void callbacks( const libvlc_event_t* event, void* data ) { case libvlc_MediaParsedChanged: if(ctx->verboseEnabled) printf("libvlc_MediaParsedChanged\n"); break; + +#if defined(LIBVLC_VERSION_PRE_2) && defined(LIBVLC_VERSION_PRE_1_1_0) case libvlc_MediaPlayerVout: if(ctx->verboseEnabled) printf("libvlc_MediaPlayerVout\n"); break; - +#endif case libvlc_MediaListItemAdded: if(ctx->verboseEnabled) printf("libvlc_MediaListItemAdded\n"); break; @@ -775,10 +777,12 @@ bool VideoPlayer::initPlayer(string mediaURL) { // printf("ERROR CANNOT ADD EVENT [libvlc_MediaParsedChanged]\n"); // } +#if defined(LIBVLC_VERSION_PRE_2) && defined(LIBVLC_VERSION_PRE_1_1_0) event_added = libvlc_event_attach( eventManager, libvlc_MediaPlayerVout, callbacks, ctxPtr ); if(event_added != 0) { printf("ERROR CANNOT ADD EVENT [libvlc_MediaPlayerVout]\n"); } +#endif // event_added = libvlc_event_attach( eventManager, libvlc_MediaListItemAdded, callbacks, ctxPtr ); // if(event_added != 0) {