don't crash if time is *really* invalid
[enigma2.git] / lib / dvb / pmt.h
index aabac24dc0ef13a72b1f3f7399e54836896e145d..5149167ce31e10a4dab2127bdbd359967484d4c8 100644 (file)
@@ -6,6 +6,7 @@
 #include <lib/dvb/dvb.h>
 #include <lib/dvb/idemux.h>
 #include <lib/dvb/esection.h>
+#include <lib/python/python.h>
 #include <dvbsi++/program_map_section.h>
 #include <dvbsi++/program_association_section.h>
 
 #include <unistd.h>
 #include <fcntl.h>
 
-class eDVBServicePMTHandler;
+class eDVBCAService;
 
 typedef std::map<eServiceReferenceDVB, eDVBCAService*> CAServiceMap;
 
 class eDVBCAService: public Object
 {
        eServiceReferenceDVB m_service;
-       uint8_t m_used_demux[10];
+       uint8_t m_used_demux[32];
        unsigned int m_prev_build_hash;
 
        int m_sock, m_clilen; 
@@ -37,8 +38,8 @@ class eDVBCAService: public Object
        eDVBCAService();
        ~eDVBCAService();
 public:
-       static RESULT register_service( const eServiceReferenceDVB &ref, int demux_num, eDVBCAService *&caservice );
-       static RESULT unregister_service( const eServiceReferenceDVB &ref, int demux_num, eTable<ProgramMapSection> *ptr );
+       static RESULT register_service( const eServiceReferenceDVB &ref, int demux_nums[2], eDVBCAService *&caservice );
+       static RESULT unregister_service( const eServiceReferenceDVB &ref, int demux_nums[2], eTable<ProgramMapSection> *ptr );
        void buildCAPMT(eTable<ProgramMapSection> *ptr);
 };
 
@@ -68,6 +69,7 @@ class eDVBServicePMTHandler: public Object
        void PATready(int error);
        
        int m_use_decode_demux;
+       uint8_t m_decode_demux_num;
        
 public:
        eDVBServicePMTHandler();
@@ -83,6 +85,7 @@ public:
                eventNewProgramInfo, // we just received a PMT
                eventTuned,        // a channel was sucessfully (re-)tuned in, you may start additional filters now
                
+               eventSOF,          // seek pre start
                eventEOF,          // a file playback did end
        };
 
@@ -111,20 +114,24 @@ public:
                // ca info
                int pcrPid;
                int pmtPid;
+               int textPid;
                bool isCrypted;
        };
        
        int getProgramInfo(struct program &program);
        int getDataDemux(ePtr<iDVBDemux> &demux);
        int getDecodeDemux(ePtr<iDVBDemux> &demux);
+       PyObject *getCaIds();
        
        int getPVRChannel(ePtr<iDVBPVRChannel> &pvr_channel);
        int getService(eServiceReferenceDVB &service) { service = m_reference; return 0; }
        int getPMT(ePtr<eTable<ProgramMapSection> > &ptr) { return m_PMT.getCurrent(ptr); }
        int getChannel(eUsePtr<iDVBChannel> &channel);
 
-       int tune(eServiceReferenceDVB &ref, int use_decode_demux);
+       int tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *sg=0);
        void free();
+       
+       int m_pmt_pid;
 };
 
 #endif