X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fbase%2Frawfile.h;h=a1c73d6ad6acae3001b4822a97fcbf207559f1c0;hb=c352487661e7927d0068ef8fa69765055ff488d8;hp=5d15e85dbc5dd4e0a74f50461f61e653cf596c53;hpb=8ef240801bf66e543cdea9df3b32fc09cebcc7e5;p=vuplus_dvbapp diff --git a/lib/base/rawfile.h b/lib/base/rawfile.h index 5d15e85..a1c73d6 100644 --- a/lib/base/rawfile.h +++ b/lib/base/rawfile.h @@ -9,7 +9,7 @@ public: eRawFile(); ~eRawFile(); - int open(const char *filename); + int open(const char *filename, int cached = 0); void setfd(int fd); off_t lseek(off_t offset, int whence); int close(); @@ -17,14 +17,18 @@ public: off_t length(); int valid(); private: - int m_fd; + int m_fd; /* for uncached */ + FILE *m_file; /* for cached */ + + int m_cached; std::string m_basename; - off_t m_splitsize, m_totallength, m_current_offset, m_base_offset; + off_t m_splitsize, m_totallength, m_current_offset, m_base_offset, m_last_offset; int m_nrfiles; void scan(); int m_current_file; int switchOffset(off_t off); - int openFile(int nr); + FILE *openFileCached(int nr); + int openFileUncached(int nr); }; #endif