[gst-devel] RTSP stream and seeking operations

Aleksey Yulin ulin at tut.by
Mon Mar 9 20:01:50 CET 2009



As far as we've investigated passing start_segment event created in the
rtspsrc from the streaming thread context is nearly not enough: all
newsegment events pushed from the rtspsrc seems to be lost by the
basertpdepayload (gstbasertpdepayload.c, line: 417).

What do we have:

1. We're streaming MPEG2 TS file
2. First TS frame has a timestamp at about 7:26:30.100055555
3. flutsdemux is used as a TS demuxer

What do we see:

1. Before seek we see that mpeg2 decoder element receives frames timestamps
starting from 7:26:30.100055555
2. The initial newsegment event the mpeg decoder receives also has a segment
starting from the 7:26:30.100055555
3. after seek performed by the rtspsrc a newsegment event is being sent by
the RTP depayloader. This event contains 0 as a segment start, and a valid
new seek position (10 seconds) in 'position' field.
4. decoder receives that segment but continues to get frames with timestamps
starting from the 7:26:40 (as we've made a seek 10 seconds forward)
5. as soon as decoder thinks that newsegment being played is starting from
0, it starts to skip all the frames as their timestamps are far beyond the
segment boundaries

So as we could see there could be several causes for this issue:

1. The mpeg2 ts demuxer (flutsdemux) should update the newsegment received
from the depayloader, shifting all its timestamps to the first TS frame
timestamp (7:26:30)
2. The mpeg2 ts demuxer should initially send downstream a newsegment
starting not from the 7:26:30, but from 0 shifting the TS frames timestamp
by this value each time.
3. The demuxer should update the base time of the downstream element
(decoder) after seek operation so the decoder will adjust frame timestamp
using this value

Is there any documents describing these elements valid behavior?

Any help will be appreciated!
-- 
View this message in context: http://www.nabble.com/RTSP-stream-and-seeking-operations-tp22178411p22416059.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.





More information about the gstreamer-devel mailing list