X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/0e3e7773e5d8e7ff159316db3de7fcfad57bb9e8..a22c31de792a36f645c9c91d954e9d8e30f82064:/lib/dvb/pmt.h diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h index 185000d9..9e7c5274 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,7 +20,18 @@ 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 { @@ -35,17 +47,27 @@ class eDVBCAService: public Object void sendCAPMT(); void Connect(); + 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 +101,14 @@ class eDVBServicePMTHandler: public Object public: eDVBServicePMTHandler(); ~eDVBServicePMTHandler(); - +#endif + +#ifdef SWIG +private: + eDVBServicePMTHandler(); +public: +#endif + enum { eventNoResources, // a requested resource couldn't be allocated @@ -93,7 +122,7 @@ public: eventSOF, // seek pre start eventEOF, // a file playback did end }; - +#ifndef SWIG Signal1 serviceEvent; struct videoStream @@ -132,7 +161,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 +175,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 +203,7 @@ public: private: bool m_have_cached_program; program m_cached_program; +#endif }; #endif