[mythtv] mythtv CVS Live Tv problems

Alan Gonzalez alandgonzalez at gmail.com
Sat Nov 13 00:29:54 UTC 2004

Found out some more on this 10 second delay going from None->LiveTV. 
BTW I'm using a pvr250 so this goes through the mpegrecorder flow.

Basically the extra check on the 'written' variable below is causing
the system to try harder than needed.  Earlier in 1.104, the
conditional "written >= tfw_min_write_size" wasn't there and my system
would behave normally.   With it, I have a lot more BufUsed checks
which lock/unlock a mutex and the DiskLoop is trying really hard to
get data which seems to cause everything to slow down.   Possibly this
could be 2.4 issue.... still it's not behaving nicely.

The CVS commit message makes it sound like this check helps  the
diskloop do less work (possibly for livetv->recording transition?),
yet in my case my RingBuffer::write can't get time to actually do any
writing to the ringbuffer causing the initial state of the variable
'size' to be zero for 5 seconds longer than without it.  Once 'size'
does have some data, the usleep comes into play and the system comes
back.   Here's the code section to refresh someones memory.

        if ((!in_dtor) &&
            (!flush) &&
            (((unsigned)size < tfw_min_write_size) && (written >=

On Fri, 12 Nov 2004 13:25:03 -0500, Alan Gonzalez
<alandgonzalez at gmail.com> wrote:
> The slow startup seems to have happened between 9/30 and 10/1.
> In the startup messages I see:
> 2004-11-12 13:18:34 Using protocol version 13
> 2004-11-12 13:18:43 detectInterlace(Detect Scan, Detect Scan, 29.97,
> 480) ->Interlaced Scan
> 2004-11-12 13:18:43 Interlaced: Interlaced Scan  video_height: 480  fps: 29.97
> As you can tell, it took 9 seconds to go from Using protocol message
> to detectInterlace.
> The diffs for this day show only ringbuffer.cpp -- going from 1.104 to 1.105
> http://cvs.mythtv.org/cgi-bin/viewcvs.cgi/mythtv/libs/libmythtv/RingBuffer.cpp?r1=1.104&r2=1.105
> Somebody have any insights into what this code is doing?

More information about the mythtv-dev mailing list