[mythtv] DVD playback issues, patch

Davin McCall davmac at davmac.org
Mon Nov 23 01:10:02 UTC 2009

Slow reply, but...

On 16/11/09 13:32, Mark Spieth wrote:
> avsync_adjustment is used to advance or retard video the next time 
> through the loop (the call to AVSync()).
> it is 0 as only if the measured avdelay is too big does it get set 
> otherwise.
> it is always in integral # of frames at the rate being displayed, i.e. 
> the refresh rate.

Having looked at the code for quite a while now, I still can't 
understand why the avdelay needs to be an integral number of refresh 
intervals. The videosync object will make sure the frame is displayed 
during vertical retrace, regardless of what avdelay you feed it.

> avsync_adjustment is calculated by the avsync_delay. if this delay is 
> 1.5 frames ahead or behind, set avsync_adjustment such that the next 
> time through, a frame is doubled or skipped.

I understand what it's doing, I just don't understand:
- why it waits to be 1.5 frames ahead or behind before it adjusts
- why it adjusts by only one refresh interval

refresh interval != frame interval!!

> also if you want to handle bigger # frames simultaneously, then 
> avsync_adjustment would need to be multiples of the output frame rate 
> and be handled apropriately. all possible. ATM only 1 frame per pass 
> thorugh AVSync is allowed. thus double speed or 1/2 speed until in sync.

But why does avsync_adjustment need to be multiples of the  refresh rate??


More information about the mythtv-dev mailing list