Fix default recording path and usb recording.
[vuplus_dvbapp] / lib / dvb / pvrparse.h
old mode 100644 (file)
new mode 100755 (executable)
index 28c0314..5f99700
@@ -14,6 +14,9 @@ class eMPEGStreamInformation
 public:
        eMPEGStreamInformation();
        ~eMPEGStreamInformation();
+
+       void writeClose();
+       void readClose();
                /* we order by off_t here, since the timestamp may */
                /* wrap around. */
                /* we only record sequence start's pts values here. */
@@ -47,8 +50,10 @@ public:
        off_t getAccessPoint(pts_t ts, int marg=0);
        
        int getNextAccessPoint(pts_t &ts, const pts_t &start, int direction);
-       
-       bool empty();
+
+       bool hasAccessPoint() { return !m_access_points.empty(); }
+
+       bool hasStructure() { return !m_structure_read ? false : true; }
        
        typedef unsigned long long structure_data;
                /* this is usually:
@@ -61,9 +66,12 @@ public:
                   optionall, return next element. Offset will be returned. this allows you to easily 
                   get previous and next structure elements. */
        int getStructureEntry(off_t &offset, unsigned long long &data, int get_next);
+       int getStructureEntry_next(off_t &offset, unsigned long long &data);
+       int getStructureEntry_prev(off_t &offset, unsigned long long &data);
+       int update_structure_cache_entries(off_t offset);
 
        std::string m_filename;
-       int m_structure_cache_valid;
+       int m_structure_cache_entries;
        unsigned long long m_structure_cache[1024];
        FILE *m_structure_read, *m_structure_write;
 };
@@ -76,6 +84,7 @@ public:
        void parseData(off_t offset, const void *data, unsigned int len);
        void setPid(int pid, int streamtype);
        int getLastPTS(pts_t &last_pts);
+       void enableAccessPoints(bool enable) { m_enable_accesspoints = enable; }
 private:
        eMPEGStreamInformation &m_streaminfo;
        unsigned char m_pkt[188];
@@ -87,6 +96,7 @@ private:
        int m_skip;
        int m_last_pts_valid;
        pts_t m_last_pts;
+       bool m_enable_accesspoints;
 };
 
 #endif