Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: [PATCH] Reduce CPU usage during playback



At Freitag, 13. Juni 2003 19:15 Jon Burgess wrote:
> Here is an experimental two line patch which dramatically reduces the
> CPU load of VDR during playback (not live video). For me, this reduces
> the CPU load for video playback from around 40% to <10%. The CPU load
> for audio drops even more, from around 30% to <1%.

I've encountered this behaviour ONLY when replaying MPEG1-Files put into the 
VDR structure with correct index.vdr (which comes from a modifies genindex 
which I think is not available yet for creating correct MPEG1 indices). The 
following patch solved this issue for me.

Remarkable is, that this patch applies at a completely different location 
(Poller GETS data, but no playFrame is available afterwards) and drops CPU 
usage from about 50% (Duron 900MHz) to the usual 1-2% again. I've had no 
problems with VDR recordings so far!

Anyone with a little more time than me (too much going on currently) who 
might want to investigate this?!

@Klaus: Or would you include this one right away? It seems that waiting a 
microsecond when no work has to be done is a common practise in VDR :-)))

Greetings, 
Sascha Volkenandt
--- vdr-1.2.1/dvbplayer.c	2003-05-24 11:04:26.000000000 +0200
+++ vdr-vanilla-remux/dvbplayer.c	2003-06-13 16:23:06.000000000 +0200
@@ -542,7 +542,9 @@
                  playFrame = NULL;
                  p = NULL;
                  }
-              }
+              } 
+            else
+              usleep(1);
            }
         }
   active = running = false;

Home | Main Index | Thread Index