Timestamp problem...

Sebastian Dröge sebastian at centricular.com
Tue Nov 26 00:16:07 PST 2013


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131126/b8f59bfb/attachment-0001.pgp>


More information about the gstreamer-devel mailing list