Mailing List archive

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

[vdr] Re: Recordings menu sluggish - *the real* solution. :-)



Am Sonntag, 5. Oktober 2003 19:16 schrieben Sie:
> Michael Hoffmann wrote:
> ...
>
> > It works very good :-)
> > My VDR runs on a Vanilla Linux 2.4.22 + the O_STREAMING patch from:
> > http://groups.google.com/groups?selm=1034044736.29463.318.camel%40phantas
> >y&output=gplain The cache does not fill up with the nnn.vdr files. If i
> > exit a playing movie the Recordings menu is there without a long search
> > on the disk. Seeking in the movie does not show any changes.
>
> What about recording (writing)?

Recording is now fixed. It does not fill the cache anymore. On my vdr 
timeshifting make no problemes with the patch, but on very slow PCs you can 
get problems with the diskspeed. 

-- 
Michael

Updated patch, thanks to Stefan Huelswitt for his hints.

diff -Nru VDR/recording.c vdr_patched/recording.c
--- VDR/recording.c     2003-08-17 11:10:46.000000000 +0200
+++ vdr_patched/recording.c     2003-10-05 21:03:31.000000000 +0200
@@ -21,6 +21,8 @@
 #include "tools.h"
 #include "videodir.h"

+#define O_STREAMING 04000000 // necessary until the glibc knows O_STREAMING
+
 #define RECEXT       ".rec"
 #define DELEXT       ".del"
 /* This was the original code, which works fine in a Linux only environment.
@@ -831,7 +833,7 @@
         else if (!Record)
            isyslog("missing index file %s", fileName);
         if (Record) {
-           if ((f = open(fileName, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | 
S_IWUSR | S_IRGRP | S_IROTH)) >= 0) {
+           if ((f = open(fileName, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | 
S_IWUSR | S_IRGRP | S_IROTH | O_STREAMING)) >= 0) {
               if (delta) {
                  esyslog("ERROR: padding index file with %d '0' bytes", 
delta);
                  while (delta--)
@@ -1034,14 +1036,14 @@
      int BlockingFlag = blocking ? 0 : O_NONBLOCK;
      if (record) {
         dsyslog("recording to '%s'", fileName);
-        file = OpenVideoFile(fileName, O_RDWR | O_CREAT | BlockingFlag);
+        file = OpenVideoFile(fileName, O_RDWR | O_CREAT | BlockingFlag | 
O_STREAMING);
         if (file < 0)
            LOG_ERROR_STR(fileName);
         }
      else {
         if (access(fileName, R_OK) == 0) {
            dsyslog("playing '%s'", fileName);
-           file = open(fileName, O_RDONLY | BlockingFlag);
+           file = open(fileName, O_RDONLY | BlockingFlag | O_STREAMING);
            if (file < 0)
               LOG_ERROR_STR(fileName);
            }



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index