1 commit c5618b4c1fb10d9bb8a6128857aa2e8a7cf396b2
2 Author: hschang <chang@dev3>
3 Date: Thu Jan 22 15:52:21 2015 +0900
7 diff --git a/configure.ac b/configure.ac
8 index 106756e..f03a743 100755
11 @@ -22,8 +22,13 @@ AX_PTHREAD
15 +dnl versions of gstreamer and plugins-base
16 +AC_ARG_WITH(gstversion,
17 + AS_HELP_STRING([--with-gstversion],[use gstreamer version (major.minor)]),
18 + [GST_MAJORMINOR=$withval],[GST_MAJORMINOR=0.10])
20 PKG_CHECK_MODULES(ENIGMA2, enigma2)
21 -PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10 gstreamer-pbutils-0.10)
22 +PKG_CHECK_MODULES(GSTREAMER, gstreamer-$GST_MAJORMINOR gstreamer-pbutils-$GST_MAJORMINOR)
23 PKG_CHECK_MODULES(LIBCRYPTO, libcrypto)
26 diff --git a/merlinmusicplayer/src/merlinmp3player/merlinmp3player.cpp b/merlinmusicplayer/src/merlinmp3player/merlinmp3player.cpp
27 index 0f25e41..56b3760 100644
28 --- a/merlinmusicplayer/src/merlinmp3player/merlinmp3player.cpp
29 +++ b/merlinmusicplayer/src/merlinmp3player/merlinmp3player.cpp
30 @@ -123,7 +123,11 @@ eServiceMerlinMP3Player::eServiceMerlinMP3Player(eServiceReference ref): m_ref(
31 g_object_set (G_OBJECT (source), "location", m_filename.c_str(), NULL);
32 gst_bin_add_many (GST_BIN (m_gst_pipeline), source, decoder, sink, NULL);
33 gst_element_link_many (source, decoder, sink, NULL);
34 +#if GST_VERSION_MAJOR < 1
35 gst_bus_set_sync_handler(gst_pipeline_get_bus (GST_PIPELINE (m_gst_pipeline)), gstBusSyncHandler, this);
37 + gst_bus_set_sync_handler(gst_pipeline_get_bus (GST_PIPELINE (m_gst_pipeline)), gstBusSyncHandler, this, NULL);
39 gst_element_set_state (m_gst_pipeline, GST_STATE_PLAYING);
42 @@ -240,8 +244,11 @@ RESULT eServiceMerlinMP3Player::getLength(pts_t &pts)
44 GstFormat fmt = GST_FORMAT_TIME;
47 +#if GST_VERSION_MAJOR < 1
48 if (!gst_element_query_duration(m_gst_pipeline, &fmt, &len))
50 + if (!gst_element_query_duration(m_gst_pipeline, fmt, &len))
54 /* len is in nanoseconds. we have 90 000 pts per second. */
55 @@ -295,8 +302,11 @@ RESULT eServiceMerlinMP3Player::getPlayPosition(pts_t &pts)
57 GstFormat fmt = GST_FORMAT_TIME;
60 +#if GST_VERSION_MAJOR < 1
61 if (!gst_element_query_position(m_gst_pipeline, &fmt, &len))
63 + if (!gst_element_query_position(m_gst_pipeline, fmt, &len))
67 /* len is in nanoseconds. we have 90 000 pts per second. */