X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fdvb%2Ftstools.h;h=4bc04729c42056c3ab645ce46cb5a56249f0cb2f;hb=a34ef895210161a8820e96829ac87806566e7858;hp=76128071dcca786ecd7749b813535c13dfe2b95d;hpb=2c0fdda82ac02f8436816236b4649819274d1c95;p=vuplus_dvbapp diff --git a/lib/dvb/tstools.h b/lib/dvb/tstools.h index 7612807..4bc0472 100644 --- a/lib/dvb/tstools.h +++ b/lib/dvb/tstools.h @@ -3,6 +3,7 @@ #include #include +#include /* * Note: we're interested in PTS values, not STC values. @@ -17,7 +18,7 @@ public: eDVBTSTools(); ~eDVBTSTools(); - int openFile(const char *filename); + int openFile(const char *filename, int nostreaminfo = 0); void closeFile(); void setSyncPID(int pid); @@ -39,7 +40,7 @@ public: int fixupPTS(const off_t &offset, pts_t &pts); /* get (approximate) offset corresponding to PTS */ - int getOffset(off_t &offset, pts_t &pts); + int getOffset(off_t &offset, pts_t &pts, int marg=0); int getNextAccessPoint(pts_t &ts, const pts_t &start, int direction); @@ -50,16 +51,28 @@ public: int calcBitrate(); /* in bits/sec */ + void takeSamples(); + int takeSample(off_t off, pts_t &p); + + int findPMT(int &pmt_pid, int &service_id); private: - int m_fd, m_pid; + int m_pid; int m_maxrange; + eRawFile m_file; + int m_begin_valid, m_end_valid; pts_t m_pts_begin, m_pts_end; off_t m_offset_begin, m_offset_end; + /* for simple linear interpolation */ + std::map m_samples; + int m_samples_taken; + eMPEGStreamInformation m_streaminfo; int m_use_streaminfo; + off_t m_last_filelength; + int m_futile; }; #endif