Need to set a clock in gstreamer pipeline that are comaprable to PTS values.

Tim Müller tim at centricular.com
Thu Dec 5 23:47:43 PST 2013


Hi,

not sure what you're after exactly. You just want the pts values of the buffers rather than the position?

The position query will always return a value 
between 0 and the duration.

You can use the last-sample property (last-buffer in 0.10) to retrieve the last buffer and get the pts from that, but that rarely makes sense and might not be a monotonically increasing value or match the values in the bitstream.

Cheers
 -Tim

----- Original message -----
> Need to set a clock in gstreamer pipeline that are comaprable to PTS
> values.
> 
> *Issue*
> Whenever I query my pipeline using below query position API, I get the
> gstreamer default values.
> 
> 
>   gint64 pos;
>   GstFormat fmt = GST_FORMAT_TIME;
>   gst_element_query_position ((GstElement*) myPipeline, &fmt, &pos);
> 
> 
> However I set the buffers the pipeline is going to play using buffer
> stamp API below.
> 
> This is according to
> 
>     GST_BUFFER_TIMESTAMP(myBuffer) = (ptsValue);
> 
> 
> Is there a type of GstClock that will make sure the element query
> position returns values of the PTS last played not the default values?



More information about the gstreamer-devel mailing list