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 706387 - rtpbin: Can not stop pipe with EOS event
rtpbin: Can not stop pipe with EOS event
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.0.8
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-20 12:08 UTC by Peter Randeu
Modified: 2018-05-06 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Randeu 2013-08-20 12:08:00 UTC
A pipeline that contains a rtpbin can not be stopped by sending an EOS event to the pipe. For example:

gst-launch-1.0 -ve rtpbin name=rtpbin udpsrc ! rtpbin.recv_rtp_sink_0 
rtpbin. ! rtph264depay ! h264parse ! matroskamux ! filesink 
location=test.mkv

If ctrl-c is pressed to stop the pipe, gst-launch just outputs "Waiting for EOS..." but nothing happens.
Comment 1 Wim Taymans 2013-08-20 12:38:28 UTC
For git:

commit 587dc055e94abd31a5abdafd9859ba2733a952d9
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Aug 20 14:36:59 2013 +0200

    jitterbuffer: handle EOS
    
    When the queue is empty, and we received EOS, pause and push an EOS
    event downstream.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=706387
Comment 2 Wim Taymans 2013-08-20 13:06:12 UTC
That pipeline generates an error for me, maybe that's what you see? can you paste the output you see in the console here? If I fix the caps of matroskamux, it works for me.
Comment 3 Tim-Philipp Müller 2013-08-20 13:21:12 UTC
I simply tried:

  gst-launch-1.0 -ve rtpbin name=rtpbin udpsrc ! identity silent=false ! rtpbin.recv_rtp_sink_0  rtpbin. ! fakesink

without any udp input.
Comment 4 Peter Randeu 2013-08-20 13:57:39 UTC
Yes, if I set the caps (with framerate) and the sender is active, it works for
me too.

But if the sender is not active (no data arrives at the receiver's UDP port),
rtpbin seems to ignore the EOS event. Is that behavior intended?
For example, this pipe stops on EOS, even if no data is received:
gst-launch-1.0 -ve udpsrc port=5000 ! $VCAPS ! fakesink -ve

Whereas this pipe keeps waiting on EOS:
gst-launch-1.0 -ve rtpbin name=rtpbin udpsrc port=5000 ! $VCAPS ! rtpbin.recv_rtp_sink_0 rtpbin. ! fakesink -ve

VCAPS="application/x-rtp,clock-rate=90000,payload=96,encoding-name=H264,
media=video"
Comment 5 Wim Taymans 2013-08-20 14:02:51 UTC
(In reply to comment #4)
> Yes, if I set the caps (with framerate) and the sender is active, it works for
> me too.
> 
> But if the sender is not active (no data arrives at the receiver's UDP port),
> rtpbin seems to ignore the EOS event. Is that behavior intended?

Yes, that's expected, the sink is not linked at that time, so no EOS can go on the bus.
Comment 6 Peter Randeu 2013-08-20 14:37:45 UTC
Ok, but I still have a problem with rtpbin and EOS.

This pipe ignores EOS events, even if data is flowing:

gst-launch-1.0 -ve rtpbin name=rtpbin udpsrc port=5000 ! $VCAPS ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtph264depay ! avdec_h264 ! xvimagesink rtpbin.send_rtcp_src_0 ! fakesink sync=false async=false

VCAPS="application/x-rtp,clock-rate=90000,payload=96,encoding-name=H264, media=video"

The video is displayed correct, but if I press ctrl-c I only get "Waiting for EOS...". If I remove rtpbin.send_rtcp_src_0 and the fakesink from the pipe, EOS works correct.

Do I have to do something special if I use rtpbin.send_rtcp_src_0 in a pipe?
Comment 7 Wim Taymans 2013-08-20 14:44:47 UTC
(In reply to comment #6)
> Ok, but I still have a problem with rtpbin and EOS.
> 
> This pipe ignores EOS events, even if data is flowing:
> 
> gst-launch-1.0 -ve rtpbin name=rtpbin udpsrc port=5000 ! $VCAPS !
> rtpbin.recv_rtp_sink_0 rtpbin. ! rtph264depay ! avdec_h264 ! xvimagesink
> rtpbin.send_rtcp_src_0 ! fakesink sync=false async=false
> 
> VCAPS="application/x-rtp,clock-rate=90000,payload=96,encoding-name=H264,
> media=video"
> 
> The video is displayed correct, but if I press ctrl-c I only get "Waiting for
> EOS...". If I remove rtpbin.send_rtcp_src_0 and the fakesink from the pipe, EOS
> works correct.
> 
> Do I have to do something special if I use rtpbin.send_rtcp_src_0 in a pipe?

Nothing special. This is a bug, the EOS should also be sent on the RTCP pad when requested.
Comment 8 Wim Taymans 2013-08-23 10:43:58 UTC
A bit more complicated than just forwarding EOS:

When EOS is received on the session recv_rtp_sink, it means the receiver part is stopping, it's still possible that we want to send RTCP, so we can't really send EOS on the send_rtcp_src pad, we need to wait until all sources time out and we have an empty session. We could assume that when we also get EOS on the recv_rtcp_sink pad, we are never going to hear anything from the sources anymore and we can time them out immediately and send EOS on the send_rtcp_src pad.
Comment 10 Vivia Nikolaidou 2018-05-06 12:26:20 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!