need help on new segment event
Tim-Philipp Müller
t.i.m at zen.co.uk
Sat Dec 22 03:47:36 PST 2012
On Fri, 2012-12-21 at 21:24 +0530, rajnikant jachak wrote:
Hi,
> As per GStreamer documents, one need to send new segment event after
> seek, so as to specify valid buffer time stamp range
> (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstEvent.html#gst-event-new-segment). My question is, does new segment manipulate the pipeline clock?
> For ex. I have frames A1, A2 ... A100. I started playing these frames
> by pushing frame data in buffer and assigning respective PTS values
> of frames as time stamp of that buffer. After seeking to frame A40, I
> sent new segment event with 'start' parameter as PTS value of A40
> frame and stop as -1. I have started pushing A40 onwards frames for
> decoding. Will these frames start playing immediately?
>
> I was trying above mentioned scenario, but saw some weird behaviour.
> The playback of seeked frames was getting delayed by almost seeked
> time.
> Please forgive me, if I have completely misunderstood the idea behind
> new segment event.
It might be helpful if you showed us the exact code that sets up the
GstSegment structure.
Are you filling in the 'time' field with the PTS value of A40 as well?
Are you setting the RESET flag? etc.
You might want to have a look at what existing elements such as
GstBaseParse or demuxers like qtdemux or oggdemux do.
Cheers
-Tim
More information about the gstreamer-devel
mailing list