From 7b0fb9f6d3b7e214c6ef7e62bd021a55c69cf54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 12 Mar 2016 00:59:54 +0100 Subject: Add GStreamer 1.0 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 4d5e6b99d3c2436c34ca8db9720ab331d0190dce) --- juk/gstreamerplayer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'juk/gstreamerplayer.cpp') diff --git a/juk/gstreamerplayer.cpp b/juk/gstreamerplayer.cpp index e77c0ff6..ffd892d4 100644 --- a/juk/gstreamerplayer.cpp +++ b/juk/gstreamerplayer.cpp @@ -32,7 +32,7 @@ #define JUK_GLIB_NULL static_cast(0) -#if GSTREAMER_VERSION == 8 +#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10 /******************************************************************************/ /******************************************************************************/ @@ -306,7 +306,11 @@ void GStreamerPlayer::setupPipeline() } m_playbin = gst_element_factory_make("playbin", "playbin"); +#if GST_CHECK_VERSION(1,0,0) + gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(m_playbin)), messageHandler, this, 0L); +#else gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(m_playbin)), messageHandler, this); +#endif } long long GStreamerPlayer::time(TimeQuery type) const -- cgit v1.2.1