From: Jan Schmidt Date: Tue, 30 Aug 2011 08:21:31 +0000 (+1000) Subject: seek: Accept pipeline descriptions for audiosink/videosink X-Git-Tag: 1.19.3~511^2~6555^2~546 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33d491a04f45045a3efc3d5c24136b8a229f5cf3;p=platform%2Fupstream%2Fgstreamer.git seek: Accept pipeline descriptions for audiosink/videosink Make the element_factory_make_or_warn utility function try parsing the input string as a bin if element_factory_make() fails. This makes the --audiosink/--videosink commandline options accept a pipeline string. --- diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index d79209ccbd..216a00a317 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -164,6 +164,16 @@ gst_element_factory_make_or_warn (const gchar * type, const gchar * name) { GstElement *element = gst_element_factory_make (type, name); +#ifndef GST_DISABLE_PARSE + if (!element) { + /* Try parsing it as a pipeline description */ + element = gst_parse_bin_from_description (type, TRUE, NULL); + if (element) { + gst_element_set_name (element, name); + } + } +#endif + if (!element) { g_warning ("Failed to create element %s of type %s", name, type); }