GNOME Bugzilla – Bug 759167
Setting a demux pipeline again from NULL to PLAYING results in a gst-stream-error-quark error
Last modified: 2015-12-20 18:37:18 UTC
Created attachment 316923 [details] python test case I am trying to restart a simple playback pipeline (built with parse_launch): filesrc ! qtdemux ! fakesink How/is it possible to restart the playback after the first EOS ? $ LANG=C python test.py Building reference video EOS, running next action (<function play_file at 0x7f1f8050bb70>) Parsing playback pipeline EOS, running next action (<function replay_file at 0x7f1f8050bbf8>) Re-initializing pipeline (GLib.Error('GStreamer encountered a general stream error.', 'gst-stream-error-quark', 1), 'qtdemux.c(5306): gst_qtdemux_loop (): /GstPipeline:test/GstQTDemux:qtdemux0:\nstreaming stopped, reason not-linked') Critical error, exiting
IIRC parse_launch pipelines are not reusable. The dynamic pad linking only links once and then detaches the signal handler, so you get not-linked on subsequent attempts to use it.
Yes, if this is not mentioned in the docs yet we should add it there :)
Yes, i was going to say that it would be nice to see this specified in the doc (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstParse.html#gst-parse-launch) What is the recommended way of restarting such a pipeline ? The thing is that my app (https://github.com/UbiCastTeam/gst-gtklaunch-1.0) is parsing a pipeline from the command line, so i don't get a lot of choices to run it than using parse_launch. Is there any way to determine that some pipeline launched from parse_launch will be or not reusable ? That way i could re-parse the pipeline after EOS or set_state(NULL) for instance. I have 2 use cases: - currently, when a playback pipeline finishes (EOS), i cannot restart it except by restarting the app; i was expecting Stop>Play (NULL>PLAYING) to work - i also implemented a filechooser Gtk dialog for filesrc's location property, and i have the same issue; i'd like to be able to tear down the pipeline, change filesrc's location and set again to PLAYING
Oops, it is mentioned in the Description section of http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstParse.html, sorry "Please note that these functions take several measures to create somewhat dynamic pipelines. Due to that such pipelines are not always reusable (set the state to NULL and back to PLAYING)."
Nothing prevents you from just re-creating the pipeline based on the string you used to create the pipeline the first time, does it?
No, but it would be good to know how to predict if a pipeline can be restarted or not instead of systematically reparsing it. In any case i would be happy to hide/lock the "Stop" button for non-reusable pipelines, so i still need a way to figure this out. Should i just consider live pipelines to be reusable and playback pipelines (with a duration) not to be reusable ?
At least all pipelines that contains links on SOMETIMES or REQUEST pads are not reusable
I don't think you should try to predict that. Just make a new pipeline.