From 86b22151f0758311fd146ff508e7254337414bc1 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 15 Aug 2017 17:40:26 +0200 Subject: sync with upstream --- .../kodi-addon-dev-kit/include/kodi/AddonBase.h | 13 ++++-- .../kodi-addon-dev-kit/include/kodi/AudioEngine.h | 20 ++++----- .../include/kodi/addon-instance/AudioDSP.h | 2 +- .../include/kodi/addon-instance/Peripheral.h | 17 ++++++++ .../include/kodi/addon-instance/PeripheralUtils.h | 4 ++ .../kodi-addon-dev-kit/include/kodi/versions.h | 8 ++-- .../include/kodi/xbmc_epg_types.h | 1 + .../kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h | 50 +++++++++++----------- .../include/kodi/xbmc_pvr_types.h | 45 +++++++++++++------ xbmc/input/ActionIDs.h | 1 + 10 files changed, 106 insertions(+), 55 deletions(-) (limited to 'xbmc') diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h index 07fd8ce..0c5e617 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h @@ -43,6 +43,9 @@ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) #define ATTRIBUTE_PACKED __attribute__ ((packed)) #define PRAGMA_PACK 0 + #if __GNUC__ >= 4 + #define ATTRIBUTE_HIDDEN __attribute__ ((visibility ("hidden"))) + #endif #endif #endif @@ -51,6 +54,10 @@ #define PRAGMA_PACK 1 #endif +#if !defined(ATTRIBUTE_HIDDEN) + #define ATTRIBUTE_HIDDEN +#endif + #include "versions.h" namespace kodi { namespace addon { class CAddonBase; }} @@ -234,7 +241,7 @@ namespace addon { class IAddonInstance { public: - IAddonInstance(ADDON_TYPE type) : m_type(type) { } + explicit IAddonInstance(ADDON_TYPE type) : m_type(type) { } virtual ~IAddonInstance() = default; virtual ADDON_STATUS CreateInstance(int instanceType, std::string instanceID, KODI_HANDLE instance, KODI_HANDLE& addonInstance) @@ -254,7 +261,7 @@ namespace kodi { class CSettingValue { public: - CSettingValue(const void *settingValue) : m_settingValue(settingValue) {} + explicit CSettingValue(const void *settingValue) : m_settingValue(settingValue) {} bool empty() const { return (m_settingValue == nullptr) ? true : false; } std::string GetString() const { return (char*)m_settingValue; } @@ -273,7 +280,7 @@ private: namespace kodi { namespace addon { /// Add-on main instance class. -class CAddonBase +class ATTRIBUTE_HIDDEN CAddonBase { public: CAddonBase() diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h index 380e5e2..1265dcd 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h @@ -175,10 +175,10 @@ extern "C" void (*AEStream_SetVolume)(void *kodiBase, AEStreamHandle *handle, float Volume); float (*AEStream_GetAmplification)(void *kodiBase, AEStreamHandle *handle); void (*AEStream_SetAmplification)(void *kodiBase, AEStreamHandle *handle, float Amplify); - const unsigned int (*AEStream_GetFrameSize)(void *kodiBase, AEStreamHandle *handle); - const unsigned int (*AEStream_GetChannelCount)(void *kodiBase, AEStreamHandle *handle); - const unsigned int (*AEStream_GetSampleRate)(void *kodiBase, AEStreamHandle *handle); - const AEDataFormat (*AEStream_GetDataFormat)(void *kodiBase, AEStreamHandle *handle); + unsigned int (*AEStream_GetFrameSize)(void *kodiBase, AEStreamHandle *handle); + unsigned int (*AEStream_GetChannelCount)(void *kodiBase, AEStreamHandle *handle); + unsigned int (*AEStream_GetSampleRate)(void *kodiBase, AEStreamHandle *handle); + AEDataFormat (*AEStream_GetDataFormat)(void *kodiBase, AEStreamHandle *handle); double (*AEStream_GetResampleRatio)(void *kodiBase, AEStreamHandle *handle); void (*AEStream_SetResampleRatio)(void *kodiBase, AEStreamHandle *handle, double Ratio); } AddonToKodiFuncTable_kodi_audioengine; @@ -269,8 +269,8 @@ namespace audioengine : m_kodiBase(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase), m_cb(::kodi::addon::CAddonBase::m_interface->toKodi->kodi_audioengine) { - AEStreamHandle *streamHandle = m_cb->MakeStream(m_kodiBase, format, options); - if (streamHandle == nullptr) + m_StreamHandle = m_cb->MakeStream(m_kodiBase, format, options); + if (m_StreamHandle == nullptr) { kodi::Log(ADDON_LOG_FATAL, "CAddonAEStream: MakeStream failed!"); } @@ -483,7 +483,7 @@ namespace audioengine /// /// @return The size in bytes of one frame /// - const unsigned int GetFrameSize() const + unsigned int GetFrameSize() const { return m_cb->AEStream_GetFrameSize(m_kodiBase, m_StreamHandle); } @@ -495,7 +495,7 @@ namespace audioengine /// /// @return The channel count /// - const unsigned int GetChannelCount() const + unsigned int GetChannelCount() const { return m_cb->AEStream_GetChannelCount(m_kodiBase, m_StreamHandle); } @@ -509,7 +509,7 @@ namespace audioengine /// /// @return The stream's sample rate (eg, 48000) /// - const unsigned int GetSampleRate() const + unsigned int GetSampleRate() const { return m_cb->AEStream_GetSampleRate(m_kodiBase, m_StreamHandle); } @@ -521,7 +521,7 @@ namespace audioengine /// /// @return The stream's data format (eg, AUDIOENGINE_FMT_S16LE) /// - const AEDataFormat GetDataFormat() const + AEDataFormat GetDataFormat() const { return m_cb->AEStream_GetDataFormat(m_kodiBase, m_StreamHandle); } diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDSP.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDSP.h index c508f80..3587a33 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDSP.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDSP.h @@ -580,7 +580,7 @@ namespace addon { /// add-on CreateInstance call with instance /// id ADDON_INSTANCE_ADSP. /// - CInstanceAudioDSP(KODI_HANDLE instance) + explicit CInstanceAudioDSP(KODI_HANDLE instance) : IAddonInstance(ADDON_INSTANCE_ADSP) { if (CAddonBase::m_interface->globalSingleInstance != nullptr) diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h index 631b9b4..045a925 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h @@ -210,6 +210,8 @@ extern "C" JOYSTICK_FEATURE_TYPE_ANALOG_STICK, JOYSTICK_FEATURE_TYPE_ACCELEROMETER, JOYSTICK_FEATURE_TYPE_MOTOR, + JOYSTICK_FEATURE_TYPE_RELPOINTER, + JOYSTICK_FEATURE_TYPE_ABSPOINTER, } JOYSTICK_FEATURE_TYPE; typedef enum JOYSTICK_FEATURE_PRIMITIVE @@ -257,6 +259,7 @@ extern "C" void (*trigger_scan)(void* kodiInstance); void (*refresh_button_maps)(void* kodiInstance, const char* device_name, const char* controller_id); unsigned int (*feature_count)(void* kodiInstance, const char* controller_id, JOYSTICK_FEATURE_TYPE type); + JOYSTICK_FEATURE_TYPE (*feature_type)(void* kodiInstance, const char* controller_id, const char* feature_name); } AddonToKodiFuncTable_Peripheral; //! @todo Mouse, light gun, multitouch @@ -545,6 +548,20 @@ namespace addon return m_instanceData->toKodi.feature_count(m_instanceData->toKodi.kodiInstance, strControllerId.c_str(), type); } + /*! + * @brief Return the type of the feature + * + * @param controllerId The controller ID to check + * @param featureName The feature to check + * + * @return The type of the specified feature, or JOYSTICK_FEATURE_TYPE_UNKNOWN + * if unknown + */ + JOYSTICK_FEATURE_TYPE FeatureType(const std::string& strControllerId, const std::string &featureName) + { + return m_instanceData->toKodi.feature_type(m_instanceData->toKodi.kodiInstance, strControllerId.c_str(), featureName.c_str()); + } + private: void SetAddonStruct(KODI_HANDLE instance) { diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h index 8cfa91b..721da35 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h @@ -580,10 +580,14 @@ namespace addon * 2) analog stick * 3) accelerometer * 4) motor + * 5) relative pointer[2] * * [1] All three driver primitives (buttons, hats and axes) have a state that * can be represented using a single scalar value. For this reason, * features that map to a single primitive are called "scalar features". + * + * [2] Relative pointers are similar to analog sticks, but they use + * relative distances instead of positions. */ class JoystickFeature { diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h index b9d37b4..870a646 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h @@ -107,14 +107,14 @@ #define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream" #define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "addon-instance/Inputstream.h" -#define ADDON_INSTANCE_VERSION_PERIPHERAL "1.3.3" -#define ADDON_INSTANCE_VERSION_PERIPHERAL_MIN "1.3.3" +#define ADDON_INSTANCE_VERSION_PERIPHERAL "1.3.4" +#define ADDON_INSTANCE_VERSION_PERIPHERAL_MIN "1.3.4" #define ADDON_INSTANCE_VERSION_PERIPHERAL_XML_ID "kodi.binary.instance.peripheral" #define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \ "addon-instance/PeripheralUtils.h" -#define ADDON_INSTANCE_VERSION_PVR "5.3.0" -#define ADDON_INSTANCE_VERSION_PVR_MIN "5.3.0" +#define ADDON_INSTANCE_VERSION_PVR "5.6.0" +#define ADDON_INSTANCE_VERSION_PVR_MIN "5.6.0" #define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr" #define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \ "xbmc_pvr_types.h" \ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h index b6200bf..c2b5458 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h @@ -116,6 +116,7 @@ extern "C" { int iEpisodePartNumber; /*!< @brief (optional) episode part number */ const char * strEpisodeName; /*!< @brief (optional) episode name */ unsigned int iFlags; /*!< @brief (optional) bit field of independent flags associated with the EPG entry */ + const char * strSeriesLink; /*!< @brief (optional) series link for this event */ } ATTRIBUTE_PACKED EPG_TAG; #ifdef __cplusplus diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h index 11e39f8..3dbf1c8 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h @@ -409,14 +409,6 @@ extern "C" */ long long LengthLiveStream(void); - /*! - * Switch to another channel. Only to be called when a live stream has already been opened. - * @param channel The channel to switch to. - * @return True if the switch was successful, false otherwise. - * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. Return false if this add-on won't provide this function. - */ - bool SwitchChannel(const PVR_CHANNEL& channel); - /*! * Get the signal status of the stream that's currently open. * @param signalStatus The signal status. @@ -434,12 +426,24 @@ extern "C" PVR_ERROR GetDescrambleInfo(PVR_DESCRAMBLE_INFO* descrambleInfo); /*! - * Get the stream URL for a channel from the backend. Used by the MediaPortal add-on. - * @param channel The channel to get the stream URL for. - * @return The requested URL. - * @remarks Optional, and only used if bHandlesInputStream is set to true. Return NULL if this add-on won't provide this function. + * Get the stream properties for a channel from the backend. + * @param[in] channel The channel to get the stream properties for. + * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. + * @param[inout] iPropertiesCount: in the size of the properties array, out: the number of properties returned. + * @return PVR_ERROR_NO_ERROR if the stream is available. + * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsTV or PVR_ADDON_CAPABILITIES::bSupportsRadio are set to true and PVR_ADDON_CAPABILITIES::bHandlesInputStream is set to false. In this case the implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the channel. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + */ + PVR_ERROR GetChannelStreamProperties(const PVR_CHANNEL* channel, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); + + /*! + * Get the stream properties for a recording from the backend. + * @param[in] channel The recording to get the stream properties for. + * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. + * @param[inout] iPropertiesCount: in the size of the properties array, out: the number of properties returned. + * @return PVR_ERROR_NO_ERROR if the stream is available. + * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsRecordings is set to true and the add-on does not implement recording stream functions (OpenRecordedStream, ...). In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the recording. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ - const char* GetLiveStreamURL(const PVR_CHANNEL& channel); + PVR_ERROR GetRecordingStreamProperties(const PVR_RECORDING* recording, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); /*! * Get the stream properties of the stream that's currently being read. @@ -536,14 +540,6 @@ extern "C" DemuxPacket* DemuxRead(void); //@} - /*! - * Delay to use when using switching channels for add-ons not providing an input stream. - * If the add-on does provide an input stream, then this method will not be called. - * Those add-ons can do that in OpenLiveStream() if needed. - * @return The delay in milliseconds. - */ - unsigned int GetChannelSwitchDelay(void); - /*! * Check if the backend support pausing the currently playing stream * This will enable/disable the pause button in XBMC based on the return value @@ -637,6 +633,11 @@ extern "C" void OnPowerSavingActivated(); void OnPowerSavingDeactivated(); + /*! + * Get stream times. Intermediate, will be moved to inputstream + */ + PVR_ERROR GetStreamTimes(PVR_STREAM_TIMES *times); + /*! * Called by XBMC to assign the function pointers of this add-on to pClient. * @param ptr The struct to assign the function pointers to. @@ -695,11 +696,10 @@ extern "C" pClient->toAddon.SeekLiveStream = SeekLiveStream; pClient->toAddon.PositionLiveStream = PositionLiveStream; pClient->toAddon.LengthLiveStream = LengthLiveStream; - pClient->toAddon.SwitchChannel = SwitchChannel; pClient->toAddon.SignalStatus = SignalStatus; pClient->toAddon.GetDescrambleInfo = GetDescrambleInfo; - pClient->toAddon.GetLiveStreamURL = GetLiveStreamURL; - pClient->toAddon.GetChannelSwitchDelay = GetChannelSwitchDelay; + pClient->toAddon.GetChannelStreamProperties = GetChannelStreamProperties; + pClient->toAddon.GetRecordingStreamProperties = GetRecordingStreamProperties; pClient->toAddon.CanPauseStream = CanPauseStream; pClient->toAddon.PauseStream = PauseStream; pClient->toAddon.CanSeekStream = CanSeekStream; @@ -733,6 +733,6 @@ extern "C" pClient->toAddon.OnSystemWake = OnSystemWake; pClient->toAddon.OnPowerSavingActivated = OnPowerSavingActivated; pClient->toAddon.OnPowerSavingDeactivated = OnPowerSavingDeactivated; + pClient->toAddon.GetStreamTimes = GetStreamTimes; }; }; - diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h index e7fed7b..9a64f92 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h @@ -77,6 +77,10 @@ struct DemuxPacket; #define XBMC_INVALID_CODEC_ID 0 #define XBMC_INVALID_CODEC { XBMC_CODEC_TYPE_UNKNOWN, XBMC_INVALID_CODEC_ID } +/* defines for GetChannelStreamProperties and GetRecordingStreamProperties */ +#define PVR_STREAM_MAX_PROPERTIES 20 +#define PVR_STREAM_PROPERTY_STREAMURL "streamurl" + /* using the default avformat's MAX_STREAMS value to be safe */ #define PVR_STREAM_MAX_STREAMS 20 @@ -155,10 +159,11 @@ extern "C" { const unsigned int PVR_TIMER_TYPE_SUPPORTS_START_ANYTIME = 0x00040000; /*!< @brief enables an 'Any Time' over-ride option for startTime (using PVR_TIMER.bStartAnyTime) */ const unsigned int PVR_TIMER_TYPE_SUPPORTS_END_ANYTIME = 0x00080000; /*!< @brief enables a separate 'Any Time' over-ride for endTime (using PVR_TIMER.bEndAnyTime) */ const unsigned int PVR_TIMER_TYPE_SUPPORTS_MAX_RECORDINGS = 0x00100000; /*!< @brief this type supports specifying a maximum recordings setting' (PVR_TIMER.iMaxRecordings) */ - const unsigned int PVR_TIMER_TYPE_REQUIRES_EPG_TAG_ON_CREATE = 0x00200000; /*!< @brief this type shold not appear on any create menus which don't provide an associated EPG tag */ + const unsigned int PVR_TIMER_TYPE_REQUIRES_EPG_TAG_ON_CREATE = 0x00200000; /*!< @brief this type should not appear on any create menus which don't provide an associated EPG tag */ const unsigned int PVR_TIMER_TYPE_FORBIDS_EPG_TAG_ON_CREATE = 0x00400000; /*!< @brief this type should not appear on any create menus which provide an associated EPG tag */ const unsigned int PVR_TIMER_TYPE_REQUIRES_EPG_SERIES_ON_CREATE = 0x00800000; /*!< @brief this type should not appear on any create menus unless associated with an EPG tag with 'series' attributes (EPG_TAG.iFlags & EPG_TAG_FLAG_IS_SERIES || EPG_TAG.iSeriesNumber > 0 || EPG_TAG.iEpisodeNumber > 0 || EPG_TAG.iEpisodePartNumber > 0). Implies PVR_TIMER_TYPE_REQUIRES_EPG_TAG_ON_CREATE */ const unsigned int PVR_TIMER_TYPE_SUPPORTS_ANY_CHANNEL = 0x01000000; /*!< @brief this type supports 'any channel', for example when defining a timer rule that should match any channel instaed of a particular channel */ + const unsigned int PVR_TIMER_TYPE_REQUIRES_EPG_SERIESLINK_ON_CREATE = 0x02000000; /*!< @brief this type should not appear on any create menus which don't provide an associated EPG tag with a series link */ /*! * @brief PVR timer weekdays (PVR_TIMER.iWeekdays values) @@ -264,6 +269,14 @@ extern "C" { PVR_RECORDING_CHANNEL_TYPE_RADIO = 2, /*!< @brief radio channel */ } PVR_RECORDING_CHANNEL_TYPE; + /*! + * @brief Representation of a named value + */ + typedef struct PVR_NAMED_VALUE { + char strName[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (required) name */ + char strValue[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (required) value */ + } ATTRIBUTE_PACKED PVR_NAMED_VALUE; + /*! * @brief Properties passed to the Create() method of an add-on. */ @@ -334,8 +347,8 @@ extern "C" { int iBlockAlign; /*!< @brief (required) block alignment */ int iBitRate; /*!< @brief (required) bit rate */ int iBitsPerSample; /*!< @brief (required) bits per sample */ - } stream[PVR_STREAM_MAX_STREAMS]; /*!< @brief (required) the streams */ - } ATTRIBUTE_PACKED PVR_STREAM_PROPERTIES; + } stream[PVR_STREAM_MAX_STREAMS]; /*!< @brief (required) the streams */ + } ATTRIBUTE_PACKED PVR_STREAM_PROPERTIES; /*! * @brief Signal status information @@ -392,9 +405,6 @@ extern "C" { char strChannelName[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (optional) channel name given to this channel */ char strInputFormat[PVR_ADDON_INPUT_FORMAT_STRING_LENGTH]; /*!< @brief (optional) input format type. types can be found in ffmpeg/libavformat/allformats.c leave empty if unknown */ - char strStreamURL[PVR_ADDON_URL_STRING_LENGTH]; /*!< @brief (optional) the URL to use to access this channel. - leave empty to use this add-on to access the stream. - set to a path that's supported by XBMC otherwise. */ unsigned int iEncryptionSystem; /*!< @brief (optional) the encryption ID or CaID of this channel */ char strIconPath[PVR_ADDON_URL_STRING_LENGTH]; /*!< @brief (optional) path to the channel icon (if present) */ bool bIsHidden; /*!< @brief (optional) true if this channel is marked as hidden */ @@ -508,6 +518,8 @@ extern "C" { unsigned int iMarginEnd; /*!< @brief (optional) if set, the backend ends the recording iMarginEnd minutes after endTime. */ int iGenreType; /*!< @brief (optional) genre type */ int iGenreSubType; /*!< @brief (optional) genre sub type */ + char strSeriesLink[PVR_ADDON_URL_STRING_LENGTH]; /*!< @brief (optional) series link for this timer. If set for an epg-based timer rule, matching events will be found by checking strSeriesLink instead of strTitle (and bFullTextEpgSearch) */ + } ATTRIBUTE_PACKED PVR_TIMER; /*! @@ -520,7 +532,6 @@ extern "C" { int iSeriesNumber; /*!< @brief (optional) series number (usually called season). Set to "0" for specials/pilot. For 'invalid' see iEpisodeNumber or set to -1 */ int iEpisodeNumber; /*!< @brief (optional) episode number within the "iSeriesNumber" season. For 'invalid' set to -1 or iSeriesNumber=iEpisodeNumber=0 to show both are invalid */ int iYear; /*!< @brief (optional) year of first release (use to identify a specific movie re-make) / first airing for TV shows. Set to '0' for invalid. */ - char strStreamURL[PVR_ADDON_URL_STRING_LENGTH]; /*!< @brief (required) stream URL to access this recording */ char strDirectory[PVR_ADDON_URL_STRING_LENGTH]; /*!< @brief (optional) directory of this recording on the client */ char strPlotOutline[PVR_ADDON_DESC_STRING_LENGTH]; /*!< @brief (optional) plot outline */ char strPlot[PVR_ADDON_DESC_STRING_LENGTH]; /*!< @brief (optional) plot */ @@ -575,6 +586,17 @@ extern "C" { } data; } ATTRIBUTE_PACKED PVR_MENUHOOK_DATA; + /*! + * @brief times of playing stream + */ + typedef struct PVR_STREAM_TIMES + { + time_t startTime; /*!< @brief time (UTC) time elapsed refers to. Ideally start of tv show */ + int64_t ptsStart; /*!< @brief pts of startTime */ + int64_t ptsBegin; /*!< @brief erliest pts player can seek back */ + int64_t ptsEnd; /*!< @brief latest pts player can seek forward */ + } ATTRIBUTE_PACKED PVR_STREAM_TIMES; + typedef struct AddonToKodiFuncTable_PVR { KODI_HANDLE kodiInstance; @@ -596,7 +618,7 @@ extern "C" { void (*FreeDemuxPacket)(void* kodiInstance, DemuxPacket* pPacket); DemuxPacket* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize); - + void (*ConnectionStateChange)(void* kodiInstance, const char* strConnectionString, PVR_CONNECTION_STATE newState, const char *strMessage); void (*EpgEventStateChange)(void* kodiInstance, EPG_TAG* tag, unsigned int iUniqueChannelId, EPG_EVENT_STATE newState); @@ -652,10 +674,10 @@ extern "C" { long long (__cdecl* SeekLiveStream)(long long, int); long long (__cdecl* PositionLiveStream)(void); long long (__cdecl* LengthLiveStream)(void); - bool (__cdecl* SwitchChannel)(const PVR_CHANNEL&); PVR_ERROR (__cdecl* SignalStatus)(PVR_SIGNAL_STATUS&); PVR_ERROR (__cdecl* GetDescrambleInfo)(PVR_DESCRAMBLE_INFO*); - const char* (__cdecl* GetLiveStreamURL)(const PVR_CHANNEL&); + PVR_ERROR (__cdecl* GetChannelStreamProperties)(const PVR_CHANNEL*, PVR_NAMED_VALUE*, unsigned int*); + PVR_ERROR (__cdecl* GetRecordingStreamProperties)(const PVR_RECORDING*, PVR_NAMED_VALUE*, unsigned int*); bool (__cdecl* OpenRecordedStream)(const PVR_RECORDING&); void (__cdecl* CloseRecordedStream)(void); int (__cdecl* ReadRecordedStream)(unsigned char*, unsigned int); @@ -666,7 +688,6 @@ extern "C" { void (__cdecl* DemuxAbort)(void); void (__cdecl* DemuxFlush)(void); DemuxPacket* (__cdecl* DemuxRead)(void); - unsigned int (__cdecl* GetChannelSwitchDelay)(void); bool (__cdecl* CanPauseStream)(void); void (__cdecl* PauseStream)(bool); bool (__cdecl* CanSeekStream)(void); @@ -683,6 +704,7 @@ extern "C" { void (__cdecl* OnSystemWake)(void); void (__cdecl* OnPowerSavingActivated)(void); void (__cdecl* OnPowerSavingDeactivated)(void); + PVR_ERROR (__cdecl* GetStreamTimes)(PVR_STREAM_TIMES*); } KodiToAddonFuncTable_PVR; typedef struct AddonInstance_PVR @@ -695,4 +717,3 @@ extern "C" { #ifdef __cplusplus } #endif - diff --git a/xbmc/input/ActionIDs.h b/xbmc/input/ActionIDs.h index 14b8927..b88df78 100644 --- a/xbmc/input/ActionIDs.h +++ b/xbmc/input/ActionIDs.h @@ -288,6 +288,7 @@ #define ACTION_GESTURE_ZOOM 502 //!< sendaction with point and currentPinchScale (fingers together < 1.0 -> fingers apart > 1.0) #define ACTION_GESTURE_ROTATE 503 #define ACTION_GESTURE_PAN 504 +#define ACTION_GESTURE_ABORT 505 //!< gesture was interrupted in unspecified state #define ACTION_GESTURE_SWIPE_LEFT 511 #define ACTION_GESTURE_SWIPE_LEFT_TEN 520 -- cgit v1.2.3