X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb%2Fpmt.h;h=98ace2b0591a7d0c258ed0ec73e35c716898016e;hp=1888e05417fcd3e2ba9458d3d5e9b6fe80d176b3;hb=59df7d4b4fc7d1740f30d36290553972c4a3a652;hpb=ba5fcab217438b995c1f903e0294b71d1411668b diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h index 1888e05..98ace2b 100644 --- a/lib/dvb/pmt.h +++ b/lib/dvb/pmt.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -21,6 +22,26 @@ class eDVBCAService; class eDVBScan; +#include +class OCSection : public LongCrcSection +{ +protected: + void *data; + +public: + OCSection(const uint8_t * const buffer) + : LongCrcSection(buffer) + { + data = malloc(getSectionLength()); + memcpy(data, buffer, getSectionLength()); + } + ~OCSection() + { + free(data); + } + void *getData() { return data; } +}; + struct channel_data: public Object { ePtr m_channel; @@ -69,6 +90,27 @@ public: #endif +#include +#include +class HbbTVApplicationInfo +{ +public: + int m_OrgId; + int m_AppId; + int m_ControlCode; + short m_ProfileCode; + std::string m_HbbTVUrl; + std::string m_ApplicationName; +public: + HbbTVApplicationInfo(int controlCode, int orgid, int appid, std::string hbbtvUrl, std::string applicationName, int profileCode) + : m_ControlCode(controlCode), m_HbbTVUrl(hbbtvUrl), m_ApplicationName(applicationName), m_OrgId(orgid), + m_AppId(appid), m_ProfileCode(profileCode) + {} +}; +typedef std::list HbbTVApplicationInfoList; +typedef HbbTVApplicationInfoList::iterator HbbTVApplicationInfoListIterator; +typedef HbbTVApplicationInfoList::const_iterator HbbTVApplicationInfoListConstIterator; + class eDVBServicePMTHandler: public Object { #ifndef SWIG @@ -86,8 +128,8 @@ class eDVBServicePMTHandler: public Object eUsePtr m_channel; eUsePtr m_pvr_channel; ePtr m_resourceManager; - ePtr m_demux; - + ePtr m_demux, m_pvr_demux_tmp; + void channelStateChanged(iDVBChannel *); ePtr m_channelStateChanged_connection; void channelEvent(iDVBChannel *, int event); @@ -95,14 +137,27 @@ class eDVBServicePMTHandler: public Object void SDTScanEvent(int); ePtr m_scan_event_connection; + eAUTable > m_AIT; + eAUTable > m_OC; + void PMTready(int error); void PATready(int error); int m_pmt_pid; + void AITready(int error); + void OCready(int error); + int m_dsmcc_pid; + int m_ait_pid; + HbbTVApplicationInfoList m_HbbTVApplications; + std::string m_HBBTVUrl; + std::string m_ApplicationName; + unsigned char m_AITData[4096]; + int m_use_decode_demux; uint8_t m_decode_demux_num; ePtr m_no_pat_entry_delay; + uint8_t mDemuxId; public: eDVBServicePMTHandler(); ~eDVBServicePMTHandler(); @@ -128,6 +183,8 @@ public: eventSOF, // seek pre start eventEOF, // a file playback did end + eventHBBTVInfo, /* HBBTV information was detected in the AIT */ + eventMisconfiguration, // a channel was not found in any list, or no frontend was found which could provide this channel }; #ifndef SWIG @@ -145,7 +202,7 @@ public: { 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, atDTSHD }; + enum { atMPEG, atAC3, atDTS, atAAC, atAACHE, atLPCM, atDTSHD, atDDP }; int type; // mpeg2, ac3, dts, ... int component_tag; @@ -196,6 +253,7 @@ public: int pcrPid; int pmtPid; int textPid; + int aitPid; bool isCrypted() { return !caids.empty(); } PyObject *createPythonObject(); }; @@ -204,6 +262,7 @@ public: int getDataDemux(ePtr &demux); int getDecodeDemux(ePtr &demux); PyObject *getCaIds(bool pair=false); // caid / ecmpid pair + PyObject *getHbbTVApplications(void); int getPVRChannel(ePtr &pvr_channel); int getServiceReference(eServiceReferenceDVB &service) { service = m_reference; return 0; } @@ -213,16 +272,20 @@ public: void resetCachedProgram() { m_have_cached_program = false; } void sendEventNoPatEntry(); + void getHBBTVUrl(std::string &ret) { ret = m_HBBTVUrl; } + void getDemuxID(int &id) { id = mDemuxId; } + /* 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 &, const char *streaminfo_file, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0); + int tuneExt(eServiceReferenceDVB &ref, int use_decode_demux, ePtr &, const char *streaminfo_file, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0, bool isstreamclient=false); void free(); private: bool m_have_cached_program; program m_cached_program; + bool m_isstreamclient; #endif };