Support turbo2.
[vuplus_dvbapp] / lib / dvb / tstools.h
index c230a34..9d66efc 100644 (file)
@@ -4,6 +4,7 @@
 #include <sys/types.h>
 #include <lib/dvb/pvrparse.h>
 #include <lib/base/rawfile.h>
+#include <lib/base/elock.h>
 
 /*
  * Note: we're interested in PTS values, not STC values.
@@ -18,9 +19,12 @@ public:
        eDVBTSTools();
        ~eDVBTSTools();
 
+       void setSource(ePtr<iTsSource> &source, const char *streaminfo_filename=NULL);
+       void closeSource();
+
        int openFile(const char *filename, int nostreaminfo = 0);
        void closeFile();
-       
+
        void setSyncPID(int pid);
        void setSearchRange(int maxrange);
        
@@ -70,14 +74,14 @@ public:
        
        return values are the new offset, the length of the found frame (both unaligned), and the (signed) 
        number of frames skipped. */
-       int findFrame(off_t &offset, size_t &len, int &direction, int frame_types = frametypeI);
+       int findFrame(off_t &_iframe_offset, off_t &offset, size_t &len, int &direction, int frame_types = frametypeI);
        int findNextPicture(off_t &offset, size_t &len, int &distance, int frame_types = frametypeAll);
 private:
        int m_pid;
        int m_maxrange;
-       
-       eRawFile m_file;
-       
+
+       ePtr<iTsSource> m_source;
+
        int m_begin_valid, m_end_valid;
        pts_t m_pts_begin, m_pts_end;
        off_t m_offset_begin, m_offset_end;