Timestamp problem...

Eric Trousset etrousset at awox.com
Wed Nov 27 01:32:15 PST 2013


Hi,
It looks like my source element never gets a clock, nor is its base_time set.

Should I provide the clock myself (maybe when receiving the new_clock message on the bus)?

Where would it be best to save the base_time? I tried in the start method but it seems the pipeline clock can change afterward.

Regards, 
Eric T.

> -----Original Message-----
> From: Sebastian Dröge [mailto:sebastian at centricular.com]
> Sent: mardi 26 novembre 2013 09:16
> To: Discussion of the development of and with GStreamer
> Subject: Re: Timestamp problem...
> 
> On Mo, 2013-11-25 at 17:16 +0100, Eric Trousset wrote:
> > Hi,
> >
> > In my effort to write a src element, and to mix the outgoing buffers with a
> video stream(at the moment, I just have 1 stream, I'll had the media later
> on), I need to timestamp those buffers.
> >
> > So I tried two things:
> >
> > -          First I tried calling gst_base_src_do_timestamp, but it seems to have
> no effect. My outgoing buffers are still not timestamped. I tried to give a
> clock to the source element using the gst_system_clock_obtain, or getting
> one from the pipeline with no chance...
> >
> > -          Secondly I tried timestamping the outgoing buffer myself. Wath I did
> is in the start, call set_clock with the system clock, and call set_base_time
> with time from the same clock. The in the create function I set PTSand DTS to
> current_time - base_time. This is not far from work, but still it seem the
> video sink drops a lot of frame and the display is not updated very often.
> >
> > Any advice on how to properly set my time stamps (videomixer seems to
> need those).
> > Also, when I query the position to my pipeline, it changes only when the
> video sink drop frames and display a new buffer.
> 
> With do-timestamp==TRUE and format==GST_FORMAT_TIME and
> sync==TRUE this should work in theory. basesrc will timestamp the buffers
> based on the current pipeline clock then. See the code in
> gstbasesrc.c:gst_base_src_do_sync().
> 
> This also outputs some debug information that might help finding the
> problem.
> 
> --
> Sebastian Dröge <sebastian at centricular.com> Centricular Ltd -
> http://www.centricular.com Expertise, Straight from the Source


More information about the gstreamer-devel mailing list