1 #ifndef __lib_base_rawfile_h
2 #define __lib_base_rawfile_h
5 #include <lib/base/itssource.h>
7 class eRawFile: public iTsSource
14 int open(const char *filename, int cached = 0);
19 off_t lseek(off_t offset, int whence);
20 ssize_t read(off_t offset, void *buf, size_t count);
25 int m_fd; /* for uncached */
26 FILE *m_file; /* for cached */
28 std::string m_basename;
29 off_t m_splitsize, m_totallength, m_current_offset, m_base_offset, m_last_offset;
33 int switchOffset(off_t off);
35 off_t lseek_internal(off_t offset, int whence);
36 FILE *openFileCached(int nr);
37 int openFileUncached(int nr);