X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fservice%2Fservicedvb.h;h=27f48b5735c8b2c51d0078801c6f8c91fc728926;hp=01eb049756a6301505d54a3e169d8db1d8dfbc17;hb=265fb595e8767536096985bcfca7d0c36e61b5a0;hpb=a2aaaa1836cc7d4348429418c36d6742a6b3bc5a diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h index 01eb049..27f48b5 100644 --- a/lib/service/servicedvb.h +++ b/lib/service/servicedvb.h @@ -6,12 +6,19 @@ #include #include +#include #include +#include #include +class eStaticServiceDVBInformation; +class eStaticServiceDVBBouquetInformation; + class eServiceFactoryDVB: public iServiceHandler { -DECLARE_REF(eServiceFactoryDVB); + DECLARE_REF(eServiceFactoryDVB); + ePtr m_StaticServiceDVBInfo; + ePtr m_StaticServiceDVBBouquetInfo; public: eServiceFactoryDVB(); virtual ~eServiceFactoryDVB(); @@ -37,11 +44,11 @@ public: PyObject *getContent(const char* formatstr, bool sorted=false); RESULT getContent(std::list &list, bool sorted=false); RESULT getNext(eServiceReference &ptr); - int compareLessEqual(const eServiceReference &a, const eServiceReference &b); + inline int compareLessEqual(const eServiceReference &a, const eServiceReference &b); RESULT startEdit(ePtr &); RESULT flushChanges(); - RESULT addService(eServiceReference &ref); + RESULT addService(eServiceReference &ref, eServiceReference before); RESULT removeService(eServiceReference &ref); RESULT moveService(eServiceReference &ref, int pos); RESULT setListName(const std::string &name); @@ -56,11 +63,30 @@ private: eBouquet *m_bouquet; }; -class eDVBServicePlay: public iPlayableService, public iPauseableService, +inline int eDVBServiceList::compareLessEqual(const eServiceReference &a, const eServiceReference &b) +{ + return m_query->compareLessEqual((const eServiceReferenceDVB&)a, (const eServiceReferenceDVB&)b); +} + +class eDVBServiceBase: public iFrontendInformation +{ +protected: + eDVBServicePMTHandler m_service_handler ; +public: + // iFrontendInformation + int getFrontendInfo(int w); + PyObject *getFrontendData(bool); +}; + +class eSubtitleWidget; + +class eDVBServicePlay: public eDVBServiceBase, + public iPlayableService, public iPauseableService, public iSeekableService, public Object, public iServiceInformation, - public iAudioTrackSelection, public iFrontendStatusInformation, + public iAudioTrackSelection, public iAudioChannelSelection, public iSubserviceList, public iTimeshiftService, - public iCueSheet + public iCueSheet, public iSubtitleOutput, public iAudioDelay, + public iRadioText { DECLARE_REF(eDVBServicePlay); public: @@ -75,11 +101,15 @@ public: RESULT seek(ePtr &ptr); RESULT pause(ePtr &ptr); RESULT info(ePtr &ptr); + RESULT audioChannel(ePtr &ptr); RESULT audioTracks(ePtr &ptr); - RESULT frontendStatusInfo(ePtr &ptr); + RESULT frontendInfo(ePtr &ptr); RESULT subServices(ePtr &ptr); RESULT timeshift(ePtr &ptr); RESULT cueSheet(ePtr &ptr); + RESULT subtitle(ePtr &ptr); + RESULT audioDelay(ePtr &ptr); + RESULT radioText(ePtr &ptr); // iPauseableService RESULT pause(); @@ -107,9 +137,12 @@ public: RESULT selectTrack(unsigned int i); RESULT getTrackInfo(struct iAudioTrackInfo &, unsigned int n); - // iFrontendStatusInformation - int getFrontendInfo(int w); - PyObject *getFrontendData(bool); + // iAudioChannelSelection + int getCurrentChannel(); + RESULT selectChannel(int i); + + // iRadioText + std::string getRadioText(int i=0); // iSubserviceList int getNumberOfSubservices(); @@ -126,6 +159,18 @@ public: void setCutList(PyObject *); void setCutListEnable(int enable); + // iSubtitleOutput + RESULT enableSubtitles(eWidget *parent, PyObject *entry); + RESULT disableSubtitles(eWidget *parent); + PyObject *getSubtitleList(); + PyObject *getCachedSubtitle(); + + // iAudioDelay + int getAC3Delay(); + int getPCMDelay(); + void setAC3Delay(int); + void setPCMDelay(int); + private: friend class eServiceFactoryDVB; eServiceReference m_reference; @@ -134,9 +179,10 @@ private: ePtr m_decoder; int m_is_primary; + int m_have_video_pid; /* in timeshift mode, we essentially have two channels, and thus pmt handlers. */ - eDVBServicePMTHandler m_service_handler, m_service_handler_timeshift; + eDVBServicePMTHandler m_service_handler_timeshift; eDVBServiceEITHandler m_event_handler; eDVBServicePlay(const eServiceReference &ref, eDVBService *service); @@ -156,7 +202,7 @@ private: int m_timeshift_fd; ePtr m_decode_demux; - + int m_current_audio_stream; int selectAudioStream(int n); @@ -199,8 +245,27 @@ private: void cutlistToCuesheet(); + eSubtitleWidget *m_subtitle_widget; + /* teletext subtitles */ ePtr m_teletext_parser; + void newSubtitlePage(const eDVBTeletextSubtitlePage &p); + ePtr m_new_subtitle_page_connection; + std::list m_subtitle_pages; + + /* dvb subtitles */ + ePtr m_subtitle_parser; + void newDVBSubtitlePage(const eDVBSubtitlePage &p); + ePtr m_new_dvb_subtitle_page_connection; + std::list m_dvb_subtitle_pages; + + eTimer m_subtitle_sync_timer; + void checkSubtitleTiming(); + + /* radiotext */ + ePtr m_radiotext_parser; + ePtr m_radiotext_updated_connection; + void radioTextUpdated(); }; #endif