Skip to content

Commit

Permalink
This is a complete rewrite of the buffering portion of ThreadedFileWr…
Browse files Browse the repository at this point in the history
…iter.

The implementation is simpler and will on average use less memory while  being able to expand the write buffer when necessary.

This could be more CPU efficient and could probably use a bit of tweaking.
  • Loading branch information
daniel-kristjansson committed May 8, 2011
1 parent 65418fa commit 780b7c5
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 378 deletions.
10 changes: 0 additions & 10 deletions mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
Expand Up @@ -2962,16 +2962,6 @@ void NuppelVideoRecorder::WriteVideo(VideoFrame *frame, bool skipsync,
if (freecount < 5)
raw = 1; // speed up the encode process

if (raw == 1 || compressthis == 0)
{
if (ringBuffer->IsIOBound())
{
/* need to compress, the disk can't handle any more bandwidth*/
raw=0;
compressthis=1;
}
}

if (transcoding)
{
raw = 0;
Expand Down

0 comments on commit 780b7c5

Please sign in to comment.