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 2f489b172c47fade11f2ff75b77796cd4c8daf2e..2d38d6f66e0ec4d90d0d6ccfd62031ee56095422 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 650b609e16713d6fd4784cbe3748e0a588857d39..76abbd3805120669c331898da1420e9ff533d08d 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 a07e4410b7b0515840ff2062a85a630f640d533f..e27f7ffda98d69a04cde6e74a86ac1628003e8fe 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 c08278b835a95960e7e242c6487653ed39ee74aa..5ba31215ec843fbe3d1f33c8b2594414331891e2 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();