restarting the pipeline

Carlos Rafael Giani dv at pseudoterminal.org
Wed Dec 2 08:19:10 PST 2015


On 12/02/2015 04:49 PM, Yakov Sudeikin wrote:
> I have been told (many times) that set_state(NULL), set_state(PLAY) is 
> all you need to completely restart the pipeline. But I am facing again 
> and again the situation when I need to restart the process instead, 
> because my pipeline will not work otherwise when restarted by 
> NULL/PLAY state change. I can see that first half of the pipeline is 
> working, it is sinking is what not working after this kind of "soft 
> restart". My pipeline is soup->demux->x264enc->flvmux->rtmpsink.
>
> Do dou know if rtmpsink causing this? Is there a way to force it 
> restart without killing the program? Maybe delete the element and 
> create a new one?
>
> Thank you
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

It is possible that some of these elements don't reset some internal 
states in the state changes like they should. For example, it is common 
to set a variable to its default value in an element's init() function. 
But often, this should also be done when changing state to READY or 
NULL. If this is forgotten, then the variable won't be reset to the 
default, and therefore setting the pipeline to NULL won't get you 
something that is back in its initial state.

For this reason, to be 100% sure, you'd have to recreate the pipeline. 
That is, unref the existing one, and create a new one. If you can 
isolate problematic elements (like perhaps rtmpsink), you can also just 
recreate these particular elements.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151202/28c6b35b/attachment.html>


More information about the gstreamer-devel mailing list