[vlc-devel] Re: commit: Remove non-sensical NPT c omputation code from c9569b35. ( Rémi Denis- Courmont )

JiangFeihu FeihuJiang at huawei.com
Sat Jul 26 09:19:10 CEST 2008


Very glad to see below. 
but when VLC initial offset between PTS and VLC wall clock? 
at the time when VLC present the first picture frame or the first audio sample?

Does VLC really realize it?

> Perhaps the solution would be for VLC to maintain an offset - for 
> each RTP stream - between the PTS that it reports and 'wall clock 
> time'.  I.e., do something like (pseudocode):
> 
> int64_t ptsToUse;
> int64_t ptsWallClockOffset = 0;
> bool haveSeenFirstValidPTS = false;
> 
> if (!haveSeenFirstValidPTS && 
> tk->sub->rtpSource()->hasBeenSynchronizedUsingRTCP()) {
> /* This is the first RTCP-synched reported PTS => set 
> "ptsWallClockOffset" */
> ptsWallClockOffset = gettimeofday() - reportedPTS;
> haveSeenFirstValidPTS = true;
> }
> ptsToUse = reportedPTS + ptsWallClockOffset;
> 








More information about the vlc-devel mailing list