Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
xbmc_pvr_dll.h File Reference
#include "xbmc_addon_dll.h"
#include "xbmc_pvr_types.h"

Functions

PVR add-on methods

Functions that the PVR client add-on must implement, but some can be empty.

The 'remarks' field indicates which methods should be implemented, and which ones are optional.

PVR_ERROR GetAddonCapabilities (PVR_ADDON_CAPABILITIES *pCapabilities)
 
const char * GetBackendName (void)
 
const char * GetBackendVersion (void)
 
const char * GetConnectionString (void)
 
PVR_ERROR GetDriveSpace (long long *iTotal, long long *iUsed)
 
PVR_ERROR CallMenuHook (const PVR_MENUHOOK &menuhook, const PVR_MENUHOOK_DATA &item)
 
PVR EPG methods
Remarks
Only used by Kodi if bSupportsEPG is set to true.
PVR_ERROR GetEPGForChannel (ADDON_HANDLE handle, const PVR_CHANNEL &channel, time_t iStart, time_t iEnd)
 
PVR_ERROR IsEPGTagRecordable (const EPG_TAG *tag, bool *bIsRecordable)
 
PVR_ERROR IsEPGTagPlayable (const EPG_TAG *tag, bool *bIsPlayable)
 
PVR_ERROR GetEPGTagEdl (const EPG_TAG *epgTag, PVR_EDL_ENTRY edl[], int *size)
 
PVR_ERROR GetEPGTagStreamProperties (const EPG_TAG *tag, PVR_NAMED_VALUE *properties, unsigned int *iPropertiesCount)
 
PVR channel group methods
Remarks
Only used by Kodi if bSupportsChannelGroups is set to true. 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 should call TriggerChannelGroupsUpdate()
int GetChannelGroupsAmount (void)
 
PVR_ERROR GetChannelGroups (ADDON_HANDLE handle, bool bRadio)
 
PVR_ERROR GetChannelGroupMembers (ADDON_HANDLE handle, const PVR_CHANNEL_GROUP &group)
 
PVR channel methods
Remarks
Either bSupportsTV or bSupportsRadio is required to be set to true. If a channel changes after the initial import, or if a new one was added, then the add-on should call TriggerChannelUpdate()
PVR_ERROR OpenDialogChannelScan (void)
 
int GetChannelsAmount (void)
 
PVR_ERROR GetChannels (ADDON_HANDLE handle, bool bRadio)
 
PVR_ERROR DeleteChannel (const PVR_CHANNEL &channel)
 
PVR_ERROR RenameChannel (const PVR_CHANNEL &channel)
 
PVR_ERROR OpenDialogChannelSettings (const PVR_CHANNEL &channel)
 
PVR_ERROR OpenDialogChannelAdd (const PVR_CHANNEL &channel)
 
PVR recording methods
Remarks
Only used by Kodi if bSupportsRecordings is set to true. If a recording changes after the initial import, or if a new one was added, then the add-on should call TriggerRecordingUpdate()
int GetRecordingsAmount (bool deleted)
 
PVR_ERROR GetRecordings (ADDON_HANDLE handle, bool deleted)
 
PVR_ERROR DeleteRecording (const PVR_RECORDING &recording)
 
PVR_ERROR UndeleteRecording (const PVR_RECORDING &recording)
 
PVR_ERROR DeleteAllRecordingsFromTrash ()
 Delete all recordings permanent which in the deleted folder on the backend. More...
 
PVR_ERROR RenameRecording (const PVR_RECORDING &recording)
 
PVR_ERROR SetRecordingLifetime (const PVR_RECORDING *recording)
 
PVR_ERROR SetRecordingPlayCount (const PVR_RECORDING &recording, int count)
 
PVR_ERROR SetRecordingLastPlayedPosition (const PVR_RECORDING &recording, int lastplayedposition)
 
int GetRecordingLastPlayedPosition (const PVR_RECORDING &recording)
 
PVR_ERROR GetRecordingEdl (const PVR_RECORDING &recording, PVR_EDL_ENTRY edl[], int *size)
 
PVR_ERROR GetTimerTypes (PVR_TIMER_TYPE types[], int *typesCount)
 
PVR timer methods
Remarks
Only used by Kodi if bSupportsTimers is set to true. If a timer changes after the initial import, or if a new one was added, then the add-on should call TriggerTimerUpdate()
int GetTimersAmount (void)
 
PVR_ERROR GetTimers (ADDON_HANDLE handle)
 
PVR_ERROR AddTimer (const PVR_TIMER &timer)
 
PVR_ERROR DeleteTimer (const PVR_TIMER &timer, bool bForceDelete)
 
PVR_ERROR UpdateTimer (const PVR_TIMER &timer)
 
PVR live stream methods, used to open and close a stream to a channel, and optionally perform read operations on the stream
bool OpenLiveStream (const PVR_CHANNEL &channel)
 
void CloseLiveStream (void)
 
int ReadLiveStream (unsigned char *pBuffer, unsigned int iBufferSize)
 
long long SeekLiveStream (long long iPosition, int iWhence=SEEK_SET)
 
long long LengthLiveStream (void)
 
PVR_ERROR SignalStatus (PVR_SIGNAL_STATUS &signalStatus)
 
PVR_ERROR GetDescrambleInfo (PVR_DESCRAMBLE_INFO *descrambleInfo)
 
PVR_ERROR GetChannelStreamProperties (const PVR_CHANNEL *channel, PVR_NAMED_VALUE *properties, unsigned int *iPropertiesCount)
 
PVR_ERROR GetRecordingStreamProperties (const PVR_RECORDING *recording, PVR_NAMED_VALUE *properties, unsigned int *iPropertiesCount)
 
PVR_ERROR GetStreamProperties (PVR_STREAM_PROPERTIES *pProperties)
 
PVR recording stream methods, used to open and close a stream to a recording, and perform read operations on the stream.
Remarks
This will only be used if the backend doesn't provide a direct URL in the recording tag.
PVR_ERROR GetStreamReadChunkSize (int *chunksize)
 
bool OpenRecordedStream (const PVR_RECORDING &recording)
 
void CloseRecordedStream (void)
 
int ReadRecordedStream (unsigned char *pBuffer, unsigned int iBufferSize)
 
long long SeekRecordedStream (long long iPosition, int iWhence=SEEK_SET)
 
long long LengthRecordedStream (void)
 
PVR demultiplexer methods
Remarks
Only used by Kodi if bHandlesDemuxing is set to true.
void DemuxReset (void)
 
void DemuxAbort (void)
 
void DemuxFlush (void)
 
DemuxPacketDemuxRead (void)
 
bool CanPauseStream ()
 
bool CanSeekStream ()
 
void PauseStream (bool bPaused)
 Notify the pvr addon that Kodi (un)paused the currently playing stream. More...
 
bool SeekTime (double time, bool backwards, double *startpts)
 
void SetSpeed (int speed)
 
const char * GetBackendHostname ()
 
bool IsTimeshifting ()
 
bool IsRealTimeStream ()
 
PVR_ERROR SetEPGTimeFrame (int iDays)
 
void OnSystemSleep ()
 
void OnSystemWake ()
 
void OnPowerSavingActivated ()
 
void OnPowerSavingDeactivated ()
 
PVR_ERROR GetStreamTimes (PVR_STREAM_TIMES *times)
 
void __declspec (dllexport) get_addon(void *ptr)
 

Function Documentation

◆ __declspec()

void __declspec ( dllexport  )

Called by Kodi to assign the function pointers of this add-on to pClient.

Parameters
ptrThe struct to assign the function pointers to.

◆ AddTimer()

PVR_ERROR AddTimer ( const PVR_TIMER timer)

Add a timer on the backend.

Parameters
timerThe timer to add.
Returns
PVR_ERROR_NO_ERROR if the timer has been added successfully.
Remarks
Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ CallMenuHook()

PVR_ERROR CallMenuHook ( const PVR_MENUHOOK menuhook,
const PVR_MENUHOOK_DATA item 
)

Call one of the menu hooks (if supported). Supported PVR_MENUHOOK instances have to be added in ADDON_Create(), by calling AddMenuHook() on the callback.

Parameters
menuhookThe hook to call.
itemThe selected item for which the hook was called.
Returns
PVR_ERROR_NO_ERROR if the hook was called successfully.
Remarks
Optional. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ CanPauseStream()

bool CanPauseStream ( )

Check if the backend support pausing the currently playing stream This will enable/disable the pause button in Kodi based on the return value

Returns
false if the PVR addon/backend does not support pausing, true if possible

◆ CanSeekStream()

bool CanSeekStream ( )

Check if the backend supports seeking for the currently playing stream This will enable/disable the rewind/forward buttons in Kodi based on the return value

Returns
false if the PVR addon/backend does not support seeking, true if possible

◆ CloseLiveStream()

void CloseLiveStream ( void  )

Close an open live stream.

Remarks
Required if bHandlesInputStream or bHandlesDemuxing is set to true.

◆ CloseRecordedStream()

void CloseRecordedStream ( void  )

Close an open stream from a recording.

Remarks
Optional, and only used if bSupportsRecordings is set to true.

◆ DeleteAllRecordingsFromTrash()

PVR_ERROR DeleteAllRecordingsFromTrash ( )

Delete all recordings permanent which in the deleted folder on the backend.

Returns
PVR_ERROR_NO_ERROR if the recordings has been deleted successfully.

◆ DeleteChannel()

PVR_ERROR DeleteChannel ( const PVR_CHANNEL channel)

Delete a channel from the backend.

Parameters
channelThe channel to delete.
Returns
PVR_ERROR_NO_ERROR if the channel has been deleted successfully.
Remarks
Required if bSupportsChannelSettings is set to true.

◆ DeleteRecording()

PVR_ERROR DeleteRecording ( const PVR_RECORDING recording)

Delete a recording on the backend.

Parameters
recordingThe recording to delete.
Returns
PVR_ERROR_NO_ERROR if the recording has been deleted successfully.
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.

◆ DeleteTimer()

PVR_ERROR DeleteTimer ( const PVR_TIMER timer,
bool  bForceDelete 
)

Delete a timer on the backend.

Parameters
timerThe timer to delete.
bForceDeleteSet to true to delete a timer that is currently recording a program.
Returns
PVR_ERROR_NO_ERROR if the timer has been deleted successfully.
Remarks
Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ DemuxAbort()

void DemuxAbort ( void  )

Abort the demultiplexer thread in the add-on.

Remarks
Required if bHandlesDemuxing is set to true.

◆ DemuxFlush()

void DemuxFlush ( void  )

Flush all data that's currently in the demultiplexer buffer in the add-on.

Remarks
Required if bHandlesDemuxing is set to true.

◆ DemuxRead()

DemuxPacket * DemuxRead ( void  )

Read the next packet from the demultiplexer, if there is one.

Returns
The next packet. If there is no next packet, then the add-on should return the packet created by calling AllocateDemuxPacket(0) on the callback. If the stream changed and Kodi's player needs to be reinitialised, then, the add-on should call AllocateDemuxPacket(0) on the callback, and set the streamid to DMX_SPECIALID_STREAMCHANGE and return the value. The add-on should return NULL if an error occured.
Remarks
Required if bHandlesDemuxing is set to true. Return NULL if this add-on won't provide this function.

◆ DemuxReset()

void DemuxReset ( void  )

Reset the demultiplexer in the add-on.

Remarks
Required if bHandlesDemuxing is set to true.

◆ GetAddonCapabilities()

PVR_ERROR GetAddonCapabilities ( PVR_ADDON_CAPABILITIES pCapabilities)

Get the list of features that this add-on provides. Called by Kodi to query the add-on's capabilities. Used to check which options should be presented in the UI, which methods to call, etc. All capabilities that the add-on supports should be set to true.

Parameters
pCapabilitiesThe add-on's capabilities.
Returns
PVR_ERROR_NO_ERROR if the properties were fetched successfully.
Remarks
Valid implementation required.

◆ GetBackendHostname()

const char * GetBackendHostname ( )

Get the hostname of the pvr backend server

Returns
hostname as ip address or alias. If backend does not utilize a server, return empty string.

◆ GetBackendName()

const char * GetBackendName ( void  )
Returns
The name reported by the backend that will be displayed in the UI.
Remarks
Valid implementation required.

◆ GetBackendVersion()

const char * GetBackendVersion ( void  )
Returns
The version string reported by the backend that will be displayed in the UI.
Remarks
Valid implementation required.

◆ GetChannelGroupMembers()

PVR_ERROR GetChannelGroupMembers ( ADDON_HANDLE  handle,
const PVR_CHANNEL_GROUP group 
)

Request the list of all group members of a group from the backend if it supports channel groups. Member entries are added to Kodi by calling TransferChannelGroupMember() on the callback.

Parameters
handleHandle to pass to the callback method.
groupThe group to get the members for.
Returns
PVR_ERROR_NO_ERROR if the list has been fetched successfully.
Remarks
Required if bSupportsChannelGroups is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetChannelGroups()

PVR_ERROR GetChannelGroups ( ADDON_HANDLE  handle,
bool  bRadio 
)

Request the list of all channel groups from the backend if it supports channel groups. Channel group entries are added to Kodi by calling TransferChannelGroup() on the callback.

Parameters
handleHandle to pass to the callback method.
bRadioTrue to get the radio channel groups, false to get the TV channel groups.
Returns
PVR_ERROR_NO_ERROR if the list has been fetched successfully.
Remarks
Required if bSupportsChannelGroups is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetChannelGroupsAmount()

int GetChannelGroupsAmount ( void  )

Get the total amount of channel groups on the backend if it supports channel groups.

Returns
The amount of channels, or -1 on error.
Remarks
Required if bSupportsChannelGroups is set to true. Return -1 if this add-on won't provide this function.

◆ GetChannels()

PVR_ERROR GetChannels ( ADDON_HANDLE  handle,
bool  bRadio 
)

Request the list of all channels from the backend. Channel entries are added to Kodi by calling TransferChannelEntry() on the callback.

Parameters
handleHandle to pass to the callback method.
bRadioTrue to get the radio channels, false to get the TV channels.
Returns
PVR_ERROR_NO_ERROR if the list has been fetched successfully.
Remarks
If bSupportsTV is set to true, a valid result set needs to be provided for bRadio = false. If bSupportsRadio is set to true, a valid result set needs to be provided for bRadio = true. At least one of these two must provide a valid result set.

◆ GetChannelsAmount()

int GetChannelsAmount ( void  )
Returns
The total amount of channels on the backend, or -1 on error.
Remarks
Valid implementation required.

◆ GetChannelStreamProperties()

PVR_ERROR GetChannelStreamProperties ( const PVR_CHANNEL channel,
PVR_NAMED_VALUE properties,
unsigned int *  iPropertiesCount 
)

Get the stream properties for a channel from the backend.

Parameters
[in]channelThe channel to get the stream properties for.
[in,out]propertiesin: an array for the properties to return, out: the properties required to play the stream.
[in,out]iPropertiesCountin: the size of the properties array, out: the number of properties returned.
Returns
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.

◆ GetConnectionString()

const char * GetConnectionString ( void  )
Returns
The connection string reported by the backend that will be displayed in the UI.
Remarks
Valid implementation required.

◆ GetDescrambleInfo()

PVR_ERROR GetDescrambleInfo ( PVR_DESCRAMBLE_INFO descrambleInfo)

Get the descramble information of the stream that's currently open.

Parameters
[out]descrambleInfoThe descramble information.
Returns
PVR_ERROR_NO_ERROR if the descramble information has been read successfully, false otherwise.
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.

◆ GetDriveSpace()

PVR_ERROR GetDriveSpace ( long long *  iTotal,
long long *  iUsed 
)

Get the disk space reported by the backend (if supported).

Parameters
iTotalThe total disk space in bytes.
iUsedThe used disk space in bytes.
Returns
PVR_ERROR_NO_ERROR if the drive space has been fetched successfully.
Remarks
Optional. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetEPGForChannel()

PVR_ERROR GetEPGForChannel ( ADDON_HANDLE  handle,
const PVR_CHANNEL channel,
time_t  iStart,
time_t  iEnd 
)

Request the EPG for a channel from the backend. EPG entries are added to Kodi by calling TransferEpgEntry() on the callback.

Parameters
handleHandle to pass to the callback method.
channelThe channel to get the EPG table for.
iStartGet events after this time (UTC).
iEndGet events before this time (UTC).
Returns
PVR_ERROR_NO_ERROR if the table has been fetched successfully.
Remarks
Required if bSupportsEPG is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetEPGTagEdl()

PVR_ERROR GetEPGTagEdl ( const EPG_TAG epgTag,
PVR_EDL_ENTRY  edl[],
int *  size 
)

Retrieve the edit decision list (EDL) of an EPG tag on the backend.

Parameters
epgTagThe EPG tag.
edlout: The function has to write the EDL into this array.
sizein: The maximum size of the EDL, out: the actual size of the EDL.
Returns
PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists.
Remarks
Required if bSupportsEpgEdl is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetEPGTagStreamProperties()

PVR_ERROR GetEPGTagStreamProperties ( const EPG_TAG tag,
PVR_NAMED_VALUE properties,
unsigned int *  iPropertiesCount 
)

Get the stream properties for an epg tag from the backend.

Parameters
[in]tagThe epg tag to get the stream properties for.
[in,out]propertiesin: an array for the properties to return, out: the properties required to play the stream.
[in,out]iPropertiesCountin: the size of the properties array, out: the number of properties returned.
Returns
PVR_ERROR_NO_ERROR if the stream is available.
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.

◆ GetRecordingEdl()

PVR_ERROR GetRecordingEdl ( const PVR_RECORDING recording,
PVR_EDL_ENTRY  edl[],
int *  size 
)

Retrieve the edit decision list (EDL) of a recording on the backend.

Parameters
recordingThe recording.
edlout: The function has to write the EDL into this array.
sizein: The maximum size of the EDL, out: the actual size of the EDL.
Returns
PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists.
Remarks
Required if bSupportsRecordingEdl is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetRecordingLastPlayedPosition()

int GetRecordingLastPlayedPosition ( const PVR_RECORDING recording)

Retrieve the last watched position of a recording on the backend.

Parameters
recordingThe recording.
Returns
The last watched position in seconds or -1 on error
Remarks
Required if bSupportsRecordingPlayCount is set to true. Return -1 if this add-on won't provide this function.

◆ GetRecordings()

PVR_ERROR GetRecordings ( ADDON_HANDLE  handle,
bool  deleted 
)

Request the list of all recordings from the backend, if supported. Recording entries are added to Kodi by calling TransferRecordingEntry() on the callback.

Parameters
handleHandle to pass to the callback method.
deletedif set return deleted recording (called if bSupportsRecordingsUndelete set to true)
Returns
PVR_ERROR_NO_ERROR if the recordings have been fetched successfully.
Remarks
Required if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetRecordingsAmount()

int GetRecordingsAmount ( bool  deleted)
Returns
The total amount of recordings on the backend or -1 on error.
Parameters
deletedif set return deleted recording (called if bSupportsRecordingsUndelete set to true)
Remarks
Required if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function.

◆ GetRecordingStreamProperties()

PVR_ERROR GetRecordingStreamProperties ( const PVR_RECORDING recording,
PVR_NAMED_VALUE properties,
unsigned int *  iPropertiesCount 
)

Get the stream properties for a recording from the backend.

Parameters
[in]recordingThe recording to get the stream properties for.
[in,out]propertiesin: an array for the properties to return, out: the properties required to play the stream.
[in,out]iPropertiesCountin: the size of the properties array, out: the number of properties returned.
Returns
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.

◆ GetStreamProperties()

PVR_ERROR GetStreamProperties ( PVR_STREAM_PROPERTIES pProperties)

Get the stream properties of the stream that's currently being read.

Parameters
pPropertiesThe properties of the currently playing stream.
Returns
PVR_ERROR_NO_ERROR if the properties have been fetched successfully.
Remarks
Required if bHandlesDemuxing is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetStreamReadChunkSize()

PVR_ERROR GetStreamReadChunkSize ( int *  chunksize)

Obtain the chunk size to use when reading streams.

Parameters
chunksizemust be filled with the chunk size in bytes.
Returns
PVR_ERROR_NO_ERROR if the chunk size has been fetched successfully.
Remarks
Optional, and only used if not reading from demuxer (=> DemuxRead) and PVR_ADDON_CAPABILITIES::bSupportsRecordings is true (=> ReadRecordedStream) or PVR_ADDON_CAPABILITIES::bHandlesInputStream is true (=> ReadLiveStream). 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.

◆ GetStreamTimes()

PVR_ERROR GetStreamTimes ( PVR_STREAM_TIMES times)

Get stream times.

Parameters
timesA pointer to the data to be filled by the implementation.
Returns
PVR_ERROR_NO_ERROR on success.

◆ GetTimers()

PVR_ERROR GetTimers ( ADDON_HANDLE  handle)

Request the list of all timers from the backend if supported. Timer entries are added to Kodi by calling TransferTimerEntry() on the callback.

Parameters
handleHandle to pass to the callback method.
Returns
PVR_ERROR_NO_ERROR if the list has been fetched successfully.
Remarks
Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ GetTimersAmount()

int GetTimersAmount ( void  )
Returns
The total amount of timers on the backend or -1 on error.
Remarks
Required if bSupportsTimers is set to true. Return -1 if this add-on won't provide this function.

◆ GetTimerTypes()

PVR_ERROR GetTimerTypes ( PVR_TIMER_TYPE  types[],
int *  typesCount 
)

Retrieve the timer types supported by the backend.

Parameters
typesout: The function has to write the definition of the supported timer types into this array.
typesCountin: The maximum size of the list, out: the actual size of the list. default: PVR_ADDON_TIMERTYPE_ARRAY_SIZE
Returns
PVR_ERROR_NO_ERROR if the types were successfully written to the array.
Remarks
Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ IsEPGTagPlayable()

PVR_ERROR IsEPGTagPlayable ( const EPG_TAG tag,
bool *  bIsPlayable 
)

◆ IsEPGTagRecordable()

PVR_ERROR IsEPGTagRecordable ( const EPG_TAG tag,
bool *  bIsRecordable 
)

◆ IsRealTimeStream()

bool IsRealTimeStream ( )

Check for real-time streaming

Returns
true if current stream is real-time

◆ IsTimeshifting()

bool IsTimeshifting ( )

Check if timeshift is active

Returns
true if timeshift is active

◆ LengthLiveStream()

long long LengthLiveStream ( void  )

Obtain the length of a live stream.

Returns
The total length of the stream that's currently being read.
Remarks
Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function.

◆ LengthRecordedStream()

long long LengthRecordedStream ( void  )

Obtain the length of a recorded stream.

Returns
The total length of the stream that's currently being read.
Remarks
Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function.

◆ OnPowerSavingActivated()

void OnPowerSavingActivated ( )

◆ OnPowerSavingDeactivated()

void OnPowerSavingDeactivated ( )

◆ OnSystemSleep()

void OnSystemSleep ( )

Notify the pvr addon for power management events

◆ OnSystemWake()

void OnSystemWake ( )

◆ OpenDialogChannelAdd()

PVR_ERROR OpenDialogChannelAdd ( const PVR_CHANNEL channel)

Show the dialog to add a channel on the backend, if supported by the backend.

Parameters
channelThe channel to add.
Returns
PVR_ERROR_NO_ERROR if the channel has been added successfully.
Remarks
Required if bSupportsChannelSettings is set to true.
Note
see libKODI_guilib.h about related parts

◆ OpenDialogChannelScan()

PVR_ERROR OpenDialogChannelScan ( void  )

Show the channel scan dialog if this backend supports it.

Returns
PVR_ERROR_NO_ERROR if the dialog was displayed successfully.
Remarks
Required if bSupportsChannelScan is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
Note
see libKODI_guilib.h about related parts

◆ OpenDialogChannelSettings()

PVR_ERROR OpenDialogChannelSettings ( const PVR_CHANNEL channel)

Show the channel settings dialog, if supported by the backend.

Parameters
channelThe channel to show the dialog for.
Returns
PVR_ERROR_NO_ERROR if the dialog has been displayed successfully.
Remarks
Required if bSupportsChannelSettings is set to true.
Note
see libKODI_guilib.h about related parts

◆ OpenLiveStream()

bool OpenLiveStream ( const PVR_CHANNEL channel)

Open a live stream on the backend.

Parameters
channelThe channel to stream.
Returns
True if the stream has been opened successfully, false otherwise.
Remarks
Required if bHandlesInputStream or bHandlesDemuxing is set to true. CloseLiveStream() will always be called by Kodi prior to calling this function. Return false if this add-on won't provide this function.

◆ OpenRecordedStream()

bool OpenRecordedStream ( const PVR_RECORDING recording)

Open a stream to a recording on the backend.

Parameters
recordingThe recording to open.
Returns
True if the stream has been opened successfully, false otherwise.
Remarks
Optional, and only used if bSupportsRecordings is set to true. CloseRecordedStream() will always be called by Kodi prior to calling this function. Return false if this add-on won't provide this function.

◆ PauseStream()

void PauseStream ( bool  bPaused)

Notify the pvr addon that Kodi (un)paused the currently playing stream.

◆ ReadLiveStream()

int ReadLiveStream ( unsigned char *  pBuffer,
unsigned int  iBufferSize 
)

Read from an open live stream.

Parameters
pBufferThe buffer to store the data in.
iBufferSizeThe amount of bytes to read.
Returns
The amount of bytes that were actually read from the stream.
Remarks
Required if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function.

◆ ReadRecordedStream()

int ReadRecordedStream ( unsigned char *  pBuffer,
unsigned int  iBufferSize 
)

Read from a recording.

Parameters
pBufferThe buffer to store the data in.
iBufferSizeThe amount of bytes to read.
Returns
The amount of bytes that were actually read from the stream.
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.

◆ RenameChannel()

PVR_ERROR RenameChannel ( const PVR_CHANNEL channel)

Rename a channel on the backend.

Parameters
channelThe channel to rename, containing the new channel name.
Returns
PVR_ERROR_NO_ERROR if the channel has been renamed successfully.
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.

◆ RenameRecording()

PVR_ERROR RenameRecording ( const PVR_RECORDING recording)

Rename a recording on the backend.

Parameters
recordingThe recording to rename, containing the new name.
Returns
PVR_ERROR_NO_ERROR if the recording has been renamed successfully.
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.

◆ SeekLiveStream()

long long SeekLiveStream ( long long  iPosition,
int  iWhence = SEEK_SET 
)

Seek in a live stream on a backend that supports timeshifting.

Parameters
iPositionThe position to seek to.
iWhence?
Returns
The new position.
Remarks
Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function.

◆ SeekRecordedStream()

long long SeekRecordedStream ( long long  iPosition,
int  iWhence = SEEK_SET 
)

Seek in a recorded stream.

Parameters
iPositionThe position to seek to.
iWhence?
Returns
The new position.
Remarks
Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function.

◆ SeekTime()

bool SeekTime ( double  time,
bool  backwards,
double *  startpts 
)

Notify the pvr addon/demuxer that Kodi wishes to seek the stream by time

Parameters
timeThe absolute time since stream start
backwardsTrue to seek to keyframe BEFORE time, else AFTER
startptscan be updated to point to where display should start
Returns
True if the seek operation was possible
Remarks
Optional, and only used if addon has its own demuxer. Return False if this add-on won't provide this function.

◆ SetEPGTimeFrame()

PVR_ERROR SetEPGTimeFrame ( int  iDays)

Tell the client the time frame to use when notifying epg events back to Kodi. The client might push epg events asynchronously to Kodi using the callback function EpgEventStateChange. To be able to only push events that are actually of interest for Kodi, client needs to know about the epg time frame Kodi uses. Kodi supplies the current epg time frame value in PVR_PROPERTIES.iEpgMaxDays when creating the addon and calls SetEPGTimeFrame later whenever Kodi's epg time frame value changes.

Parameters
iDaysnumber of days from "now". EPG_TIMEFRAME_UNLIMITED means that Kodi is interested in all epg events, regardless of event times.
Returns
PVR_ERROR_NO_ERROR if new value was successfully set.
Remarks
Required if bSupportsEPG is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ SetRecordingLastPlayedPosition()

PVR_ERROR SetRecordingLastPlayedPosition ( const PVR_RECORDING recording,
int  lastplayedposition 
)

Set the last watched position of a recording on the backend.

Parameters
recordingThe recording.
lastplayedpositionThe last watched position in seconds
Returns
PVR_ERROR_NO_ERROR if the position has been stored successfully.
Remarks
Required if bSupportsLastPlayedPosition is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ SetRecordingLifetime()

PVR_ERROR SetRecordingLifetime ( const PVR_RECORDING recording)

Set the lifetime of a recording on the backend.

Parameters
recordingThe recording to change the lifetime for. recording.iLifetime contains the new lieftime value.
Returns
PVR_ERROR_NO_ERROR if the recording's lifetime has been set successfully.
Remarks
Required if bSupportsRecordingsLifetimeChange is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ SetRecordingPlayCount()

PVR_ERROR SetRecordingPlayCount ( const PVR_RECORDING recording,
int  count 
)

Set the play count of a recording on the backend.

Parameters
recordingThe recording to change the play count.
countPlay count.
Returns
PVR_ERROR_NO_ERROR if the recording's play count has been set successfully.
Remarks
Required if bSupportsRecordingPlayCount is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.

◆ SetSpeed()

void SetSpeed ( int  speed)

Notify the pvr addon/demuxer that Kodi wishes to change playback speed

Parameters
speedThe requested playback speed
Remarks
Optional, and only used if addon has its own demuxer.

◆ SignalStatus()

PVR_ERROR SignalStatus ( PVR_SIGNAL_STATUS signalStatus)

Get the signal status of the stream that's currently open.

Parameters
signalStatusThe signal status.
Returns
PVR_ERROR_NO_ERROR if the signal status has been read successfully, false otherwise.
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.

◆ UndeleteRecording()

PVR_ERROR UndeleteRecording ( const PVR_RECORDING recording)

Undelete a recording on the backend.

Parameters
recordingThe recording to undelete.
Returns
PVR_ERROR_NO_ERROR if the recording has been undeleted successfully.
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.

◆ UpdateTimer()

PVR_ERROR UpdateTimer ( const PVR_TIMER timer)

Update the timer information on the backend.

Parameters
timerThe timer to update.
Returns
PVR_ERROR_NO_ERROR if the timer has been updated successfully.
Remarks
Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.