X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/c50acf3391bec3f2abaf219c8f52c7d57d6149b5..fab31898f5892e9841b5c4f24fe505bd216e0ab2:/lib/service/iservice.h diff --git a/lib/service/iservice.h b/lib/service/iservice.h index 054e2224..2ba7cb46 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -138,6 +138,10 @@ public: data[3]=data3; data[4]=data4; } + operator bool() const + { + return valid(); + } #endif eServiceReference(int type, int flags, const std::string &path) : type(type), flags(flags), path(path) @@ -170,10 +174,6 @@ public: return r < 0; return path < c.path; } - operator bool() const - { - return valid(); - } int valid() const { @@ -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! @@ -284,13 +286,8 @@ public: sDescription, sServiceref, sTimeCreate, /* unix time or string */ + sFileSize, - sTitle, - sArtist, - sAlbum, - sComment, - sTracknumber, - sGenre, sCAIDs, sVideoType, /* MPEG2 MPEG4 */ @@ -303,6 +300,64 @@ public: sTransponderData, /* transponderdata as python dict */ + sCurrentChapter, + sCurrentTitle, + sTotalChapters, + sTotalTitles, + + sTagTitle, + sTagTitleSortname, + sTagArtist, + sTagArtistSortname, + sTagAlbum, + sTagAlbumSortname, + sTagComposer, + sTagDate, + sTagGenre, + sTagComment, + sTagExtendedComment, + sTagTrackNumber, + sTagTrackCount, + sTagAlbumVolumeNumber, + sTagAlbumVolumeCount, + sTagLocation, + sTagHomepage, + sTagDescription, + sTagVersion, + sTagISRC, + sTagOrganization, + sTagCopyright, + sTagCopyrightURI, + sTagContact, + sTagLicense, + sTagLicenseURI, + sTagPerformer, + sTagCodec, + sTagVideoCodec, + sTagAudioCodec, + sTagBitrate, + sTagNominalBitrate, + sTagMinimumBitrate, + sTagMaximumBitrate, + sTagSerial, + sTagEncoder, + sTagEncoderVersion, + sTagTrackGain, + sTagTrackPeak, + sTagAlbumGain, + sTagAlbumPeak, + sTagReferenceLevel, + sTagLanguageCode, + sTagImage, + sTagPreviewImage, + sTagAttachment, + sTagBeatsPerMinute, + sTagKeywords, + sTagCRC, + sTagChannelMode, + + sTransferBPS, + sUser = 0x100 }; enum { @@ -385,6 +440,8 @@ class iPauseableService: public iObject ~iPausableService(); #endif public: + + /* this will set the *state* directly. So just call a SINGLE function of those at a time. */ virtual RESULT pause()=0; virtual RESULT unpause()=0; @@ -420,7 +477,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 chapter)=0; + virtual RESULT seekChapter(int) { return -1; } + virtual RESULT seekTitle(int) { return -1; } }; SWIG_TEMPLATE_TYPEDEF(ePtr, iSeekableServicePtr); @@ -537,7 +595,8 @@ class iTimeshiftService: public iObject #endif public: virtual RESULT startTimeshift()=0; - virtual RESULT stopTimeshift()=0; + virtual RESULT stopTimeshift(bool swToLive=true)=0; + virtual RESULT setNextPlaybackFile(const char *fn)=0; // not needed by our internal timeshift.. but external plugin... virtual int isTimeshiftActive()=0; /* this essentially seeks to the relative end of the timeshift buffer */ @@ -663,6 +722,9 @@ public: /* for transferring a service... */ virtual SWIG_VOID(RESULT) getListOfFilenames(std::list &SWIG_OUTPUT)=0; + + /* a blocking call to reindex a file */ + virtual int reindex() = 0; // TODO: additional stuff, like a conversion interface? }; @@ -687,6 +749,19 @@ public: }; SWIG_TEMPLATE_TYPEDEF(ePtr, iStreamableServicePtr); +SWIG_IGNORE(iStreamedService); +class iStreamedService: public iObject +{ +#ifdef SWIG + iStreamedService(); + ~iStreamedService(); +#endif +public: + virtual PyObject *getBufferCharge()=0; + virtual int setBufferSize(int size)=0; +}; +SWIG_TEMPLATE_TYPEDEF(ePtr, iStreamedServicePtr); + class iServiceKeys_ENUMS { #ifdef SWIG @@ -729,6 +804,7 @@ public: evStart, evEnd, + evTunedIn, evTuneFailed, /* when iServiceInformation is implemented:*/ @@ -753,6 +829,10 @@ public: evUpdatedRassInteractivePicMask, evVideoSizeChanged, + evVideoFramerateChanged, + evVideoProgressiveChanged, + + evBuffering, evStopped, @@ -789,6 +869,7 @@ 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) streamed(ePtr &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) keys(ePtr &SWIG_OUTPUT)=0; }; SWIG_TEMPLATE_TYPEDEF(ePtr, iPlayableServicePtr); @@ -809,7 +890,8 @@ public: evRecordStopped, evNewProgramInfo, evRecordFailed, - evRecordWriteError + evRecordWriteError, + evNewEventInfo }; enum { NoError=0, @@ -835,12 +917,13 @@ public: virtual RESULT connectEvent(const Slot2 &event, ePtr &connection)=0; #endif 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 prepare(const char *filename, time_t begTime=-1, time_t endTime=-1, int eit_event_id=-1, const char *name=0, const char *descr=0, const char *tags=0)=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; + virtual SWIG_VOID(RESULT) subServices(ePtr &SWIG_OUTPUT)=0; }; SWIG_TEMPLATE_TYPEDEF(ePtr, iRecordableServicePtr);