X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/9a262588610fbdf0c7e8ad1c6fa393adcbc35399..37b38cb05fc6bc4993f852a78bdba93c7627cf5b:/lib/dvb/pmt.h diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h index d1e28703..ff0ef046 100644 --- a/lib/dvb/pmt.h +++ b/lib/dvb/pmt.h @@ -3,6 +3,7 @@ #ifndef SWIG #include +#include #include #include #include @@ -20,10 +21,23 @@ class eDVBCAService; class eDVBScan; +struct channel_data: public Object +{ + ePtr m_channel; + ePtr m_stateChangedConn; + int m_prevChannelState; + int m_dataDemux; +}; + +// TODO .. put all static stuff into a 'eDVBCAServiceHandler class' + typedef std::map CAServiceMap; +typedef std::map ChannelMap; class eDVBCAService: public Object { + eIOBuffer m_buffer; + ePtr m_sn; eServiceReferenceDVB m_service; uint8_t m_used_demux[32]; unsigned int m_prev_build_hash; @@ -32,14 +46,22 @@ class eDVBCAService: public Object struct sockaddr_un m_servaddr; unsigned int m_sendstate; unsigned char m_capmt[2048]; - eTimer m_retryTimer; + ePtr m_retryTimer; void sendCAPMT(); void Connect(); + void socketCB(int what); + static void DVBChannelAdded(eDVBChannel*); + static void DVBChannelStateChanged(iDVBChannel*); static CAServiceMap exist; + static ChannelMap exist_channels; + static ePtr m_chanAddedConn; + static channel_data *getChannelData(eDVBChannelID &chid); + eDVBCAService(); ~eDVBCAService(); public: + static void registerChannelCallback(eDVBResourceManager *res_mgr); 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 *ptr ); void buildCAPMT(eTable *ptr); @@ -56,7 +78,7 @@ class eDVBServicePMTHandler: public Object int m_last_channel_state; eDVBCAService *m_ca_servicePtr; - eDVBScan *m_dvb_scan; // for sdt scan + ePtr m_dvb_scan; // for sdt scan eAUTable > m_PMT; eAUTable > m_PAT; @@ -103,6 +125,8 @@ public: 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 serviceEvent; @@ -180,7 +204,7 @@ public: int getChannel(eUsePtr &channel); void resetCachedProgram() { m_have_cached_program = false; } - int tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *sg=0); + int tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *sg=0, bool simulate=false); void free(); private: bool m_have_cached_program;