Ticket #9437: 9437_remote_dvd_speedup_v1.diff

File 9437_remote_dvd_speedup_v1.diff, 1.4 KB (added by cpinkham, 12 years ago)
  • mythtv/libs/libmythtv/fileringbuffer.cpp

    diff --git a/mythtv/libs/libmythtv/fileringbuffer.cpp b/mythtv/libs/libmythtv/fileringbuffer.cpp
    index a3b73f3..7c4ca4e 100644
    a b long long FileRingBuffer::Seek(long long pos, int whence, bool has_lock) 
    615628            poslock.unlock();
    616629            generalWait.wakeAll();
    617630            ateof = false;
    618             readsallowed = false;
     631            readsallowed = true; // we have the data already so why wait?
    619632            if (!has_lock)
    620633                rwlock.unlock();
    621634            return new_pos;
  • mythtv/libs/libmythtv/mythiowrapper.cpp

    diff --git a/mythtv/libs/libmythtv/mythiowrapper.cpp b/mythtv/libs/libmythtv/mythiowrapper.cpp
    index 9528554..52c9466 100644
    a b int mythfile_open(const char *pathname, int flags) 
    170170        RingBuffer *rb = NULL;
    171171        RemoteFile *rf = NULL;
    172172
    173         if ((fileinfo.st_size < 51200) &&
     173        // may want to remove this RemoteFile vs RingBuffer optimization
     174        // totally since the dvdnav code seems to re-read the same blocks
     175        // over and over again sometimes and that use case is not optimized
     176        // in RemoteFile but is in RingBuffer.
     177        if ((fileinfo.st_size < 512) &&
    174178            (fileinfo.st_mtime < (time(NULL) - 300)))
    175179        {
    176180            if (flags & O_WRONLY)