[mythtv] HD3000 buffer overrun solution -
patches for hdtvrecorder.cpp/.h against mythtv 0.16
John Patrick Poet
john at BlueSkyTours.com
Tue Dec 7 14:42:10 UTC 2004
Here is my version of a ringbuffer thread for hdtvrecorder. I had not
actually planned on posting this quite yet, but since this is now a hot
topic, here you go.
This is against the current CVS with Daniel's hdtvrecorder patch applied:
http://www.mrl.nyu.edu/~danielk/mythtv/hdtv-recorder-v35.tbz
I actually hope that Eric Anderson's version is more effective than
mine. I won't have a chance to test his for a couple of days, though.
Isaac's idea of creating a thread for the sole purpose of syncing the
file system helped a lot, but I still cannot consistently record three
shows while watching another for more than 90 minutes. I can record a
single show all night long without more than 4MB of ringbuffer being used.
Recording three shows simultaneously works great until a magic wall is
hit. Until that wall is hit, each of the three shows will use anywhere
from 1MB to 10MB of the ringbuffer. I have seen a recording use 10MB
only to fall back down and use less than 1MB. I have not done much
testing with only two shows recording.
Once this magic wall is hit, ringbuffer usage suddenly doubles up to
20MB for all three shows. Within 10 minutes it will be up to 50MB.
Within 5 minutes after that the ringbuffer usage is at 96MB (the max)
and things have gone to hell.
Before creating a separate thread for syncing the file system, that
magic wall occurred around 50 minutes into a show. After creating that
filesync thread, I don't hit that wall until 80 minutes in.
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hdringbuffer.patch
Type: text/x-patch
Size: 19951 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041207/dd3c6c39/hdringbuffer.bin
More information about the mythtv-dev
mailing list