summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-12 00:59:54 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-12 00:59:54 +0100
commit4d5e6b99d3c2436c34ca8db9720ab331d0190dce (patch)
tree1adf737641faf73e756088e72f59d583d93f2890
parentebbe6c574d83e25d4953bbf05d00338f9173d2f6 (diff)
downloadtdemultimedia-4d5e6b99d3c2436c34ca8db9720ab331d0190dce.tar.gz
tdemultimedia-4d5e6b99d3c2436c34ca8db9720ab331d0190dce.zip
Add GStreamer 1.0 support
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--juk/configure.in.bot4
-rw-r--r--juk/configure.in.in36
-rw-r--r--juk/gstreamerplayer.cpp6
-rw-r--r--juk/gstreamerplayer.h2
4 files changed, 28 insertions, 20 deletions
diff --git a/juk/configure.in.bot b/juk/configure.in.bot
index f611be1c..b6ded388 100644
--- a/juk/configure.in.bot
+++ b/juk/configure.in.bot
@@ -10,12 +10,12 @@ fi
if test "x$with_gstreamer" = xcheck && test "x$have_gst" = xno; then
echo "**************************************************"
echo "*"
- echo "* You do not seem to have GStreamer 0.8.x installed."
+ echo "* You do not seem to have GStreamer 0.8.x, 0.10.x or 1.0.x installed."
echo "* Without this aRts and/or aKode output will be used exclusively."
echo "*"
echo "* If you actually have gstreamer installed make sure you also have"
echo "* the gst-plugins collection installed. Both gstreamer and"
- echo "* gst-plugins need to be 0.8.x (0.9 is not supported)"
+ echo "* gst-plugins need to be 0.8.x, 0.10.x or 1.0.x (0.9 is not supported)"
echo "* http://gstreamer.freedesktop.org/modules/"
echo "*"
echo "* JuK supports GStreamer output but will also"
diff --git a/juk/configure.in.in b/juk/configure.in.in
index f2e48c0c..b74c6d9f 100644
--- a/juk/configure.in.in
+++ b/juk/configure.in.in
@@ -44,29 +44,34 @@ AC_ARG_WITH(gstreamer,
have_gst=no
if test "x$with_gstreamer" != xno; then
- # pkg-config seems to have a bug where it masks needed -L entries when it
+ # pkg-config seems to have a bug where it masks needed -L entries when it
# shouldn't, so disable that.
- PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
+ PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
export PKG_CONFIG_ALLOW_SYSTEM_LIBS
- GST_MAJORMINOR=0.10
- GST_REQ=0.10.0
- GST_VERSION=10
-
- PKG_CHECK_MODULES(GST, \
- gstreamer-$GST_MAJORMINOR >= $GST_REQ, \
- have_gst=yes, have_gst=no)
+ GST_MAJORMINOR=1.0
+ GST_REQ=1.0.0
+ PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ, have_gst=yes, have_gst=no)
if test "x$have_gst" != xyes; then
+ AC_MSG_RESULT(no)
+
+ GST_MAJORMINOR=0.10
+ GST_REQ=0.10.0
+ PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ, have_gst=yes, have_gst=no)
+
+ if test "x$have_gst" != xyes; then
+ AC_MSG_RESULT(no)
- GST_MAJORMINOR=0.8
- GST_REQ=0.8.0
- GST_VERSION=8
+ GST_MAJORMINOR=0.8
+ GST_REQ=0.8.0
+ PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ, have_gst=yes, have_gst=no)
- PKG_CHECK_MODULES(GST, \
- gstreamer-$GST_MAJORMINOR >= $GST_REQ, \
- have_gst=yes, have_gst=no)
+ if test "x$have_gst" != xyes; then
+ AC_MSG_RESULT(no)
+ fi
+ fi
fi
if test "x$with_gstreamer" != xcheck && test "x$have_gst" != xyes; then
@@ -90,7 +95,6 @@ else
AC_MSG_NOTICE([GStreamer version >= $GST_REQ found.])
AC_DEFINE(HAVE_GSTREAMER, 1, [have GStreamer])
- AC_DEFINE_UNQUOTED(GSTREAMER_VERSION, $GST_VERSION, [GStreamer Version])
fi
AC_SUBST(GST_CFLAGS)
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<gpointer>(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
diff --git a/juk/gstreamerplayer.h b/juk/gstreamerplayer.h
index 5b4dbf6b..ef18785c 100644
--- a/juk/gstreamerplayer.h
+++ b/juk/gstreamerplayer.h
@@ -59,7 +59,7 @@ public slots:
private:
void setupPipeline();
-#if GSTREAMER_VERSION == 8
+#if GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR < 10
void readConfig();
long long time(GstQueryType type) const;