[mythtv-commits] mythtv commits

mythtv@ijr.dnsalias.org mythtv@ijr.dnsalias.org
Thu, 07 Nov 2002 04:20:02 -0500


----------------------------------------------------------------------------
Changes committed by john on Thu Nov  7 04:18:06 2002

Modified Files:
   in MC/libs/libNuppelVideo:
        NuppelVideoRecorder.cpp RingBuffer.cpp RingBuffer.h 
Log Message:

Fixes the "I/O bound meltdown" problem. 

 * Adds a 'ThreadedFileWriter' class, which the RingBuffer uses as a replacement for system write(). The threaded writer buffers the data and calls system write() from another thread - so RingBuffer->Write() no longer blocks, even during heavy I/O. This should allow better utilization of CPU and disk in parallel.

 * The RingBuffer now has an 'IsIOBound' function returning bool. This is pretty stupid, it's just based on how full the ThreadedFileWriter's buffer is. The recorder will only skip compressing the video when 'IsIOBound' returns false, otherwise it compresses the video frames to avoid generating more I/O.

----------------------------------------------------------------------------