[mythtv] Patch for "fixme" in NuppelVideoRecorder.cpp

rob mythtv-dev@snowman.net
Fri, 15 Nov 2002 09:53:32 -0600


This is a multi-part message in MIME format.
--------------010105070407090702040307
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Here's a patch to fix the block of code in NuppelVideoRecorder.cpp that 
has the comment "count free buffers -- FIXME this can be done with less 
CPU time!!"  It just adds a member variable to the class that keeps 
track of the free buffers, instead of counting them in the loop every 
time in the function.


Also, in what case(s) is it necessary to have the thread for writing 
data to the disk (ThreadedFileWriter)?  The implementation is a ring 
buffer that has data added when Write() is called, then sending that 
data to the disk in another thread.  Doesn't the write() system call 
just dump the data to kernel buffers, where it is written when it can 
be?  The extra thread and memcpy's to implement the ring buffer stuff 
may not be necessary.  I didn't notice any difference in performance 
when I removed all of the ThreadedFileWriter code and just had system 
write() calls.

--------------010105070407090702040307
Content-Type: application/gzip;
 name="patch_nvr_fixme.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="patch_nvr_fixme.gz"

H4sICBQW1T0CA3BhdGNoX252cl9maXhtZQCtV21z2kYQ/mx+xSYfGrAkLCEwGILHTounnknS
1knaTjMeRogDaSok9XSy63rc3969F4lDKDbGvQ/cod199vVu7+bhYgFWTmF1xwJ2Y9nt/lEU
zjL+8zFPUxL9Gs5JcqStr4if0DmhbT9NNbF2TG6fI9qwLGtPrQcd2+5YjmPZfbDdoTMY2r22
XQyw7GPbbhiG8QLrShVOD+yTYbcz7LlbKs7OwDo5No/BwN8BnJ01gI80TGEMCy/KyKgB8tsN
V3ARRozQ92HGkP769ahhNAxFnOWLBSWEJXxBKNJtlH3g4jUWDof/1nxt3iThvCWscrsDbpbb
s82+sKsBnFiPdRmH7J1QmykIuH/CMD4WCYVmGDMIxUec3ko3p5J16id5zPC7YbSkxL2cNGRC
2V1K4FD+RRxM0yZtJP3p9aQ/A+XPJo51mnmrNCKadTqRO/A5mcR+Mn+c5V3ho4O5Odj23jDW
ohsYR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