X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/0e3e7773e5d8e7ff159316db3de7fcfad57bb9e8..239220f7ef72fe65d5e2289b19b2a0a5cf21a40f:/lib/dvb/pmt.h diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h index 185000d9..f34d761a 100644 --- a/lib/dvb/pmt.h +++ b/lib/dvb/pmt.h @@ -1,6 +1,7 @@ #ifndef __lib_dvb_dvbmid_h #define __lib_dvb_dvbmid_h +#ifndef SWIG #include #include #include @@ -19,10 +20,22 @@ 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 { + eSocketNotifier *m_sn; eServiceReferenceDVB m_service; uint8_t m_used_demux[32]; unsigned int m_prev_build_hash; @@ -34,18 +47,29 @@ class eDVBCAService: public Object eTimer 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); }; +#endif + class eDVBServicePMTHandler: public Object { +#ifndef SWIG friend class eDVBCAService; eServiceReferenceDVB m_reference; ePtr m_service; @@ -79,7 +103,14 @@ class eDVBServicePMTHandler: public Object public: eDVBServicePMTHandler(); ~eDVBServicePMTHandler(); - +#endif + +#ifdef SWIG +private: + eDVBServicePMTHandler(); +public: +#endif + enum { eventNoResources, // a requested resource couldn't be allocated @@ -92,8 +123,10 @@ 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; struct videoStream @@ -132,7 +165,7 @@ public: int teletext_magazine_number; // used for teletext subtitles }; std::string language_code; - bool operator<(const subtitleStream &s) + bool operator<(const subtitleStream &s) const { if (pid != s.pid) return pid < s.pid; @@ -146,12 +179,15 @@ public: { std::vector videoStreams; std::vector audioStreams; + int defaultAudioStream; std::vector subtitleStreams; std::set caids; int pcrPid; int pmtPid; int textPid; bool isCrypted() { return !caids.empty(); } + + PyObject *createPythonObject(); }; int getProgramInfo(struct program &program); @@ -171,6 +207,7 @@ public: private: bool m_have_cached_program; program m_cached_program; +#endif }; #endif