GNOME Bugzilla – Bug 654816
[rtspsrc] rtspsrc doesn't get eos if it's wrapped into a bin
Last modified: 2011-07-25 10:46:32 UTC
I have a simple pipeline: rtspsrc ! decodebin2 ! queue ! xvsink If I put the elements into the pipeline without any wrapping bins, and send an eos to the pipeline, the eos arrive to the bus and everything is fine. If I put the rtspsrc, decodebin2 and the queue into a bin (named sourceBin) and send the eos, the rtspsrc doesn't receive the eos event, and the message never appears on the bus. In the GST_DEBUG=4 log these are the important lines: Without binwrapping it's working: GST_EVENT gstevent.c:269:gst_event_new:ESC[00m creating new event 0x7f78d86ba300 eos 86 GST_ELEMENT_PADS gstelement.c:1633:gst_element_send_event:ESC[00m send eos event on element pipeline0 bin gstbin.c:2656:gst_bin_send_event:<pipeline0>ESC[00m Sending eos event to src children GST_STATES gstbin.c:1709:bin_element_is_src:<pipeline0>ESC[00m child sink is not src GST_STATES gstbin.c:1709:bin_element_is_src:<pipeline0>ESC[00m child queue01 is not src GST_STATES gstbin.c:1709:bin_element_is_src:<pipeline0>ESC[00m child decodebin is not src GST_STATES gstbin.c:1709:bin_element_is_src:<pipeline0>ESC[00m child src02 is src GST_ELEMENT_PADS gstelement.c:1633:gst_element_send_event:ESC[00m send eos event on element src02 GST_ELEMENT_PADS gstelement.c:1633:gst_element_send_event:ESC[00m send eos event on element udpsrc1 When rtspsrc, decodebin2 and queue are in a bin: GST_EVENT gstevent.c:269:gst_event_new:ESC[00m creating new event 0x7fb904533380 eos 86 GST_ELEMENT_PADS gstelement.c:1633:gst_element_send_event:ESC[00m send eos event on element pipeline0 bin gstbin.c:2656:gst_bin_send_event:<pipeline0>ESC[00m Sending eos event to src children GST_STATES gstbin.c:1709:bin_element_is_src:<pipeline0>ESC[00m child sink is not src GST_STATES gstbin.c:1709:bin_element_is_src:<pipeline0>ESC[00m child sourceBin is not src
Additional info: if i use videotestsrc instead of rtspsrc then everything is working. Here is a small program that demonstrates the problem: http://pastebin.com/shS8Qgks Using rtspsrc as source: ./gst_rtsp_eos_example rtsp://... Run without params for using videotestsrc as source: ./gst_rtsp_eos_example
Created attachment 192241 [details] [review] rtspsrc: set SOURCE flag at init time (untested) patch that should handle this. However, while it seems evident, it is not clear why it is presently done as it stands, and whether changing that may have unfortunate effects ...
I tested the patch and it worked for me in all of my testcases. Thanks :)
commit 9764b57b0a0ea169dbd894e0d81894cd1d0b2e61 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Tue Jul 19 13:38:01 2011 +0200 rtspsrc: set SOURCE flag at init time Fixes #654816.