need help on new segment event

rajnikant jachak rajnikantjachak at gmail.com
Sun Dec 23 21:42:16 PST 2012


Thanks Tim. As suggested will have look in GstBaseParse & demuxers.
Following is the code snippet I'm using for new segment event.

GstEvent *event = gst_event_new_new_segment(TRUE,1.0,
GST_FORMAT_TIME,(filter->cfinfo.pts),GST_CLOCK_TIME_NONE,0);

gst_pad_push_event (filter->srcpad, event)

In this code, I'm setting time field with PTS value of frame where playback
should resume with reset flag off. I'm pushing this event to source pad of
my filter so that the downstream element should adjust their times.

Thanks,


On Sat, Dec 22, 2012 at 5:17 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> 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
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



-- 
Regards,
Rajnikant Jachak.

The pessimist sees difficulty in every opportunity. The optimist sees the
opportunity in every difficulty.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121224/d953d6cf/attachment.html>


More information about the gstreamer-devel mailing list