[mythtv] Dynamic Ringbuffer and prebuffering pauses.
bjm at lvcm.com
Sat Dec 2 22:35:13 UTC 2006
Stuart Auchterlonie wrote:
> On Sat, Dec 02, 2006 at 11:39:56AM +0000, Stuart Auchterlonie wrote:
>> One thing I have noticed while testing is that if the video is
>> lagging behind then frames are dropped to make the video catch up.
>> This is what I would expect to happen.
>> The problem i've noticed is that there is a delay between
>> the decision to drop frames and the frames being dropped.
I think that's the warp factor stuff.
>> This leads to NVP overshooting the targeted sync, and then
>> not having enough video frames to display, thus leading to
>> a prebuffer pause.
> I'll clarify what I mean by overshoot.
Understood. I think the averages don't get reset when it is
fudging. If you run mf -v playback there should be messages
when the diverge variables are out of bounds. I've seen
what you are talking about but I've never looked at this
code because it works well enough for me. Look for warp*,
diverge, avsync_avg, etc.
In my blocksize code, I used a weighted average but whenever
the blocksize changes, I center the average again so that it
will have to continue to go out of bounds anew before the
size would adjust again.
For this A/V sync stuff, it probably needs to take into account
that corrective action was taken and don't wait until it has
overcompensated for the averages to correct.
> Initially NVP is in the state where it requires frames to be
> dropped to correct the sync differences between audio and video.
> It drops frames until it believes the sync has been corrected,
> but shortly afterwards it hits the condition that the audio
> is lagging to much and thus frames have to be doubled to slow
> the video down to allow the audio to catch up.
> Make sense?
More information about the mythtv-dev