[mythtv-users] Getting lots of jitter with version 0.24

Neil Salstrom salstrom at gmail.com
Wed Nov 24 19:50:14 UTC 2010


On Tue, Nov 23, 2010 at 3:45 PM, Jean-Yves Avenard <jyavenard at gmail.com> wrote:
> Hi
>
> On 24 November 2010 10:13, Neil Salstrom <salstrom at gmail.com> wrote:
>
>> I just tried applying these against 0.24-fixes (svn 27327) and had some issues.
>>
>> mythtv_smoothsync.13.patch gives the following:
>>
>> patching file mythtv/libs/libmythtv/mythplayer.cpp
>> Hunk #1 succeeded at 238 (offset 2 lines).
>> Hunk #2 succeeded at 877 (offset 7 lines).
>> Hunk #3 succeeded at 1638 (offset 29 lines).
>> Hunk #4 succeeded at 1686 (offset 29 lines).
>> Hunk #5 succeeded at 1751 (offset 29 lines).
>> Hunk #6 FAILED at 1777.
>> Hunk #7 succeeded at 1840 with fuzz 2 (offset 32 lines).
>> Hunk #8 succeeded at 1874 (offset 32 lines).
>> Hunk #9 succeeded at 1884 (offset 32 lines).
>> Hunk #10 succeeded at 1957 with fuzz 1 (offset 32 lines).
>> Hunk #11 succeeded at 3598 (offset 63 lines).
>> 1 out of 11 hunks FAILED -- saving rejects to file
>> mythtv/libs/libmythtv/mythplayer.cpp.rej
>> patching file mythtv/libs/libmythtv/mythplayer.h
>> Hunk #1 succeeded at 515 (offset 6 lines).
>> Hunk #2 succeeded at 706 (offset 9 lines).
>
> It's because of http://svn.mythtv.org/trac/changeset/27321
>
> very easy to correct the patch
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Ok, I know pretty much nothing about any of this but I've spent a bit
of time looking over the patch verses mythplayer.cpp.  The section of
mythplayer.cpp that is addressed by Hunk #6 states:

        // if we get here, we're actually going to do video output
        osdLock.lock();
        videoOutput->PrepareFrame(buffer, ps, osd);
        osdLock.unlock();
        VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, QString("AVSync waitforframe %1 %2")
                .arg(avsync_adjustment).arg(m_double_framerate));
        videosync->WaitForFrame(frameDelay + avsync_adjustment + repeat_delay);
        VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, "AVSync show");
        videoOutput->Show(ps);

The patch states:

@@ -1712,10 +1777,11 @@ void MythPlayer::AVSync(VideoFrame *buffer,
bool limit_delay)
         // if we get here, we're actually going to do video output
         videoOutput->PrepareFrame(buffer, ps, osd);

-        VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, QString("AVSync waitforframe %1 %2")
+        VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, LOC + QString("AVSync
waitforframe %1 %2")
                 .arg(avsync_adjustment).arg(m_double_framerate));
-        videosync->WaitForFrame(frameDelay + avsync_adjustment + repeat_delay);
-        VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, "AVSync show");
+        vsync_delay_clock = videosync->WaitForFrame(frameDelay +
avsync_adjustment + repeat_delay);
+        currentaudiotime = AVSyncGetAudiotime();
+        VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, LOC + "AVSync show");
         videoOutput->Show(ps);

Does this mean I need to adjust the first few lines of the patch to read:

@@ -1712,10 +1777,11 @@ void MythPlayer::AVSync(VideoFrame *buffer,
bool limit_delay)
         // if we get here, we're actually going to do video output
         osdLock.lock();
         videoOutput->PrepareFrame(buffer, ps, osd);

The only thing that I can find is the fact the code has the addition
of the osdLock.lock(); line when the patch does not.  Is that what
causes it to fail?

Thanks,

Neil


More information about the mythtv-users mailing list