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 559543 - rtspsrc doesn't send EOS when playing finished
rtspsrc doesn't send EOS when playing finished
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.20
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-06 01:27 UTC by Eric Zhang
Modified: 2008-11-26 08:55 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch for gstrtspsrc.c for EOS issue (5.29 KB, patch)
2008-11-06 01:48 UTC, Eric Zhang
none Details | Review
patch file of gstrtspsrc.h for EOS issue (670 bytes, patch)
2008-11-06 01:49 UTC, Eric Zhang
none Details | Review

Description Eric Zhang 2008-11-06 01:27:28 UTC
We use rtspsrc in gst-plugins-good to play the rtsp video from m.youtube.com. We found rtspsrc will not send out a EOS event when playing finished. Currently, rtspsrc will send out EOS when the RTCP BYE packet received or the sender timeout(doesn't received any RTCP packet for a while) but this is not enough. We need rtspsrc sends out EOS immediately when the play finishs.
Comment 1 Eric Zhang 2008-11-06 01:39:18 UTC
I made a patch seems to work now. I read the source code of openRTSP which is another open source RTSP impelementation and found out it uses a timeout callback to handle this EOS issue. In short words, when the playing starts, it sets up a timeout callback(the timeout time is the duration of current clip), when the timeout occurs -- sends out the EOS.
According to this logic, I created some codes in <gst-plugins-good>/gst/rtspsrc/gstrtspsrc.c and make EOS happens. Refer to my patch file attached for details.

By the way: I think this is a ugly EOS implementation but it works. RTSP 1.0 doesn't support EOS while RTSP 2.0(draft) supports it in PLAY_NOTIFY method. In RTSP 2.0 in the future, maybe we can got a graceful EOS implementation.
Comment 2 Eric Zhang 2008-11-06 01:48:18 UTC
Created attachment 122068 [details] [review]
patch for gstrtspsrc.c for EOS issue
Comment 3 Eric Zhang 2008-11-06 01:49:18 UTC
Created attachment 122069 [details] [review]
patch file of gstrtspsrc.h for EOS issue
Comment 4 Wim Taymans 2008-11-11 11:49:24 UTC
It is indeed a very ugly way of doing things. Maybe it's better to have an element monitor the stream-time on the buffers (rtpbin, jitterbuffer or maybe the depayloader) and emit EOS when it reaches the duration. This would be more accurate and more flexible,