gst_element_set_state deadlock
Nathanael D. Noblet
nathanael at gnat.ca
Wed Apr 6 08:16:49 PDT 2011
On 04/06/2011 01:12 AM, Kocsis Tibor wrote:
> Hi,
>
> I want to destroy a branch in a pipeline, keeping the pipeline in
> PLAYING. I have two sources, two sinks, they are in the same pipeline
> and they don't have any joint element. If i set the state one of the
> branchs's elements to null, in the 50% of the cases i have a deadlock
> at the gst_element_set_state. Can somebody explain me what is the
> correct order to destroy dynamically a branch in a pipeline? I sending
> flushstart/flushstop/eos events, set the elements to NULL from the
> source to the sink and in reversed order, but nothing works in all
> case...
I have a pipeline that has two branches, one for saving to a file, and
the other for viewing. The only way I could do this was by creating a
bin for the one branch I wanted to dynamically add/remove. I received
some help to get that working.
http://gstreamer-devel.966125.n4.nabble.com/SOLVED-Dynamically-Recording-From-a-Live-Stream-amp-EOS-Handling-td3057813.html
That thread explains what I had to do. Not sure if your case is the same
however perhaps it'll give you enough to go on. So from the code
attached in that email you can see that the bin posts a
GST_MESSAGE_APPLICATION on the bus. When I get that I do the following:
set the bin state to null
remove the bin from the pipeline
release the TEE pads
Its been working flawlessly for me for months now.
--
Nathanael d. Noblet
t 403.875.4613
More information about the gstreamer-devel
mailing list