After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759167 - Setting a demux pipeline again from NULL to PLAYING results in a gst-stream-error-quark error
Setting a demux pipeline again from NULL to PLAYING results in a gst-stream-e...
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.6.1
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-08 11:08 UTC by Florent Thiéry
Modified: 2015-12-20 18:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
python test case (1.37 KB, text/x-python)
2015-12-08 11:08 UTC, Florent Thiéry
Details

Description Florent Thiéry 2015-12-08 11:08:20 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
Comment 1 Thiago Sousa Santos 2015-12-09 20:43:29 UTC
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.
Comment 2 Sebastian Dröge (slomo) 2015-12-09 21:49:51 UTC
Yes, if this is not mentioned in the docs yet we should add it there :)
Comment 3 Florent Thiéry 2015-12-09 22:41:05 UTC
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
Comment 4 Florent Thiéry 2015-12-09 22:43:16 UTC
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)."
Comment 5 Tim-Philipp Müller 2015-12-09 23:09:28 UTC
Nothing prevents you from just re-creating the pipeline based on the string you used to create the pipeline the first time, does it?
Comment 6 Florent Thiéry 2015-12-10 08:46:24 UTC
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 ?
Comment 7 Sebastian Dröge (slomo) 2015-12-10 08:58:05 UTC
At least all pipelines that contains links on SOMETIMES or REQUEST pads are not reusable
Comment 8 Tim-Philipp Müller 2015-12-10 09:02:24 UTC
I don't think you should try to predict that. Just make a new pipeline.