load and save cutlists
[enigma2.git] / lib / service / servicedvb.h
index a07e4410b7b0515840ff2062a85a630f640d533f..2785ce2a567bae6993371af2d9fe6177747e283a 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,10 @@ public:
        int isTimeshiftActive();
        RESULT activateTimeshift();
 
+               // iCueSheet
+       PyObject *getCutList();
+       void setCutList(PyObject *);
+       
 private:
        friend class eServiceFactoryDVB;
        eServiceReference m_reference;
@@ -156,6 +163,27 @@ private:
        int m_skipmode;
        
        ePtr<eCueSheet> m_cue;
+       
+       struct cueEntry
+       {
+               pts_t where;
+               unsigned int what;
+               
+               bool operator < (const struct cueEntry &o) const
+               {
+                       return what < o.what;
+               }
+               cueEntry(const pts_t &where, unsigned int what) :
+                       where(where), what(what)
+               {
+               }
+       };
+       
+       std::multiset<cueEntry> m_cue_entries;
+       int m_cuesheet_changed;
+       
+       void loadCuesheet();
+       void saveCuesheet();
 };
 
 #endif