diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-02-15 02:08:46 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-02-15 02:08:46 +0000 |
| commit | 49fe6e80f4664c97c95ea73001c3a8b34718b564 (patch) | |
| tree | dad4be74de5aa092c09a707ef456d0c6c0738042 /lib | |
| parent | 95039ba3e50f5df85e6e1e2d4108486fd28f2264 (diff) | |
| download | enigma2-49fe6e80f4664c97c95ea73001c3a8b34718b564.tar.gz enigma2-49fe6e80f4664c97c95ea73001c3a8b34718b564.zip | |
add iCueSheet interface and null implementation
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/service/iservice.h | 18 | ||||
| -rw-r--r-- | lib/service/servicedvb.cpp | 28 | ||||
| -rw-r--r-- | lib/service/servicedvb.h | 10 | ||||
| -rw-r--r-- | lib/service/servicemp3.h | 1 |
4 files changed, 56 insertions, 1 deletions
diff --git a/lib/service/iservice.h b/lib/service/iservice.h index 2f489b17..2d38d6f6 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -377,6 +377,23 @@ public: TEMPLATE_TYPEDEF(ePtr<iTimeshiftService>, iTimeshiftServicePtr); + /* not related to eCueSheet */ +class iCueSheet: public iObject +{ +#ifdef SWIG + iCueSheet(); + ~iCueSheet(); +#endif +public: + /* returns a list of (pts, what)-tuples */ + virtual PyObject *getCutList() = 0; + + enum { cutIn = 0, cutOut = 1, cutMark = 2 }; + + virtual RESULT addCut(const pts_t &when, int what) = 0; + virtual RESULT removeCut(const pts_t &when, int what) = 0; +}; + class iPlayableService: public iObject { #ifdef SWIG @@ -413,6 +430,7 @@ public: virtual SWIG_VOID(RESULT) subServices(ePtr<iSubserviceList> &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) frontendStatusInfo(ePtr<iFrontendStatusInformation> &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) timeshift(ePtr<iTimeshiftService> &SWIG_OUTPUT)=0; + virtual SWIG_VOID(RESULT) cueSheet(ePtr<iCueSheet> &SWIG_OUTPUT)=0; }; TEMPLATE_TYPEDEF(ePtr<iPlayableService>, iPlayableServicePtr); diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 650b609e..76abbd38 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -869,6 +869,17 @@ RESULT eDVBServicePlay::timeshift(ePtr<iTimeshiftService> &ptr) return -1; } +RESULT eDVBServicePlay::cueSheet(ePtr<iCueSheet> &ptr) +{ + if (m_is_pvr) + { + ptr = this; + return 0; + } + ptr = 0; + return -1; +} + RESULT eDVBServicePlay::getName(std::string &name) { if (m_is_pvr) @@ -1168,6 +1179,23 @@ RESULT eDVBServicePlay::activateTimeshift() return -2; } +PyObject *eDVBServicePlay::getCutList() +{ + PyObject *list = PyList_New(0); + + return list; +} + +RESULT eDVBServicePlay::addCut(const pts_t &when, int what) +{ + return -1; +} + +RESULT eDVBServicePlay::removeCut(const pts_t &when, int what) +{ + return -1; +} + void eDVBServicePlay::updateTimeshiftPids() { if (!m_record) diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h index a07e4410..e27f7ffd 100644 --- a/lib/service/servicedvb.h +++ b/lib/service/servicedvb.h @@ -58,7 +58,8 @@ private: class eDVBServicePlay: public iPlayableService, public iPauseableService, public iSeekableService, public Object, public iServiceInformation, public iAudioTrackSelection, public iFrontendStatusInformation, - public iSubserviceList, public iTimeshiftService + public iSubserviceList, public iTimeshiftService, + public iCueSheet { DECLARE_REF(eDVBServicePlay); public: @@ -75,6 +76,8 @@ public: RESULT frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr); RESULT subServices(ePtr<iSubserviceList> &ptr); RESULT timeshift(ePtr<iTimeshiftService> &ptr); + RESULT cueSheet(ePtr<iCueSheet> &ptr); + // iPauseableService RESULT pause(); @@ -114,6 +117,11 @@ public: int isTimeshiftActive(); RESULT activateTimeshift(); + // iCueSheet + PyObject *getCutList(); + RESULT addCut(const pts_t &when, int what); + RESULT removeCut(const pts_t &when, int what); + private: friend class eServiceFactoryDVB; eServiceReference m_reference; diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h index c08278b8..5ba31215 100644 --- a/lib/service/servicemp3.h +++ b/lib/service/servicemp3.h @@ -65,6 +65,7 @@ public: RESULT frontendStatusInfo(ePtr<iFrontendStatusInformation> &ptr) { ptr = 0; return -1; } RESULT subServices(ePtr<iSubserviceList> &ptr) { ptr = 0; return -1; } RESULT timeshift(ePtr<iTimeshiftService> &ptr) { ptr = 0; return -1; } + RESULT cueSheet(ePtr<iCueSheet>& ptr) { ptr = 0; return -1; } // iPausableService RESULT pause(); |
