better resizing
[enigma2.git] / lib / dvb / pmt.h
index 995cc9be5b9dc4c821ce93d5fcb42596d814cb40..b7115ae2080ff84f5b46ff2d201cd2f765680cb5 100644 (file)
 #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 +37,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);
 };
 
@@ -61,11 +61,15 @@ class eDVBServicePMTHandler: public Object
        
        void channelStateChanged(iDVBChannel *);
        ePtr<eConnection> m_channelStateChanged_connection;
+       void channelEvent(iDVBChannel *, int event);
+       ePtr<eConnection> m_channelEvent_connection;
 
        void PMTready(int error);
        void PATready(int error);
        
        int m_use_decode_demux;
+       uint8_t m_decode_demux_num;
+       
 public:
        eDVBServicePMTHandler();
        ~eDVBServicePMTHandler();
@@ -78,7 +82,10 @@ public:
                eventNoPATEntry,   // no pat entry for the corresponding SID could be found
                eventNoPMT,        // no pmt could be received (timeout)
                eventNewProgramInfo, // we just received a PMT
-               eventTuned         // a channel was sucessfully (re-)tuned in, you may start additional filters now
+               eventTuned,        // a channel was sucessfully (re-)tuned in, you may start additional filters now
+               
+               eventSOF,          // seek pre start
+               eventEOF,          // a file playback did end
        };
 
        Signal1<void,int> serviceEvent;
@@ -106,6 +113,7 @@ public:
                // ca info
                int pcrPid;
                int pmtPid;
+               int textPid;
                bool isCrypted;
        };
        
@@ -118,7 +126,7 @@ public:
        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();
 };