pmt.h: add missing const modifier to capid_pair
[vuplus_dvbapp] / lib / dvb / pmt.h
index 9e7c527..86b634f 100644 (file)
@@ -3,6 +3,7 @@
 
 #ifndef SWIG
 #include <map>
+#include <lib/base/buffer.h>
 #include <lib/dvb/idvb.h>
 #include <lib/dvb/dvb.h>
 #include <lib/dvb/idemux.h>
@@ -35,6 +36,8 @@ typedef std::map<iDVBChannel*, channel_data*> ChannelMap;
 
 class eDVBCAService: public Object
 {
+       eIOBuffer m_buffer;
+       ePtr<eSocketNotifier> m_sn;
        eServiceReferenceDVB m_service;
        uint8_t m_used_demux[32];
        unsigned int m_prev_build_hash;
@@ -43,9 +46,10 @@ class eDVBCAService: public Object
        struct sockaddr_un m_servaddr;
        unsigned int m_sendstate;
        unsigned char m_capmt[2048];
-       eTimer m_retryTimer;
+       ePtr<eTimer> m_retryTimer;
        void sendCAPMT();
        void Connect();
+       void socketCB(int what);
 
        static void DVBChannelAdded(eDVBChannel*);
        static void DVBChannelStateChanged(iDVBChannel*);
@@ -74,7 +78,7 @@ class eDVBServicePMTHandler: public Object
 
        int m_last_channel_state;
        eDVBCAService *m_ca_servicePtr;
-       eDVBScan *m_dvb_scan; // for sdt scan
+       ePtr<eDVBScan> m_dvb_scan; // for sdt scan
 
        eAUTable<eTable<ProgramMapSection> > m_PMT;
        eAUTable<eTable<ProgramAssociationSection> > m_PAT;
@@ -119,8 +123,11 @@ public:
                eventNewProgramInfo, // we just received a PMT
                eventTuned,        // a channel was sucessfully (re-)tuned in, you may start additional filters now
                
+               eventPreStart,     // before start filepush thread
                eventSOF,          // seek pre start
                eventEOF,          // a file playback did end
+               
+               eventMisconfiguration, // a channel was not found in any list, or no frontend was found which could provide this channel
        };
 #ifndef SWIG
        Signal1<void,int> serviceEvent;
@@ -129,14 +136,15 @@ public:
        {
                int pid;
                int component_tag;
-               enum { vtMPEG2, vtMPEG4_H264 };
+               enum { vtMPEG2, vtMPEG4_H264, vtMPEG1, vtMPEG4_Part2, vtVC1, vtVC1_SM };
                int type;
        };
        
        struct audioStream
        {
-               int pid;
-               enum { atMPEG, atAC3, atDTS, atAAC };
+               int pid,
+                   rdsPid; // hack for some radio services which transmit radiotext on different pid (i.e. harmony fm, HIT RADIO FFH, ...)
+               enum { atMPEG, atAC3, atDTS, atAAC, atAACHE, atLPCM };
                int type; // mpeg2, ac3, dts, ...
                
                int component_tag;
@@ -173,23 +181,28 @@ public:
 
        struct program
        {
+               struct capid_pair
+               {
+                       uint16_t caid;
+                       int capid;
+                       bool operator< (const struct capid_pair &t) const { return t.caid < caid; }
+               };
                std::vector<videoStream> videoStreams;
                std::vector<audioStream> audioStreams;
                int defaultAudioStream;
                std::vector<subtitleStream> subtitleStreams;
-               std::set<uint16_t> caids;
+               std::list<capid_pair> caids;
                int pcrPid;
                int pmtPid;
                int textPid;
                bool isCrypted() { return !caids.empty(); }
-               
                PyObject *createPythonObject();
        };
 
-       int getProgramInfo(struct program &program);
+       int getProgramInfo(program &program);
        int getDataDemux(ePtr<iDVBDemux> &demux);
        int getDecodeDemux(ePtr<iDVBDemux> &demux);
-       PyObject *getCaIds();
+       PyObject *getCaIds(bool pair=false); // caid / ecmpid pair
        
        int getPVRChannel(ePtr<iDVBPVRChannel> &pvr_channel);
        int getServiceReference(eServiceReferenceDVB &service) { service = m_reference; return 0; }
@@ -198,7 +211,12 @@ public:
        int getChannel(eUsePtr<iDVBChannel> &channel);
        void resetCachedProgram() { m_have_cached_program = false; }
 
-       int tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *sg=0);
+       /* deprecated interface */
+       int tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0);
+
+       /* new interface */
+       int tuneExt(eServiceReferenceDVB &ref, int use_decode_demux, ePtr<iTsSource> &, const char *streaminfo_file, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0);
+
        void free();
 private:
        bool m_have_cached_program;