After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 654816 - [rtspsrc] rtspsrc doesn't get eos if it's wrapped into a bin
[rtspsrc] rtspsrc doesn't get eos if it's wrapped into a bin
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.29
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-07-18 08:23 UTC by Tibor Kocsis
Modified: 2011-07-25 10:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtspsrc: set SOURCE flag at init time (987 bytes, patch)
2011-07-19 11:40 UTC, Mark Nauwelaerts
committed Details | Review

Description Tibor Kocsis 2011-07-18 08:23:14 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
Comment 1 Tibor Kocsis 2011-07-18 11:19:40 UTC
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
Comment 2 Mark Nauwelaerts 2011-07-19 11:40:09 UTC
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 ...
Comment 3 Tibor Kocsis 2011-07-20 14:12:33 UTC
I tested the patch and it worked for me in all of my testcases. 

Thanks :)
Comment 4 Mark Nauwelaerts 2011-07-25 10:46:16 UTC
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.