[mythtv] mythtv-vid branch needs testing

Stuart Auchterlonie stuarta at squashedfrog.net
Tue Aug 14 19:47:15 UTC 2007


Mark Spieth wrote:
>> And that's an example of the A/V sync code overcompenstating which
>> causes stuttering of (alternately) audio & video. Although this is
>> a problem which exists in head as well.
>>
> Im not sure if my logic is correct but in NuppelVideoPlayer.cpp I changed 
> the following in HEAD and it seems ok. Im not sure if my logic is correct 
> though but I think it is, especially the 2nd part. (patch appended for 
> discussion purposes :-)
> I think the adjustment is supposed to be based on the output rate (screen 
> refresh), not the input rate.
> what do you think?
> Ive been running this for ages (over a year) and it seems ok when the rates 
> are not the same.
> 

This patch looks interesting. I'll give it a look over and try it out
on some of the content i have which exhibits the problem.


Stuart


> mark
> 
> @@ -2217,7 +2223,7 @@
> 
>              // Display the second field
>              videosync->AdvanceTrigger();
> -            videosync->WaitForFrame(0);
> +            videosync->WaitForFrame(avsync_adjustment);
>              if (!resetvideo)
>              {
>                  videoOutput->Show(ps);
> @@ -2245,8 +2251,12 @@
>          // If audio is way behind of video, adjust for it...
>          // by cutting the frame rate in half for the length of this frame
> 
> -        avsync_adjustment = frame_interval;
> +        //avsync_adjustment = frame_interval;
> +        avsync_adjustment = refreshrate;
>          lastsync = true;
>          VERBOSE(VB_PLAYBACK, LOC +
>                  QString("Video is %1 frames ahead of audio,\n"
>                          "\t\t\tdoubling video frame interval to slow 
> down.").arg(diverge));
> @@ -2255,7 +2265,7 @@
> 
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> 



More information about the mythtv-dev mailing list