[vlc-devel] Input MainLoop deadline

Rémi Denis-Courmont remi at remlab.net
Thu Jan 2 12:14:35 CET 2014

Le jeudi 2 janvier 2014, 02:27:32 Francois Cartegnie a écrit :
> One fix is done at ES_OUT_SET_TIMES level which removes the buffering
> value from the GET_TIME, when buffering. But this doesn't updates
> POSITION or LENGTH. We'll always have strange behavior in UI regarding
> position and time then.

There is no solution to this problem. Only the demuxer knows the correlation 
between position and time, and current read offset, but the demuxer does not 
know the buffering and (at least audio) output latency.

Ultimately, the only way to get the current time in time unit, is to query it 
from one of the output (or close enough, so yeah maybe ES output). I believe 
that is how all other media players operate.

> I guess a way to deal with this would be to track position on blocks
> accordingly (pts being already time), but is that doable by design ?

You could keep the original PTS in blocks. But I doubt this will really help 
for this specific case. Not all demuxers use 0-based PTS's for a start.

Rémi Denis-Courmont

More information about the vlc-devel mailing list