diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h | 266 |
1 files changed, 155 insertions, 111 deletions
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 d36effa..8c509ac 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 | |||
| @@ -1,25 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | /* | 1 | /* |
| 4 | * Copyright (C) 2005-2015 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 5 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 6 | * | ||
| 7 | * This Program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 10 | * any later version. | ||
| 11 | * | ||
| 12 | * This Program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with Kodi; see the file COPYING. If not, see | ||
| 19 | * <http://www.gnu.org/licenses/>. | ||
| 20 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 21 | */ | 7 | */ |
| 22 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 23 | #include "xbmc_addon_dll.h" | 11 | #include "xbmc_addon_dll.h" |
| 24 | #include "xbmc_pvr_types.h" | 12 | #include "xbmc_pvr_types.h" |
| 25 | 13 | ||
| @@ -35,7 +23,7 @@ extern "C" | |||
| 35 | //@{ | 23 | //@{ |
| 36 | /*! | 24 | /*! |
| 37 | * Get the list of features that this add-on provides. | 25 | * Get the list of features that this add-on provides. |
| 38 | * Called by XBMC to query the add-on's capabilities. | 26 | * Called by Kodi to query the add-on's capabilities. |
| 39 | * Used to check which options should be presented in the UI, which methods to call, etc. | 27 | * Used to check which options should be presented in the UI, which methods to call, etc. |
| 40 | * All capabilities that the add-on supports should be set to true. | 28 | * All capabilities that the add-on supports should be set to true. |
| 41 | * @param pCapabilities The add-on's capabilities. | 29 | * @param pCapabilities The add-on's capabilities. |
| @@ -83,18 +71,19 @@ extern "C" | |||
| 83 | //@} | 71 | //@} |
| 84 | 72 | ||
| 85 | /*! @name PVR EPG methods | 73 | /*! @name PVR EPG methods |
| 86 | * @remarks Only used by XBMC if bSupportsEPG is set to true. | 74 | * @remarks Only used by Kodi if bSupportsEPG is set to true. |
| 87 | */ | 75 | */ |
| 88 | //@{ | 76 | //@{ |
| 89 | /*! | 77 | /*! |
| 90 | * Request the EPG for a channel from the backend. | 78 | * Request the EPG for a channel from the backend. |
| 91 | * EPG entries are added to XBMC by calling TransferEpgEntry() on the callback. | 79 | * EPG entries are added to Kodi by calling TransferEpgEntry() on the callback. |
| 92 | * @param handle Handle to pass to the callback method. | 80 | * @param handle Handle to pass to the callback method. |
| 93 | * @param channel The channel to get the EPG table for. | 81 | * @param channel The channel to get the EPG table for. |
| 94 | * @param iStart Get events after this time (UTC). | 82 | * @param iStart Get events after this time (UTC). |
| 95 | * @param iEnd Get events before this time (UTC). | 83 | * @param iEnd Get events before this time (UTC). |
| 96 | * @return PVR_ERROR_NO_ERROR if the table has been fetched successfully. | 84 | * @return PVR_ERROR_NO_ERROR if the table has been fetched successfully. |
| 97 | * @remarks Required if bSupportsEPG is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 85 | * @remarks Required if bSupportsEPG is set to true. |
| 86 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 98 | */ | 87 | */ |
| 99 | PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL& channel, time_t iStart, time_t iEnd); | 88 | PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL& channel, time_t iStart, time_t iEnd); |
| 100 | 89 | ||
| @@ -112,18 +101,20 @@ extern "C" | |||
| 112 | * @param tag the epg tag to check. | 101 | * @param tag the epg tag to check. |
| 113 | * @param [out] bIsPlayable Set to true if the tag can be played. | 102 | * @param [out] bIsPlayable Set to true if the tag can be played. |
| 114 | * @return PVR_ERROR_NO_ERROR if bIsPlayable has been set successfully. | 103 | * @return PVR_ERROR_NO_ERROR if bIsPlayable has been set successfully. |
| 115 | * @remarks Required if add-on supports playing epg tags. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 104 | * @remarks Required if add-on supports playing epg tags. |
| 105 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 116 | */ | 106 | */ |
| 117 | PVR_ERROR IsEPGTagPlayable(const EPG_TAG* tag, bool* bIsPlayable); | 107 | PVR_ERROR IsEPGTagPlayable(const EPG_TAG* tag, bool* bIsPlayable); |
| 118 | 108 | ||
| 119 | /*! | 109 | /*! |
| 120 | * Retrieve the edit decision list (EDL) of an EPG tag on the backend. | 110 | * Retrieve the edit decision list (EDL) of an EPG tag on the backend. |
| 121 | * @param epgTag The EPG tag. | 111 | * @param epgTag The EPG tag. |
| 122 | * @param edl out: The function has to write the EDL list into this array. | 112 | * @param edl out: The function has to write the EDL into this array. |
| 123 | * @param size in: The maximum size of the EDL, out: the actual size of the EDL. | 113 | * @param size in: The maximum size of the EDL, out: the actual size of the EDL. |
| 124 | * @return PVR_ERROR_NO_ERROR if the EDL was successfully read. | 114 | * @return PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists. |
| 125 | * @remarks Required if bSupportsEpgEdl is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 115 | * @remarks Required if bSupportsEpgEdl is set to true. |
| 126 | */ | 116 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. |
| 117 | */ | ||
| 127 | PVR_ERROR GetEPGTagEdl(const EPG_TAG* epgTag, PVR_EDL_ENTRY edl[], int *size); | 118 | PVR_ERROR GetEPGTagEdl(const EPG_TAG* epgTag, PVR_EDL_ENTRY edl[], int *size); |
| 128 | 119 | ||
| 129 | /*! | 120 | /*! |
| @@ -132,14 +123,16 @@ extern "C" | |||
| 132 | * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. | 123 | * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. |
| 133 | * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. | 124 | * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. |
| 134 | * @return PVR_ERROR_NO_ERROR if the stream is available. | 125 | * @return PVR_ERROR_NO_ERROR if the stream is available. |
| 135 | * @remarks Required if add-on supports playing epg tags. In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the epg tag. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 126 | * @remarks Required if add-on supports playing epg tags. |
| 127 | * In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the epg tag. | ||
| 128 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 136 | */ | 129 | */ |
| 137 | PVR_ERROR GetEPGTagStreamProperties(const EPG_TAG* tag, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); | 130 | PVR_ERROR GetEPGTagStreamProperties(const EPG_TAG* tag, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); |
| 138 | 131 | ||
| 139 | //@} | 132 | //@} |
| 140 | 133 | ||
| 141 | /*! @name PVR channel group methods | 134 | /*! @name PVR channel group methods |
| 142 | * @remarks Only used by XBMC is bSupportsChannelGroups is set to true. | 135 | * @remarks Only used by Kodi if bSupportsChannelGroups is set to true. |
| 143 | * If a group or one of the group members changes after the initial import, or if a new one was added, then the add-on | 136 | * If a group or one of the group members changes after the initial import, or if a new one was added, then the add-on |
| 144 | * should call TriggerChannelGroupsUpdate() | 137 | * should call TriggerChannelGroupsUpdate() |
| 145 | */ | 138 | */ |
| @@ -147,27 +140,30 @@ extern "C" | |||
| 147 | /*! | 140 | /*! |
| 148 | * Get the total amount of channel groups on the backend if it supports channel groups. | 141 | * Get the total amount of channel groups on the backend if it supports channel groups. |
| 149 | * @return The amount of channels, or -1 on error. | 142 | * @return The amount of channels, or -1 on error. |
| 150 | * @remarks Required if bSupportsChannelGroups is set to true. Return -1 if this add-on won't provide this function. | 143 | * @remarks Required if bSupportsChannelGroups is set to true. |
| 144 | * Return -1 if this add-on won't provide this function. | ||
| 151 | */ | 145 | */ |
| 152 | int GetChannelGroupsAmount(void); | 146 | int GetChannelGroupsAmount(void); |
| 153 | 147 | ||
| 154 | /*! | 148 | /*! |
| 155 | * Request the list of all channel groups from the backend if it supports channel groups. | 149 | * Request the list of all channel groups from the backend if it supports channel groups. |
| 156 | * Channel group entries are added to XBMC by calling TransferChannelGroup() on the callback. | 150 | * Channel group entries are added to Kodi by calling TransferChannelGroup() on the callback. |
| 157 | * @param handle Handle to pass to the callback method. | 151 | * @param handle Handle to pass to the callback method. |
| 158 | * @param bRadio True to get the radio channel groups, false to get the TV channel groups. | 152 | * @param bRadio True to get the radio channel groups, false to get the TV channel groups. |
| 159 | * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. | 153 | * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. |
| 160 | * @remarks Required if bSupportsChannelGroups is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 154 | * @remarks Required if bSupportsChannelGroups is set to true. |
| 155 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 161 | */ | 156 | */ |
| 162 | PVR_ERROR GetChannelGroups(ADDON_HANDLE handle, bool bRadio); | 157 | PVR_ERROR GetChannelGroups(ADDON_HANDLE handle, bool bRadio); |
| 163 | 158 | ||
| 164 | /*! | 159 | /*! |
| 165 | * Request the list of all group members of a group from the backend if it supports channel groups. | 160 | * Request the list of all group members of a group from the backend if it supports channel groups. |
| 166 | * Member entries are added to XBMC by calling TransferChannelGroupMember() on the callback. | 161 | * Member entries are added to Kodi by calling TransferChannelGroupMember() on the callback. |
| 167 | * @param handle Handle to pass to the callback method. | 162 | * @param handle Handle to pass to the callback method. |
| 168 | * @param group The group to get the members for. | 163 | * @param group The group to get the members for. |
| 169 | * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. | 164 | * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. |
| 170 | * @remarks Required if bSupportsChannelGroups is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 165 | * @remarks Required if bSupportsChannelGroups is set to true. |
| 166 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 171 | */ | 167 | */ |
| 172 | PVR_ERROR GetChannelGroupMembers(ADDON_HANDLE handle, const PVR_CHANNEL_GROUP& group); | 168 | PVR_ERROR GetChannelGroupMembers(ADDON_HANDLE handle, const PVR_CHANNEL_GROUP& group); |
| 173 | //@} | 169 | //@} |
| @@ -181,20 +177,21 @@ extern "C" | |||
| 181 | /*! | 177 | /*! |
| 182 | * Show the channel scan dialog if this backend supports it. | 178 | * Show the channel scan dialog if this backend supports it. |
| 183 | * @return PVR_ERROR_NO_ERROR if the dialog was displayed successfully. | 179 | * @return PVR_ERROR_NO_ERROR if the dialog was displayed successfully. |
| 184 | * @remarks Required if bSupportsChannelScan is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 180 | * @remarks Required if bSupportsChannelScan is set to true. |
| 181 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 185 | * @note see libKODI_guilib.h about related parts | 182 | * @note see libKODI_guilib.h about related parts |
| 186 | */ | 183 | */ |
| 187 | PVR_ERROR OpenDialogChannelScan(void); | 184 | PVR_ERROR OpenDialogChannelScan(void); |
| 188 | 185 | ||
| 189 | /*! | 186 | /*! |
| 190 | * @return The total amount of channels on the backend, or -1 on error. | 187 | * @return The total amount of channels on the backend, or -1 on error. |
| 191 | * @remarks Valid implementation required. | 188 | * @remarks Valid implementation required. |
| 192 | */ | 189 | */ |
| 193 | int GetChannelsAmount(void); | 190 | int GetChannelsAmount(void); |
| 194 | 191 | ||
| 195 | /*! | 192 | /*! |
| 196 | * Request the list of all channels from the backend. | 193 | * Request the list of all channels from the backend. |
| 197 | * Channel entries are added to XBMC by calling TransferChannelEntry() on the callback. | 194 | * Channel entries are added to Kodi by calling TransferChannelEntry() on the callback. |
| 198 | * @param handle Handle to pass to the callback method. | 195 | * @param handle Handle to pass to the callback method. |
| 199 | * @param bRadio True to get the radio channels, false to get the TV channels. | 196 | * @param bRadio True to get the radio channels, false to get the TV channels. |
| 200 | * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. | 197 | * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. |
| @@ -216,7 +213,8 @@ extern "C" | |||
| 216 | * Rename a channel on the backend. | 213 | * Rename a channel on the backend. |
| 217 | * @param channel The channel to rename, containing the new channel name. | 214 | * @param channel The channel to rename, containing the new channel name. |
| 218 | * @return PVR_ERROR_NO_ERROR if the channel has been renamed successfully. | 215 | * @return PVR_ERROR_NO_ERROR if the channel has been renamed successfully. |
| 219 | * @remarks Optional, and only used if bSupportsChannelSettings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 216 | * @remarks Optional, and only used if bSupportsChannelSettings is set to true. |
| 217 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 220 | */ | 218 | */ |
| 221 | PVR_ERROR RenameChannel(const PVR_CHANNEL& channel); | 219 | PVR_ERROR RenameChannel(const PVR_CHANNEL& channel); |
| 222 | 220 | ||
| @@ -240,7 +238,7 @@ extern "C" | |||
| 240 | //@} | 238 | //@} |
| 241 | 239 | ||
| 242 | /** @name PVR recording methods | 240 | /** @name PVR recording methods |
| 243 | * @remarks Only used by XBMC is bSupportsRecordings is set to true. | 241 | * @remarks Only used by Kodi if bSupportsRecordings is set to true. |
| 244 | * If a recording changes after the initial import, or if a new one was added, | 242 | * If a recording changes after the initial import, or if a new one was added, |
| 245 | * then the add-on should call TriggerRecordingUpdate() | 243 | * then the add-on should call TriggerRecordingUpdate() |
| 246 | */ | 244 | */ |
| @@ -254,11 +252,12 @@ extern "C" | |||
| 254 | 252 | ||
| 255 | /*! | 253 | /*! |
| 256 | * Request the list of all recordings from the backend, if supported. | 254 | * Request the list of all recordings from the backend, if supported. |
| 257 | * Recording entries are added to XBMC by calling TransferRecordingEntry() on the callback. | 255 | * Recording entries are added to Kodi by calling TransferRecordingEntry() on the callback. |
| 258 | * @param handle Handle to pass to the callback method. | 256 | * @param handle Handle to pass to the callback method. |
| 259 | * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true) | 257 | * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true) |
| 260 | * @return PVR_ERROR_NO_ERROR if the recordings have been fetched successfully. | 258 | * @return PVR_ERROR_NO_ERROR if the recordings have been fetched successfully. |
| 261 | * @remarks Required if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 259 | * @remarks Required if bSupportsRecordings is set to true. |
| 260 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 262 | */ | 261 | */ |
| 263 | PVR_ERROR GetRecordings(ADDON_HANDLE handle, bool deleted); | 262 | PVR_ERROR GetRecordings(ADDON_HANDLE handle, bool deleted); |
| 264 | 263 | ||
| @@ -266,7 +265,8 @@ extern "C" | |||
| 266 | * Delete a recording on the backend. | 265 | * Delete a recording on the backend. |
| 267 | * @param recording The recording to delete. | 266 | * @param recording The recording to delete. |
| 268 | * @return PVR_ERROR_NO_ERROR if the recording has been deleted successfully. | 267 | * @return PVR_ERROR_NO_ERROR if the recording has been deleted successfully. |
| 269 | * @remarks Optional, and only used if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 268 | * @remarks Optional, and only used if bSupportsRecordings is set to true. |
| 269 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 270 | */ | 270 | */ |
| 271 | PVR_ERROR DeleteRecording(const PVR_RECORDING& recording); | 271 | PVR_ERROR DeleteRecording(const PVR_RECORDING& recording); |
| 272 | 272 | ||
| @@ -274,7 +274,8 @@ extern "C" | |||
| 274 | * Undelete a recording on the backend. | 274 | * Undelete a recording on the backend. |
| 275 | * @param recording The recording to undelete. | 275 | * @param recording The recording to undelete. |
| 276 | * @return PVR_ERROR_NO_ERROR if the recording has been undeleted successfully. | 276 | * @return PVR_ERROR_NO_ERROR if the recording has been undeleted successfully. |
| 277 | * @remarks Optional, and only used if bSupportsRecordingsUndelete is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 277 | * @remarks Optional, and only used if bSupportsRecordingsUndelete is set to true. |
| 278 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 278 | */ | 279 | */ |
| 279 | PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording); | 280 | PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording); |
| 280 | 281 | ||
| @@ -288,7 +289,8 @@ extern "C" | |||
| 288 | * Rename a recording on the backend. | 289 | * Rename a recording on the backend. |
| 289 | * @param recording The recording to rename, containing the new name. | 290 | * @param recording The recording to rename, containing the new name. |
| 290 | * @return PVR_ERROR_NO_ERROR if the recording has been renamed successfully. | 291 | * @return PVR_ERROR_NO_ERROR if the recording has been renamed successfully. |
| 291 | * @remarks Optional, and only used if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 292 | * @remarks Optional, and only used if bSupportsRecordings is set to true. |
| 293 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 292 | */ | 294 | */ |
| 293 | PVR_ERROR RenameRecording(const PVR_RECORDING& recording); | 295 | PVR_ERROR RenameRecording(const PVR_RECORDING& recording); |
| 294 | 296 | ||
| @@ -296,7 +298,8 @@ extern "C" | |||
| 296 | * Set the lifetime of a recording on the backend. | 298 | * Set the lifetime of a recording on the backend. |
| 297 | * @param recording The recording to change the lifetime for. recording.iLifetime contains the new lieftime value. | 299 | * @param recording The recording to change the lifetime for. recording.iLifetime contains the new lieftime value. |
| 298 | * @return PVR_ERROR_NO_ERROR if the recording's lifetime has been set successfully. | 300 | * @return PVR_ERROR_NO_ERROR if the recording's lifetime has been set successfully. |
| 299 | * @remarks Required if bSupportsRecordingsLifetimeChange is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 301 | * @remarks Required if bSupportsRecordingsLifetimeChange is set to true. |
| 302 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 300 | */ | 303 | */ |
| 301 | PVR_ERROR SetRecordingLifetime(const PVR_RECORDING* recording); | 304 | PVR_ERROR SetRecordingLifetime(const PVR_RECORDING* recording); |
| 302 | 305 | ||
| @@ -305,49 +308,54 @@ extern "C" | |||
| 305 | * @param recording The recording to change the play count. | 308 | * @param recording The recording to change the play count. |
| 306 | * @param count Play count. | 309 | * @param count Play count. |
| 307 | * @return PVR_ERROR_NO_ERROR if the recording's play count has been set successfully. | 310 | * @return PVR_ERROR_NO_ERROR if the recording's play count has been set successfully. |
| 308 | * @remarks Required if bSupportsRecordingPlayCount is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 311 | * @remarks Required if bSupportsRecordingPlayCount is set to true. |
| 312 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 309 | */ | 313 | */ |
| 310 | PVR_ERROR SetRecordingPlayCount(const PVR_RECORDING& recording, int count); | 314 | PVR_ERROR SetRecordingPlayCount(const PVR_RECORDING& recording, int count); |
| 311 | 315 | ||
| 312 | /*! | 316 | /*! |
| 313 | * Set the last watched position of a recording on the backend. | 317 | * Set the last watched position of a recording on the backend. |
| 314 | * @param recording The recording. | 318 | * @param recording The recording. |
| 315 | * @param position The last watched position in seconds | 319 | * @param position The last watched position in seconds |
| 316 | * @return PVR_ERROR_NO_ERROR if the position has been stored successfully. | 320 | * @return PVR_ERROR_NO_ERROR if the position has been stored successfully. |
| 317 | * @remarks Required if bSupportsLastPlayedPosition is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 321 | * @remarks Required if bSupportsLastPlayedPosition is set to true. |
| 318 | */ | 322 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. |
| 323 | */ | ||
| 319 | PVR_ERROR SetRecordingLastPlayedPosition(const PVR_RECORDING& recording, int lastplayedposition); | 324 | PVR_ERROR SetRecordingLastPlayedPosition(const PVR_RECORDING& recording, int lastplayedposition); |
| 320 | 325 | ||
| 321 | /*! | 326 | /*! |
| 322 | * Retrieve the last watched position of a recording on the backend. | 327 | * Retrieve the last watched position of a recording on the backend. |
| 323 | * @param recording The recording. | 328 | * @param recording The recording. |
| 324 | * @return The last watched position in seconds or -1 on error | 329 | * @return The last watched position in seconds or -1 on error |
| 325 | * @remarks Required if bSupportsRecordingPlayCount is set to true. Return -1 if this add-on won't provide this function. | 330 | * @remarks Required if bSupportsRecordingPlayCount is set to true. |
| 326 | */ | 331 | * Return -1 if this add-on won't provide this function. |
| 332 | */ | ||
| 327 | int GetRecordingLastPlayedPosition(const PVR_RECORDING& recording); | 333 | int GetRecordingLastPlayedPosition(const PVR_RECORDING& recording); |
| 328 | 334 | ||
| 329 | /*! | 335 | /*! |
| 330 | * Retrieve the edit decision list (EDL) of a recording on the backend. | 336 | * Retrieve the edit decision list (EDL) of a recording on the backend. |
| 331 | * @param recording The recording. | 337 | * @param recording The recording. |
| 332 | * @param edl out: The function has to write the EDL list into this array. | 338 | * @param edl out: The function has to write the EDL into this array. |
| 333 | * @param size in: The maximum size of the EDL, out: the actual size of the EDL. | 339 | * @param size in: The maximum size of the EDL, out: the actual size of the EDL. |
| 334 | * @return PVR_ERROR_NO_ERROR if the EDL was successfully read. | 340 | * @return PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists. |
| 335 | * @remarks Required if bSupportsRecordingEdl is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 341 | * @remarks Required if bSupportsRecordingEdl is set to true. |
| 336 | */ | 342 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. |
| 343 | */ | ||
| 337 | PVR_ERROR GetRecordingEdl(const PVR_RECORDING& recording, PVR_EDL_ENTRY edl[], int *size); | 344 | PVR_ERROR GetRecordingEdl(const PVR_RECORDING& recording, PVR_EDL_ENTRY edl[], int *size); |
| 338 | 345 | ||
| 339 | /*! | 346 | /*! |
| 340 | * Retrieve the timer types supported by the backend. | 347 | * Retrieve the timer types supported by the backend. |
| 341 | * @param types out: The function has to write the definition of the supported timer types into this array. | 348 | * @param types out: The function has to write the definition of the supported timer types into this array. |
| 342 | * @param typesCount in: The maximum size of the list, out: the actual size of the list. default: PVR_ADDON_TIMERTYPE_ARRAY_SIZE | 349 | * @param typesCount in: The maximum size of the list, out: the actual size of the list. default: PVR_ADDON_TIMERTYPE_ARRAY_SIZE |
| 343 | * @return PVR_ERROR_NO_ERROR if the types were successfully written to the array. | 350 | * @return PVR_ERROR_NO_ERROR if the types were successfully written to the array. |
| 344 | * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 351 | * @remarks Required if bSupportsTimers is set to true. |
| 345 | */ | 352 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. |
| 353 | */ | ||
| 346 | PVR_ERROR GetTimerTypes(PVR_TIMER_TYPE types[], int *typesCount); | 354 | PVR_ERROR GetTimerTypes(PVR_TIMER_TYPE types[], int *typesCount); |
| 347 | 355 | ||
| 348 | //@} | 356 | //@} |
| 349 | /** @name PVR timer methods | 357 | /** @name PVR timer methods |
| 350 | * @remarks Only used by XBMC is bSupportsTimers is set to true. | 358 | * @remarks Only used by Kodi if bSupportsTimers is set to true. |
| 351 | * If a timer changes after the initial import, or if a new one was added, | 359 | * If a timer changes after the initial import, or if a new one was added, |
| 352 | * then the add-on should call TriggerTimerUpdate() | 360 | * then the add-on should call TriggerTimerUpdate() |
| 353 | */ | 361 | */ |
| @@ -360,10 +368,11 @@ extern "C" | |||
| 360 | 368 | ||
| 361 | /*! | 369 | /*! |
| 362 | * Request the list of all timers from the backend if supported. | 370 | * Request the list of all timers from the backend if supported. |
| 363 | * Timer entries are added to XBMC by calling TransferTimerEntry() on the callback. | 371 | * Timer entries are added to Kodi by calling TransferTimerEntry() on the callback. |
| 364 | * @param handle Handle to pass to the callback method. | 372 | * @param handle Handle to pass to the callback method. |
| 365 | * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. | 373 | * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. |
| 366 | * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 374 | * @remarks Required if bSupportsTimers is set to true. |
| 375 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 367 | */ | 376 | */ |
| 368 | PVR_ERROR GetTimers(ADDON_HANDLE handle); | 377 | PVR_ERROR GetTimers(ADDON_HANDLE handle); |
| 369 | 378 | ||
| @@ -371,7 +380,8 @@ extern "C" | |||
| 371 | * Add a timer on the backend. | 380 | * Add a timer on the backend. |
| 372 | * @param timer The timer to add. | 381 | * @param timer The timer to add. |
| 373 | * @return PVR_ERROR_NO_ERROR if the timer has been added successfully. | 382 | * @return PVR_ERROR_NO_ERROR if the timer has been added successfully. |
| 374 | * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 383 | * @remarks Required if bSupportsTimers is set to true. |
| 384 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 375 | */ | 385 | */ |
| 376 | PVR_ERROR AddTimer(const PVR_TIMER& timer); | 386 | PVR_ERROR AddTimer(const PVR_TIMER& timer); |
| 377 | 387 | ||
| @@ -380,7 +390,8 @@ extern "C" | |||
| 380 | * @param timer The timer to delete. | 390 | * @param timer The timer to delete. |
| 381 | * @param bForceDelete Set to true to delete a timer that is currently recording a program. | 391 | * @param bForceDelete Set to true to delete a timer that is currently recording a program. |
| 382 | * @return PVR_ERROR_NO_ERROR if the timer has been deleted successfully. | 392 | * @return PVR_ERROR_NO_ERROR if the timer has been deleted successfully. |
| 383 | * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 393 | * @remarks Required if bSupportsTimers is set to true. |
| 394 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 384 | */ | 395 | */ |
| 385 | PVR_ERROR DeleteTimer(const PVR_TIMER& timer, bool bForceDelete); | 396 | PVR_ERROR DeleteTimer(const PVR_TIMER& timer, bool bForceDelete); |
| 386 | 397 | ||
| @@ -388,7 +399,8 @@ extern "C" | |||
| 388 | * Update the timer information on the backend. | 399 | * Update the timer information on the backend. |
| 389 | * @param timer The timer to update. | 400 | * @param timer The timer to update. |
| 390 | * @return PVR_ERROR_NO_ERROR if the timer has been updated successfully. | 401 | * @return PVR_ERROR_NO_ERROR if the timer has been updated successfully. |
| 391 | * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 402 | * @remarks Required if bSupportsTimers is set to true. |
| 403 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 392 | */ | 404 | */ |
| 393 | PVR_ERROR UpdateTimer(const PVR_TIMER& timer); | 405 | PVR_ERROR UpdateTimer(const PVR_TIMER& timer); |
| 394 | 406 | ||
| @@ -400,7 +412,8 @@ extern "C" | |||
| 400 | * Open a live stream on the backend. | 412 | * Open a live stream on the backend. |
| 401 | * @param channel The channel to stream. | 413 | * @param channel The channel to stream. |
| 402 | * @return True if the stream has been opened successfully, false otherwise. | 414 | * @return True if the stream has been opened successfully, false otherwise. |
| 403 | * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. Return false if this add-on won't provide this function. | 415 | * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. |
| 416 | * Return false if this add-on won't provide this function. | ||
| 404 | */ | 417 | */ |
| 405 | bool OpenLiveStream(const PVR_CHANNEL& channel); | 418 | bool OpenLiveStream(const PVR_CHANNEL& channel); |
| 406 | 419 | ||
| @@ -415,7 +428,8 @@ extern "C" | |||
| 415 | * @param pBuffer The buffer to store the data in. | 428 | * @param pBuffer The buffer to store the data in. |
| 416 | * @param iBufferSize The amount of bytes to read. | 429 | * @param iBufferSize The amount of bytes to read. |
| 417 | * @return The amount of bytes that were actually read from the stream. | 430 | * @return The amount of bytes that were actually read from the stream. |
| 418 | * @remarks Required if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. | 431 | * @remarks Required if bHandlesInputStream is set to true. |
| 432 | * Return -1 if this add-on won't provide this function. | ||
| 419 | */ | 433 | */ |
| 420 | int ReadLiveStream(unsigned char* pBuffer, unsigned int iBufferSize); | 434 | int ReadLiveStream(unsigned char* pBuffer, unsigned int iBufferSize); |
| 421 | 435 | ||
| @@ -424,29 +438,34 @@ extern "C" | |||
| 424 | * @param iPosition The position to seek to. | 438 | * @param iPosition The position to seek to. |
| 425 | * @param iWhence ? | 439 | * @param iWhence ? |
| 426 | * @return The new position. | 440 | * @return The new position. |
| 427 | * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. | 441 | * @remarks Optional, and only used if bHandlesInputStream is set to true. |
| 442 | * Return -1 if this add-on won't provide this function. | ||
| 428 | */ | 443 | */ |
| 429 | long long SeekLiveStream(long long iPosition, int iWhence = SEEK_SET); | 444 | long long SeekLiveStream(long long iPosition, int iWhence = SEEK_SET); |
| 430 | 445 | ||
| 431 | /*! | 446 | /*! |
| 447 | * Obtain the length of a live stream. | ||
| 432 | * @return The total length of the stream that's currently being read. | 448 | * @return The total length of the stream that's currently being read. |
| 433 | * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. | 449 | * @remarks Optional, and only used if bHandlesInputStream is set to true. |
| 450 | * Return -1 if this add-on won't provide this function. | ||
| 434 | */ | 451 | */ |
| 435 | long long LengthLiveStream(void); | 452 | long long LengthLiveStream(void); |
| 436 | 453 | ||
| 437 | /*! | 454 | /*! |
| 438 | * Get the signal status of the stream that's currently open. | 455 | * Get the signal status of the stream that's currently open. |
| 439 | * @param signalStatus The signal status. | 456 | * @param signalStatus The signal status. |
| 440 | * @return True if the signal status has been read successfully, false otherwise. | 457 | * @return PVR_ERROR_NO_ERROR if the signal status has been read successfully, false otherwise. |
| 441 | * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bHandlesInputStream or PVR_ADDON_CAPABILITIES::bHandlesDemuxing is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 458 | * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bHandlesInputStream or PVR_ADDON_CAPABILITIES::bHandlesDemuxing is set to true. |
| 459 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 442 | */ | 460 | */ |
| 443 | PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS& signalStatus); | 461 | PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS& signalStatus); |
| 444 | 462 | ||
| 445 | /*! | 463 | /*! |
| 446 | * Get the descramble information of the stream that's currently open. | 464 | * Get the descramble information of the stream that's currently open. |
| 447 | * @param[out] descrambleInfo The descramble information. | 465 | * @param [out] descrambleInfo The descramble information. |
| 448 | * @return True if the decramble information has been read successfully, false otherwise. | 466 | * @return PVR_ERROR_NO_ERROR if the descramble information has been read successfully, false otherwise. |
| 449 | * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bSupportsDescrambleInfo is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 467 | * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bSupportsDescrambleInfo is set to true. |
| 468 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 450 | */ | 469 | */ |
| 451 | PVR_ERROR GetDescrambleInfo(PVR_DESCRAMBLE_INFO* descrambleInfo); | 470 | PVR_ERROR GetDescrambleInfo(PVR_DESCRAMBLE_INFO* descrambleInfo); |
| 452 | 471 | ||
| @@ -456,7 +475,9 @@ extern "C" | |||
| 456 | * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. | 475 | * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. |
| 457 | * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. | 476 | * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. |
| 458 | * @return PVR_ERROR_NO_ERROR if the stream is available. | 477 | * @return PVR_ERROR_NO_ERROR if the stream is available. |
| 459 | * @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. | 478 | * @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. |
| 479 | * In this case the implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the channel. | ||
| 480 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 460 | */ | 481 | */ |
| 461 | PVR_ERROR GetChannelStreamProperties(const PVR_CHANNEL* channel, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); | 482 | PVR_ERROR GetChannelStreamProperties(const PVR_CHANNEL* channel, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); |
| 462 | 483 | ||
| @@ -466,7 +487,9 @@ extern "C" | |||
| 466 | * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. | 487 | * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. |
| 467 | * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. | 488 | * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. |
| 468 | * @return PVR_ERROR_NO_ERROR if the stream is available. | 489 | * @return PVR_ERROR_NO_ERROR if the stream is available. |
| 469 | * @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. | 490 | * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsRecordings is set to true and the add-on does not implement recording stream functions (OpenRecordedStream, ...). |
| 491 | * In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the recording. | ||
| 492 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 470 | */ | 493 | */ |
| 471 | PVR_ERROR GetRecordingStreamProperties(const PVR_RECORDING* recording, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); | 494 | PVR_ERROR GetRecordingStreamProperties(const PVR_RECORDING* recording, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); |
| 472 | 495 | ||
| @@ -474,7 +497,8 @@ extern "C" | |||
| 474 | * Get the stream properties of the stream that's currently being read. | 497 | * Get the stream properties of the stream that's currently being read. |
| 475 | * @param pProperties The properties of the currently playing stream. | 498 | * @param pProperties The properties of the currently playing stream. |
| 476 | * @return PVR_ERROR_NO_ERROR if the properties have been fetched successfully. | 499 | * @return PVR_ERROR_NO_ERROR if the properties have been fetched successfully. |
| 477 | * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | 500 | * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. |
| 501 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. | ||
| 478 | */ | 502 | */ |
| 479 | PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties); | 503 | PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties); |
| 480 | //@} | 504 | //@} |
| @@ -484,10 +508,22 @@ extern "C" | |||
| 484 | */ | 508 | */ |
| 485 | //@{ | 509 | //@{ |
| 486 | /*! | 510 | /*! |
| 511 | * Obtain the chunk size to use when reading streams. | ||
| 512 | * @param chunksize must be filled with the chunk size in bytes. | ||
| 513 | * @return PVR_ERROR_NO_ERROR if the chunk size has been fetched successfully. | ||
| 514 | * @remarks Optional, and only used if not reading from demuxer (=> DemuxRead) and | ||
| 515 | * PVR_ADDON_CAPABILITIES::bSupportsRecordings is true (=> ReadRecordedStream) or | ||
| 516 | * PVR_ADDON_CAPABILITIES::bHandlesInputStream is true (=> ReadLiveStream). | ||
| 517 | * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. In this case Kodi will decide on the chunk size to use. | ||
| 518 | */ | ||
| 519 | PVR_ERROR GetStreamReadChunkSize(int* chunksize); | ||
| 520 | |||
| 521 | /*! | ||
| 487 | * Open a stream to a recording on the backend. | 522 | * Open a stream to a recording on the backend. |
| 488 | * @param recording The recording to open. | 523 | * @param recording The recording to open. |
| 489 | * @return True if the stream has been opened successfully, false otherwise. | 524 | * @return True if the stream has been opened successfully, false otherwise. |
| 490 | * @remarks Optional, and only used if bSupportsRecordings is set to true. Return false if this add-on won't provide this function. | 525 | * @remarks Optional, and only used if bSupportsRecordings is set to true. |
| 526 | * Return false if this add-on won't provide this function. | ||
| 491 | */ | 527 | */ |
| 492 | bool OpenRecordedStream(const PVR_RECORDING& recording); | 528 | bool OpenRecordedStream(const PVR_RECORDING& recording); |
| 493 | 529 | ||
| @@ -502,7 +538,8 @@ extern "C" | |||
| 502 | * @param pBuffer The buffer to store the data in. | 538 | * @param pBuffer The buffer to store the data in. |
| 503 | * @param iBufferSize The amount of bytes to read. | 539 | * @param iBufferSize The amount of bytes to read. |
| 504 | * @return The amount of bytes that were actually read from the stream. | 540 | * @return The amount of bytes that were actually read from the stream. |
| 505 | * @remarks Optional, and only used if bSupportsRecordings is set to true, but required if OpenRecordedStream() is implemented. Return -1 if this add-on won't provide this function. | 541 | * @remarks Optional, and only used if bSupportsRecordings is set to true, but required if OpenRecordedStream() is implemented. |
| 542 | * Return -1 if this add-on won't provide this function. | ||
| 506 | */ | 543 | */ |
| 507 | int ReadRecordedStream(unsigned char* pBuffer, unsigned int iBufferSize); | 544 | int ReadRecordedStream(unsigned char* pBuffer, unsigned int iBufferSize); |
| 508 | 545 | ||
| @@ -511,19 +548,23 @@ extern "C" | |||
| 511 | * @param iPosition The position to seek to. | 548 | * @param iPosition The position to seek to. |
| 512 | * @param iWhence ? | 549 | * @param iWhence ? |
| 513 | * @return The new position. | 550 | * @return The new position. |
| 514 | * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function. | 551 | * @remarks Optional, and only used if bSupportsRecordings is set to true. |
| 552 | * Return -1 if this add-on won't provide this function. | ||
| 515 | */ | 553 | */ |
| 516 | long long SeekRecordedStream(long long iPosition, int iWhence = SEEK_SET); | 554 | long long SeekRecordedStream(long long iPosition, int iWhence = SEEK_SET); |
| 517 | 555 | ||
| 518 | /*! | 556 | /*! |
| 557 | * Obtain the length of a recorded stream. | ||
| 519 | * @return The total length of the stream that's currently being read. | 558 | * @return The total length of the stream that's currently being read. |
| 520 | * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function. | 559 | * @remarks Optional, and only used if bSupportsRecordings is set to true. |
| 560 | * Return -1 if this add-on won't provide this function. | ||
| 521 | */ | 561 | */ |
| 522 | long long LengthRecordedStream(void); | 562 | long long LengthRecordedStream(void); |
| 563 | |||
| 523 | //@} | 564 | //@} |
| 524 | 565 | ||
| 525 | /** @name PVR demultiplexer methods | 566 | /** @name PVR demultiplexer methods |
| 526 | * @remarks Only used by XBMC is bHandlesDemuxing is set to true. | 567 | * @remarks Only used by Kodi if bHandlesDemuxing is set to true. |
| 527 | */ | 568 | */ |
| 528 | //@{ | 569 | //@{ |
| 529 | /*! | 570 | /*! |
| @@ -549,47 +590,49 @@ extern "C" | |||
| 549 | * @return The next packet. | 590 | * @return The next packet. |
| 550 | * If there is no next packet, then the add-on should return the | 591 | * If there is no next packet, then the add-on should return the |
| 551 | * packet created by calling AllocateDemuxPacket(0) on the callback. | 592 | * packet created by calling AllocateDemuxPacket(0) on the callback. |
| 552 | * If the stream changed and XBMC's player needs to be reinitialised, | 593 | * If the stream changed and Kodi's player needs to be reinitialised, |
| 553 | * then, the add-on should call AllocateDemuxPacket(0) on the | 594 | * then, the add-on should call AllocateDemuxPacket(0) on the |
| 554 | * callback, and set the streamid to DMX_SPECIALID_STREAMCHANGE and | 595 | * callback, and set the streamid to DMX_SPECIALID_STREAMCHANGE and |
| 555 | * return the value. | 596 | * return the value. |
| 556 | * The add-on should return NULL if an error occured. | 597 | * The add-on should return NULL if an error occured. |
| 557 | * @remarks Required if bHandlesDemuxing is set to true. Return NULL if this add-on won't provide this function. | 598 | * @remarks Required if bHandlesDemuxing is set to true. |
| 599 | * Return NULL if this add-on won't provide this function. | ||
| 558 | */ | 600 | */ |
| 559 | DemuxPacket* DemuxRead(void); | 601 | DemuxPacket* DemuxRead(void); |
| 560 | //@} | 602 | //@} |
| 561 | 603 | ||
| 562 | /*! | 604 | /*! |
| 563 | * Check if the backend support pausing the currently playing stream | 605 | * Check if the backend support pausing the currently playing stream |
| 564 | * This will enable/disable the pause button in XBMC based on the return value | 606 | * This will enable/disable the pause button in Kodi based on the return value |
| 565 | * @return false if the PVR addon/backend does not support pausing, true if possible | 607 | * @return false if the PVR addon/backend does not support pausing, true if possible |
| 566 | */ | 608 | */ |
| 567 | bool CanPauseStream(); | 609 | bool CanPauseStream(); |
| 568 | 610 | ||
| 569 | /*! | 611 | /*! |
| 570 | * Check if the backend supports seeking for the currently playing stream | 612 | * Check if the backend supports seeking for the currently playing stream |
| 571 | * This will enable/disable the rewind/forward buttons in XBMC based on the return value | 613 | * This will enable/disable the rewind/forward buttons in Kodi based on the return value |
| 572 | * @return false if the PVR addon/backend does not support seeking, true if possible | 614 | * @return false if the PVR addon/backend does not support seeking, true if possible |
| 573 | */ | 615 | */ |
| 574 | bool CanSeekStream(); | 616 | bool CanSeekStream(); |
| 575 | 617 | ||
| 576 | /*! | 618 | /*! |
| 577 | * @brief Notify the pvr addon that XBMC (un)paused the currently playing stream | 619 | * @brief Notify the pvr addon that Kodi (un)paused the currently playing stream |
| 578 | */ | 620 | */ |
| 579 | void PauseStream(bool bPaused); | 621 | void PauseStream(bool bPaused); |
| 580 | 622 | ||
| 581 | /*! | 623 | /*! |
| 582 | * Notify the pvr addon/demuxer that XBMC wishes to seek the stream by time | 624 | * Notify the pvr addon/demuxer that Kodi wishes to seek the stream by time |
| 583 | * @param time The absolute time since stream start | 625 | * @param time The absolute time since stream start |
| 584 | * @param backwards True to seek to keyframe BEFORE time, else AFTER | 626 | * @param backwards True to seek to keyframe BEFORE time, else AFTER |
| 585 | * @param startpts can be updated to point to where display should start | 627 | * @param startpts can be updated to point to where display should start |
| 586 | * @return True if the seek operation was possible | 628 | * @return True if the seek operation was possible |
| 587 | * @remarks Optional, and only used if addon has its own demuxer. Return False if this add-on won't provide this function. | 629 | * @remarks Optional, and only used if addon has its own demuxer. |
| 630 | * Return False if this add-on won't provide this function. | ||
| 588 | */ | 631 | */ |
| 589 | bool SeekTime(double time, bool backwards, double *startpts); | 632 | bool SeekTime(double time, bool backwards, double *startpts); |
| 590 | 633 | ||
| 591 | /*! | 634 | /*! |
| 592 | * Notify the pvr addon/demuxer that XBMC wishes to change playback speed | 635 | * Notify the pvr addon/demuxer that Kodi wishes to change playback speed |
| 593 | * @param speed The requested playback speed | 636 | * @param speed The requested playback speed |
| 594 | * @remarks Optional, and only used if addon has its own demuxer. | 637 | * @remarks Optional, and only used if addon has its own demuxer. |
| 595 | */ | 638 | */ |
| @@ -597,8 +640,7 @@ extern "C" | |||
| 597 | 640 | ||
| 598 | /*! | 641 | /*! |
| 599 | * Get the hostname of the pvr backend server | 642 | * Get the hostname of the pvr backend server |
| 600 | * @return hostname as ip address or alias. If backend does not | 643 | * @return hostname as ip address or alias. If backend does not utilize a server, return empty string. |
| 601 | * utilize a server, return empty string. | ||
| 602 | */ | 644 | */ |
| 603 | const char* GetBackendHostname(); | 645 | const char* GetBackendHostname(); |
| 604 | 646 | ||
| @@ -639,7 +681,7 @@ extern "C" | |||
| 639 | PVR_ERROR GetStreamTimes(PVR_STREAM_TIMES *times); | 681 | PVR_ERROR GetStreamTimes(PVR_STREAM_TIMES *times); |
| 640 | 682 | ||
| 641 | /*! | 683 | /*! |
| 642 | * Called by XBMC to assign the function pointers of this add-on to pClient. | 684 | * Called by Kodi to assign the function pointers of this add-on to pClient. |
| 643 | * @param ptr The struct to assign the function pointers to. | 685 | * @param ptr The struct to assign the function pointers to. |
| 644 | */ | 686 | */ |
| 645 | void __declspec(dllexport) get_addon(void* ptr) | 687 | void __declspec(dllexport) get_addon(void* ptr) |
| @@ -731,5 +773,7 @@ extern "C" | |||
| 731 | pClient->toAddon.OnPowerSavingActivated = OnPowerSavingActivated; | 773 | pClient->toAddon.OnPowerSavingActivated = OnPowerSavingActivated; |
| 732 | pClient->toAddon.OnPowerSavingDeactivated = OnPowerSavingDeactivated; | 774 | pClient->toAddon.OnPowerSavingDeactivated = OnPowerSavingDeactivated; |
| 733 | pClient->toAddon.GetStreamTimes = GetStreamTimes; | 775 | pClient->toAddon.GetStreamTimes = GetStreamTimes; |
| 776 | |||
| 777 | pClient->toAddon.GetStreamReadChunkSize = GetStreamReadChunkSize; | ||
| 734 | }; | 778 | }; |
| 735 | }; | 779 | }; |
