insert cutmark on EIT change
[enigma2.git] / lib / dvb / pvrparse.h
index 5ca6263d3a957ab80eb2f6aba2fbc9280a99115d..94f9f67fddc2590cc492cb31f9c38a746cbe2ea9 100644 (file)
@@ -19,7 +19,10 @@ public:
                /* timestampDelta is in fact the difference between */
                /* the PTS in the stream and a real PTS from 0..max */
        std::map<off_t, pts_t> m_timestamp_deltas;
-       
+
+               /* these are non-fixed up pts value (like m_access_points), just used to accelerate stuff. */
+       std::multimap<pts_t, off_t> m_pts_to_offset; 
+
        int save(const char *filename);
        int load(const char *filename);
        
@@ -29,14 +32,19 @@ public:
                /* get delta at specific offset */
        pts_t getDelta(off_t offset);
        
-               /* fixup timestamp near offset */
-       pts_t fixuppts_t(off_t offset, pts_t ts);
+               /* fixup timestamp near offset, i.e. convert to zero-based */
+       int fixupPTS(const off_t &offset, pts_t &ts);
+
+               /* get PTS before offset */     
+       int getPTS(off_t &offset, pts_t &pts);
        
                /* inter/extrapolate timestamp from offset */
        pts_t getInterpolated(off_t offset);
        
        off_t getAccessPoint(pts_t ts);
        
+       int getNextAccessPoint(pts_t &ts, const pts_t &start, int direction);
+       
        bool empty();
 };
 
@@ -47,6 +55,7 @@ public:
        eMPEGStreamParserTS(eMPEGStreamInformation &streaminfo);
        void parseData(off_t offset, const void *data, unsigned int len);
        void setPid(int pid);
+       int getLastPTS(pts_t &last_pts);
 private:
        eMPEGStreamInformation &m_streaminfo;
        unsigned char m_pkt[188];
@@ -56,6 +65,8 @@ private:
        int m_pid;
        int m_need_next_packet;
        int m_skip;
+       int m_last_pts_valid;
+       pts_t m_last_pts;
 };
 
 #endif