gst_element_set_state deadlocks

omer.tal jacklawi at gmail.com
Mon Jan 11 09:25:08 UTC 2021


Hello there,

I'm trying to create a dynamic pipeline which allows multiple connections to
rtsp sources, toggle between them using input-selector and send the data
(after decoded) to an appsink.

When launching the pipeline everything works fine.
The issues occur when I kill one of the RTSP servers.

I try to recover from this, so I remove the rtspsrc from the pipeline and
try to add it again.
Before I remove it, I try to change the state of that rtspsrc element to
GST_STATE_NULL. But as I do that, this function call deadlocks.

Btw, this only occurs if the RTSP server I kill is not the active one in the
input-selector.

I tried adding a queue after every rtspsrc and it indeed helped. So instead
of it deadlocks every time, it only deadlocks every like 10th time. After I
added the queue, the element which causes the deadlock is the queue, not the
rtspsrc.

I'm sharing parts of my code which are relevant:

Bus callback which detects the rtsp errors.
After it removes is I wait 1 second before trying to re-establish connection
with it again.


Remove source function:


Add source function:


Retry source function:




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list