tsdemux(of version 0.10.23) : new segment event problem

Vincent Génieux vincent.genieux at startigen.fr
Wed Mar 5 01:23:01 PST 2014


Le 2014-03-04 12:36, ShivaKumar a écrit :
> Lets say "x" is the pts of first video packet, so it has to be rendered 
> at
> the corresponding running time of the decoding pipeline's clock.
> 
> If you use pts of first audio packet(which has come early than the 
> first
> video with pts early by around ~35ms, which is my case) to calculate 
> the
> running time of first video packet, then you are actually postponing 
> the
> final pts of video by ~35ms.
> 
>  This goes like this
> 
>  ( x - (x-~35ms)) + base_time
> 
>   ~35ms + base_time
> 
> Then here also there is chance of a/v going out of sync. Am I right ..
> 
> 

Well, I am not sure to understand your formula.

The way the synchronization is done in 0.10 is available here :
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-synchronisation.txt?h=0.10

The formula is :
B.running_time = (B.timestamp - NS.start) / NS.abs_rate + NS.accum

In your case (I guess) :
- NS.accum = 0
- NS.abs_rate = 1
- NS.start = x
- B.timestamp = x

--
vincent.



More information about the gstreamer-devel mailing list