add iCueSheet interface and null implementation
authorFelix Domke <tmbinc@elitedvb.net>
Wed, 15 Feb 2006 02:08:46 +0000 (02:08 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Wed, 15 Feb 2006 02:08:46 +0000 (02:08 +0000)
lib/service/iservice.h
lib/service/servicedvb.cpp
lib/service/servicedvb.h
lib/service/servicemp3.h

index 2f489b1..2d38d6f 100644 (file)
@@ -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);
index 650b609..76abbd3 100644 (file)
@@ -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)
index a07e441..e27f7ff 100644 (file)
@@ -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;
index c08278b..5ba3121 100644 (file)
@@ -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();