X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ea64b36cb3a13ff7908c4cdb920f547aa4efb407..307b1a3a29f51944baf8866292f6150f6aa8ca62:/lib/service/iservice.h diff --git a/lib/service/iservice.h b/lib/service/iservice.h index 0b03feb4..02fc4508 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -84,7 +84,7 @@ public: #ifndef SWIG std::string name; #endif - std::string getName() { return name; } + std::string getName() const { return name; } void setName( const std::string &n ) { name=n; } eServiceReference() @@ -240,7 +240,7 @@ public: virtual int getLength(const eServiceReference &ref); virtual SWIG_VOID(RESULT) getEvent(const eServiceReference &ref, ePtr &SWIG_OUTPUT, time_t start_time=-1); // returns true when not implemented - virtual int isPlayable(const eServiceReference &ref, const eServiceReference &ignore); + virtual int isPlayable(const eServiceReference &ref, const eServiceReference &ignore, bool simulate=false); virtual int getInfo(const eServiceReference &ref, int w); virtual std::string getInfoString(const eServiceReference &ref,int w); @@ -261,6 +261,8 @@ public: enum { sIsCrypted, /* is encrypted (no indication if decrypt was possible) */ sAspect, /* aspect ratio: 0=4:3, 1=16:9, 2=whatever we need */ + sFrameRate, /* frame rate */ + sProgressive, /* 0 = interlaced, 1 = progressive */ sIsMultichannel, /* multichannel *available* (probably not selected) */ /* "user serviceable info" - they are not reliable. Don't use them for anything except the service menu! @@ -301,7 +303,14 @@ public: sVideoHeight, sVideoWidth, - sTransponderData /* transponderdata as python dict */ + sTransponderData, /* transponderdata as python dict */ + + sCurrentChapter, + sCurrentTitle, + sTotalChapters, + sTotalTitles, + + sUser = 0x100 }; enum { resNA = -1, @@ -355,7 +364,7 @@ public: lockState, syncState, frontendNumber, - signalPowerdB, + signalQualitydB, }; }; @@ -418,6 +427,8 @@ public: audio will be switched off, sync will be disabled etc. */ virtual RESULT setTrickmode(int trick=0)=0; virtual RESULT isCurrentlySeekable()=0; + virtual RESULT seekChapter(int) { return -1; } + virtual RESULT seekTitle(int) { return -1; } }; SWIG_TEMPLATE_TYPEDEF(ePtr, iSeekableServicePtr); @@ -665,6 +676,54 @@ public: }; SWIG_TEMPLATE_TYPEDEF(ePtr, iServiceOfflineOperationsPtr); +SWIG_IGNORE(iStreamableService); +class iStreamableService: public iObject +{ +#ifdef SWIG + iStreamableService(); + ~iStreamableService(); +#endif +public: + /* returns a dict: + { "demux": , + "pids": [(x,type),(y,type),(z,type),..], + ... + } + with type being "video", "audio", "pmt", "pat"... + */ + virtual PyObject *getStreamingData()=0; +}; +SWIG_TEMPLATE_TYPEDEF(ePtr, iStreamableServicePtr); + +class iServiceKeys_ENUMS +{ +#ifdef SWIG + iServiceKeys_ENUMS(); + ~iServiceKeys_ENUMS(); +#endif +public: + enum { + keyLeft, + keyRight, + keyUp, + keyDown, + keyOk, + keyUser = 0x100 + }; +}; + +SWIG_IGNORE(iServiceKeys); +class iServiceKeys: public iServiceKeys_ENUMS, public iObject +{ +#ifdef SWIG + iServiceKeys(); + ~iServiceKeys(); +#endif +public: + virtual SWIG_VOID(RESULT) keyPressed(int key)=0; +}; +SWIG_TEMPLATE_TYPEDEF(ePtr, iServiceKeysPtr); + class iPlayableService_ENUMS { #ifdef SWIG @@ -678,6 +737,7 @@ public: evStart, evEnd, + evTunedIn, evTuneFailed, /* when iServiceInformation is implemented:*/ @@ -702,13 +762,15 @@ public: evUpdatedRassInteractivePicMask, evVideoSizeChanged, + evVideoFramerateChanged, + evVideoProgressiveChanged, + + evStopped, - evStopped + evUser = 0x100 }; }; -class iStreamableService; - SWIG_IGNORE(iPlayableService); class iPlayableService: public iPlayableService_ENUMS, public iObject { @@ -738,28 +800,10 @@ public: virtual SWIG_VOID(RESULT) audioDelay(ePtr &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) rdsDecoder(ePtr &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) stream(ePtr &SWIG_OUTPUT)=0; + virtual SWIG_VOID(RESULT) keys(ePtr &SWIG_OUTPUT)=0; }; SWIG_TEMPLATE_TYPEDEF(ePtr, iPlayableServicePtr); -SWIG_IGNORE(iStreamableService); -class iStreamableService: public iObject -{ -#ifdef SWIG - iStreamableService(); - ~iStreamableService(); -#endif -public: - /* returns a dict: - { "demux": , - "pids": [(x,type),(y,type),(z,type),..], - ... - } - with type being "video", "audio", "pmt", "pat"... - */ - virtual PyObject *getStreamingData()=0; -}; -SWIG_TEMPLATE_TYPEDEF(ePtr, iStreamableServicePtr); - class iRecordableService_ENUMS { #ifdef SWIG @@ -784,7 +828,9 @@ public: errNoDemuxAvailable=-2, errNoTsRecorderAvailable=-3, errDiskFull=-4, - errTuneFailed=-255 + errTuneFailed=-255, + errMisconfiguration = -256, + errNoResources = -257, }; }; @@ -802,7 +848,7 @@ public: virtual SWIG_VOID(RESULT) getError(int &SWIG_OUTPUT)=0; virtual RESULT prepare(const char *filename, time_t begTime=-1, time_t endTime=-1, int eit_event_id=-1)=0; virtual RESULT prepareStreaming()=0; - virtual RESULT start()=0; + virtual RESULT start(bool simulate=false)=0; virtual RESULT stop()=0; virtual SWIG_VOID(RESULT) frontendInfo(ePtr &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) stream(ePtr &SWIG_OUTPUT)=0;