GStreamer hangs on gst_element_set_state() when trying to stop a transcode stream
David Manpearl
dmanpearl at gmail.com
Fri Oct 19 16:41:03 UTC 2018
My call to stop RTP streaming with gst_element_set_state(GST_STATE_NULL)
hangs when running the pipeline below. I want it to not hang.
I am using the pipeline below to stream to via RTP. When I try to stop via
gst_element_set_state(GST_STATE_NULL) or
gst_element_set_state(GST_STATE_READY), the gst_element_set_state()
occasionally hangs (~10% of the time).
I have tried adding and removing various "queue" plugins, especially after
the mux type plugins that may have multiple sink pads, but these have not
significantly changed the issue. I have also tried without the audio
portion of the pipeline with similar results.
I am starting the pipeline with gst_parse_launch(pipelineTxt) and
gst_element_set_state(pipeline, GST_STATE_PLAYING);
I am using GStreamer 1.10.4 in Debian 9.4 within Docker. I cannot easily
upgrade my version of GStreamer, but that would be a possibility if there
is a known fix in a later version.
I have tried individually setting states through the cascade of legal
transitions. The transition from GST_STATE_PLAYING to GST_STATE_PAUSED
returns SUCCESS, but the transition from GST_STATE_PAUSED or
GST_STATE_PLAYING to GST_STATE_READY often hangs (this is the issue).
Quetions
1. Is there anything wrong with my pipeline?
2. Are there any suggestions for helping to resolve this issue?
3. When the hang occurs, is it possible to force it to stop and free
resources without killing the app?
The Pipeline:
filesrc name=gbxsrc location=video.MP4 ! qtdemux name=gbxdemux ! queue !
vaapih264dec ! vaapipostproc width=1280 height=720 ! videorate !
video/x-raw,framerate=30000/1001 ! vaapih264enc bitrate=3000 ! mpegtsmux
name=mux ! rtpmp2tpay ! rtprtxqueue ! rtpbin.send_rtp_sink_0
rtpbin.send_rtp_src_0 ! udpsink name=gbxsink async=false port=5000
host=192.168.254.41 rtpbin name=rtpbin rtp-profile=avpf gbxdemux. ! queue
! decodebin ! queue ! audioconvert ! audioresample ! avenc_aac ! mux.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20181019/4807c5c7/attachment.html>
More information about the gstreamer-devel
mailing list