diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2013-12-02 12:27:23 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2013-12-02 12:31:06 -0500 |
commit | a98fc0457e06167d96dfc0111c64fb3352f5dac0 (patch) | |
tree | cfbe5e531c509400f2a30d91ef17b2a1eaab7944 | |
parent | aa9e7e35b7b4e6b79521438d2ea5582e9af644ab (diff) | |
download | evas_generic_loaders-a98fc0457e06167d96dfc0111c64fb3352f5dac0.tar.gz |
bugfix: support gstreamer 0.10 and 1.0
commit 576b20e11c24c079d944fbbfb2d8902c4b313c10 last week broke gstreamer usage with 0.10 (n-video property not present until >= 1.0), but we required 0.10. not a great idea since most distros seem to still ship 0.10 by default, which means that ALL gst image loads would always fail
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | src/bin/gst/main.c | 4 |
2 files changed, 19 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index dcc44db..11ac25f 100644 --- a/configure.ac +++ b/configure.ac @@ -147,9 +147,9 @@ if test "x$want_svg" = "xyes" ; then else have_svg=no fi -GST_REQS=0.10.13 -GSTPLUG_REQS=0.10.13 -GST_MAJORMINOR=0.10 +GST_REQS=1.0 +GSTPLUG_REQS=1.0 +GST_MAJORMINOR=1.0 AC_ARG_ENABLE([gstreamer], [AC_HELP_STRING([--disable-gstreamer], [disable gstreamer support @<:@default==enabled@:>@])], @@ -163,9 +163,23 @@ if test "x$want_gstreamer" = "xyes" ; then ], [have_gst="yes"], [have_gst="no"]) + if test "x$have_gst" = "xno" ; then + GST_REQS=0.10.13 + GSTPLUG_REQS=0.10.13 + GST_MAJORMINOR=0.10 + PKG_CHECK_MODULES([GSTREAMER], + [gstreamer-$GST_MAJORMINOR >= $GST_REQS + gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS + ], + [have_gst="yes" + AC_DEFINE_UNQUOTED([USE_OLD_GST], [1], [using older gstreamer]) + ], + [have_gst="no"]) + fi else have_gst=no fi + AM_CONDITIONAL([HAVE_GST], [test "x${have_gst}" = "xyes"]) AM_CONDITIONAL([HAVE_PDF], [test "x${have_poppler}" = "xyes"]) AM_CONDITIONAL([HAVE_PS], [test "x${have_ps}" = "xyes"]) diff --git a/src/bin/gst/main.c b/src/bin/gst/main.c index 140fe02..2f396ba 100644 --- a/src/bin/gst/main.c +++ b/src/bin/gst/main.c @@ -78,7 +78,7 @@ _gst_init(const char *filename) g_error_free (error); goto gst_shutdown; } - +#ifndef USE_OLD_GST g_object_get(G_OBJECT(pipeline), "n-video", &vidstr, NULL); @@ -87,7 +87,7 @@ _gst_init(const char *filename) D("no video stream\n"); goto gst_shutdown; } - +#endif sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink"); ret = gst_element_set_state (pipeline, GST_STATE_PAUSED); |