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
This commit is contained in:
Mike Blumenkrantz 2013-12-02 12:27:23 -05:00
parent 63a9dd7384
commit 58d6c943aa
2 changed files with 19 additions and 5 deletions

View File

@ -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"])

View File

@ -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);