GNOME Bugzilla – Bug 763457
gstparse: element properties are contained in a GstPipeline instead of a GstBin
Last modified: 2016-03-24 12:52:43 UTC
When running this pipeline: gst-launch-1.0 playbin uri=<URI> video-sink="identity ! autovideosink" The "identity ! autovideosink" should be contained within a GstBin, which is then the videosink. But instead, they are contained within a GstPipeline. The result is a GstPipeline containing another GstPipeline. Worse, the sub-pipeline has a pad. This can probably lead to undefined behavior. Example: gst-launch-1.0 playbin uri=<URI> video-sink="decodebin ! autovideosink" This never reaches the PLAYING state. It would make sense to contain the elements in a GstBin instead.
It uses gst_parse_bin_from_description() already, which uses gst_parse_launch_full() internally. And that one calls > bin = GST_BIN (gst_element_factory_make ("pipeline", NULL)); So the solution would be to pass through the information that we want a bin, not a pipeline. Maybe by adding a new value to GstParseFlags for backwards compatibility (someone might expect gst_parse_bin_from_description() to return a GstPipeline).
Do you want to write a patch?
Yeah okay I'll try. I should have something soon for 1.8.
Created attachment 323686 [details] [review] patch which adds a new parse flag for using bins instead of pipelines Here. Adds the flag and also makes the internal parser code use this flag for element property values so we no longer have pipelines inside pipelines.
commit eca5bafe818d9c05b6a856b1a6eb78807a260010 Author: Carlos Rafael Giani <dv@pseudoterminal.org> Date: Fri Mar 11 09:23:04 2016 +0100 parse-launch: Add flag for placing elements in a bin instead of a pipeline By default, gst_parse_launch_full() creates a GstPipeline if there's more than one toplevel element. Add a flag to let it use a GstBin instead. Also fix the parser to let it use this flag for GST_TYPE_ELEMENT property values, to avoid having GstPipelines inside other GstPipelines. https://bugzilla.gnome.org/show_bug.cgi?id=763457