Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <PVRClient.h>
Public Member Functions | |
CPVRClient (const ADDON::AddonInfoPtr &addonInfo, ADDON::AddonInstanceId instanceId, int clientId) | |
~CPVRClient () override | |
void | OnPreInstall () override |
void | OnPreUnInstall () override |
PVR add-on methods | |
ADDON_STATUS | Create () |
Initialise the instance of this add-on. | |
void | Stop () |
Stop this add-on instance. No more client add-on access after this call. | |
void | Continue () |
Continue this add-on instance. Client add-on access is okay again after this call. | |
void | Destroy () |
Destroy the instance of this add-on. | |
void | ReCreate () |
Destroy and recreate this add-on. | |
bool | ReadyToUse () const |
PVR_CONNECTION_STATE | GetConnectionState () const |
Gets the backend connection state. | |
void | SetConnectionState (PVR_CONNECTION_STATE state) |
Sets the backend connection state. | |
PVR_CONNECTION_STATE | GetPreviousConnectionState () const |
Gets the backend's previous connection state. | |
bool | IgnoreClient () const |
Check whether this client should be ignored. | |
bool | IsEnabled () const |
Check whether this client is enabled, according to its instance/add-on configuration. | |
int | GetID () const |
PVR server methods | |
const CPVRClientCapabilities & | GetClientCapabilities () const |
Query this add-on's capabilities. | |
PVR_ERROR | GetStreamProperties (PVR_STREAM_PROPERTIES *pProperties) const |
Get the stream properties of the stream that's currently being read. | |
PVR_ERROR | StreamClosed () const |
A stream was closed or has ended. | |
const std::string & | GetBackendName () const |
const std::string & | GetBackendVersion () const |
const std::string & | GetBackendHostname () const |
the ip address or alias of the pvr backend server | |
const std::string & | GetConnectionString () const |
std::string | GetClientName () const |
The name of the PVR client, as specified by the addon developer. | |
std::string | GetInstanceName () const |
The name of the PVR client addon instance, as specified by the user in the addon settings. Empty if addon does not support multiple instances. | |
std::string | GetFullClientName () const |
A name used to uniquely identify the client, inclusing addon name and instance name, if multiple instances are supported by the client implementation. | |
PVR_ERROR | GetDriveSpace (uint64_t &iTotal, uint64_t &iUsed) const |
Get the disk space reported by the server. | |
PVR_ERROR | StartChannelScan () |
Start a channel scan on the server. | |
PVR_ERROR | OpenDialogChannelAdd (const std::shared_ptr< const CPVRChannel > &channel) |
Request the client to open dialog about given channel to add. | |
PVR_ERROR | OpenDialogChannelSettings (const std::shared_ptr< const CPVRChannel > &channel) |
Request the client to open dialog about given channel settings. | |
PVR_ERROR | DeleteChannel (const std::shared_ptr< const CPVRChannel > &channel) |
Request the client to delete given channel. | |
PVR_ERROR | RenameChannel (const std::shared_ptr< const CPVRChannel > &channel) |
Request the client to rename given channel. | |
PVR_ERROR | IsRecordable (const std::shared_ptr< const CPVREpgInfoTag > &tag, bool &bIsRecordable) const |
PVR_ERROR | IsPlayable (const std::shared_ptr< const CPVREpgInfoTag > &tag, bool &bIsPlayable) const |
PVR_ERROR | GetEpgTagStreamProperties (const std::shared_ptr< const CPVREpgInfoTag > &tag, CPVRStreamProperties &props) const |
Fill the given container with the properties required for playback of the given EPG tag. Values are obtained from the PVR backend. | |
PVR EPG methods | |
PVR_ERROR | GetEPGForChannel (int iChannelUid, CPVREpg *epg, time_t start, time_t end) const |
Request an EPG table for a channel from the client. | |
PVR_ERROR | SetEPGMaxPastDays (int iPastDays) |
Tell the client the past time frame to use when notifying epg events back to Kodi. | |
PVR_ERROR | SetEPGMaxFutureDays (int iFutureDays) |
Tell the client the future time frame to use when notifying epg events back to Kodi. | |
PVR channel group methods | |
PVR_ERROR | GetChannelGroupsAmount (int &iGroups) const |
Get the total amount of channel groups from the backend. | |
PVR_ERROR | GetChannelGroups (CPVRChannelGroups *groups) const |
Request the list of all channel groups from the backend. | |
PVR_ERROR | GetChannelGroupMembers (CPVRChannelGroup *group, std::vector< std::shared_ptr< CPVRChannelGroupMember > > &groupMembers) const |
Request the list of all group members from the backend. | |
PVR channel methods | |
PVR_ERROR | GetChannelsAmount (int &iChannels) const |
Get the total amount of channels from the backend. | |
PVR_ERROR | GetChannels (bool bRadio, std::vector< std::shared_ptr< CPVRChannel > > &channels) const |
Request the list of all channels from the backend. | |
PVR_ERROR | GetProvidersAmount (int &iProviders) const |
Get the total amount of providers from the backend. | |
PVR_ERROR | GetProviders (CPVRProvidersContainer &providers) const |
Request the list of all providers from the backend. | |
PVR recording methods | |
PVR_ERROR | GetRecordingsAmount (bool deleted, int &iRecordings) const |
Get the total amount of recordings from the backend. | |
PVR_ERROR | GetRecordings (CPVRRecordings *results, bool deleted) const |
Request the list of all recordings from the backend. | |
PVR_ERROR | DeleteRecording (const CPVRRecording &recording) |
Delete a recording on the backend. | |
PVR_ERROR | UndeleteRecording (const CPVRRecording &recording) |
Undelete a recording on the backend. | |
PVR_ERROR | DeleteAllRecordingsFromTrash () |
Delete all recordings permanent which in the deleted folder on the backend. | |
PVR_ERROR | RenameRecording (const CPVRRecording &recording) |
Rename a recording on the backend. | |
PVR_ERROR | SetRecordingLifetime (const CPVRRecording &recording) |
Set the lifetime of a recording on the backend. | |
PVR_ERROR | SetRecordingPlayCount (const CPVRRecording &recording, int count) |
Set the play count of a recording on the backend. | |
PVR_ERROR | SetRecordingLastPlayedPosition (const CPVRRecording &recording, int lastplayedposition) |
Set the last watched position of a recording on the backend. | |
PVR_ERROR | GetRecordingLastPlayedPosition (const CPVRRecording &recording, int &iPosition) const |
Retrieve the last watched position of a recording on the backend. | |
PVR_ERROR | GetRecordingEdl (const CPVRRecording &recording, std::vector< EDL::Edit > &edls) const |
Retrieve the edit decision list (EDL) from the backend. | |
PVR_ERROR | GetRecordingSize (const CPVRRecording &recording, int64_t &sizeInBytes) const |
Retrieve the size of a recording on the backend. | |
PVR_ERROR | GetEpgTagEdl (const std::shared_ptr< const CPVREpgInfoTag > &epgTag, std::vector< EDL::Edit > &edls) const |
Retrieve the edit decision list (EDL) from the backend. | |
PVR timer methods | |
PVR_ERROR | GetTimersAmount (int &iTimers) const |
Get the total amount of timers from the backend. | |
PVR_ERROR | GetTimers (CPVRTimersContainer *results) const |
Request the list of all timers from the backend. | |
PVR_ERROR | AddTimer (const CPVRTimerInfoTag &timer) |
Add a timer on the backend. | |
PVR_ERROR | DeleteTimer (const CPVRTimerInfoTag &timer, bool bForce=false) |
Delete a timer on the backend. | |
PVR_ERROR | UpdateTimer (const CPVRTimerInfoTag &timer) |
Update the timer information on the server. | |
PVR_ERROR | UpdateTimerTypes () |
Update all timer types supported by the backend. | |
const std::vector< std::shared_ptr< CPVRTimerType > > & | GetTimerTypes () const |
Get the timer types supported by the backend, without updating them from the backend. | |
PVR live stream methods | |
PVR_ERROR | OpenLiveStream (const std::shared_ptr< const CPVRChannel > &channel) |
Open a live stream on the server. | |
PVR_ERROR | CloseLiveStream () |
Close an open live stream. | |
PVR_ERROR | ReadLiveStream (void *lpBuf, int64_t uiBufSize, int &iRead) |
Read from an open live stream. | |
PVR_ERROR | SeekLiveStream (int64_t iFilePosition, int iWhence, int64_t &iPosition) |
Seek in a live stream on a backend. | |
PVR_ERROR | GetLiveStreamLength (int64_t &iLength) const |
Get the length of the currently playing live stream, if any. | |
PVR_ERROR | PauseStream (bool bPaused) |
(Un)Pause a stream. | |
PVR_ERROR | SignalQuality (int channelUid, CPVRSignalStatus &qualityinfo) const |
Get the signal quality of the stream that's currently open. | |
PVR_ERROR | GetDescrambleInfo (int channelUid, CPVRDescrambleInfo &descrambleinfo) const |
Get the descramble information of the stream that's currently open. | |
PVR_ERROR | GetChannelStreamProperties (const std::shared_ptr< const CPVRChannel > &channel, PVR_SOURCE source, CPVRStreamProperties &props) const |
Fill the given container with the properties required for playback of the given channel. Values are obtained from the PVR backend. | |
PVR_ERROR | CanPauseStream (bool &bCanPause) const |
Check whether PVR backend supports pausing the currently playing stream. | |
PVR_ERROR | CanSeekStream (bool &bCanSeek) const |
Check whether PVR backend supports seeking for the currently playing stream. | |
PVR_ERROR | SeekTime (double time, bool backwards, double *startpts) |
Notify the pvr addon/demuxer that Kodi wishes to seek the stream by time. | |
PVR_ERROR | SetSpeed (int speed) |
Notify the pvr addon/demuxer that Kodi wishes to change playback speed. | |
PVR_ERROR | FillBuffer (bool mode) |
Notify the pvr addon/demuxer that Kodi wishes to fill demux queue. | |
PVR recording stream methods | |
PVR_ERROR | OpenRecordedStream (const std::shared_ptr< const CPVRRecording > &recording) |
Open a recording on the server. | |
PVR_ERROR | CloseRecordedStream () |
Close an open recording stream. | |
PVR_ERROR | ReadRecordedStream (void *lpBuf, int64_t uiBufSize, int &iRead) |
Read from an open recording stream. | |
PVR_ERROR | SeekRecordedStream (int64_t iFilePosition, int iWhence, int64_t &iPosition) |
Seek in a recording stream on a backend. | |
PVR_ERROR | GetRecordedStreamLength (int64_t &iLength) const |
Get the length of the currently playing recording stream, if any. | |
PVR_ERROR | GetRecordingStreamProperties (const std::shared_ptr< const CPVRRecording > &recording, CPVRStreamProperties &props) const |
Fill the given container with the properties required for playback of the given recording. Values are obtained from the PVR backend. | |
Public Member Functions inherited from ADDON::IAddonInstanceHandler | |
IAddonInstanceHandler (ADDON_TYPE type, const AddonInfoPtr &addonInfo, AddonInstanceId instanceId=ADDON_INSTANCE_ID_UNUSED, KODI_HANDLE parentInstance=nullptr, const std::string &uniqueWorkID="") | |
Class constructor for handling add-on instance processes, allowing an add-on to handle multiple work simultaneously and independently. | |
virtual | ~IAddonInstanceHandler () |
ADDON_TYPE | UsedType () const |
AddonInstanceId | InstanceId () const |
const std::string & | UniqueWorkID () |
std::string | ID () const |
AddonInstanceId | InstanceID () const |
std::string | Name () const |
std::string | Author () const |
std::string | Icon () const |
std::string | Path () const |
std::string | Profile () const |
CAddonVersion | Version () const |
ADDON_STATUS | CreateInstance () |
void | DestroyInstance () |
const AddonDllPtr & | Addon () const |
AddonInfoPtr | GetAddonInfo () const |
virtual void | OnPostInstall (bool update, bool modal) |
virtual void | OnPostUnInstall () |
PVR demultiplexer methods | |
PVR_ERROR | DemuxReset () |
Reset the demultiplexer in the add-on. | |
PVR_ERROR | DemuxAbort () |
Abort the demultiplexer thread in the add-on. | |
PVR_ERROR | DemuxFlush () |
Flush all data that's currently in the demultiplexer buffer in the add-on. | |
PVR_ERROR | DemuxRead (DemuxPacket *&packet) |
Read a packet from the demultiplexer. | |
PVR_ERROR | IsRealTimeStream (bool &bRealTime) const |
Check whether the currently playing stream, if any, is a real-time stream. | |
PVR_ERROR | GetStreamTimes (PVR_STREAM_TIMES *times) const |
Get Stream times for the currently playing stream, if any (will be moved to inputstream). | |
std::shared_ptr< CPVRClientMenuHooks > | GetMenuHooks () const |
Get the client's menu hooks. | |
PVR_ERROR | CallEpgTagMenuHook (const CPVRClientMenuHook &hook, const std::shared_ptr< const CPVREpgInfoTag > &tag) |
Call one of the EPG tag menu hooks of the client. | |
PVR_ERROR | CallChannelMenuHook (const CPVRClientMenuHook &hook, const std::shared_ptr< const CPVRChannel > &channel) |
Call one of the channel menu hooks of the client. | |
PVR_ERROR | CallRecordingMenuHook (const CPVRClientMenuHook &hook, const std::shared_ptr< const CPVRRecording > &recording, bool bDeleted) |
Call one of the recording menu hooks of the client. | |
PVR_ERROR | CallTimerMenuHook (const CPVRClientMenuHook &hook, const std::shared_ptr< const CPVRTimerInfoTag > &timer) |
Call one of the timer menu hooks of the client. | |
PVR_ERROR | CallSettingsMenuHook (const CPVRClientMenuHook &hook) |
Call one of the settings menu hooks of the client. | |
PVR_ERROR | OnSystemSleep () |
Propagate power management events to this add-on. | |
PVR_ERROR | OnSystemWake () |
PVR_ERROR | OnPowerSavingActivated () |
PVR_ERROR | OnPowerSavingDeactivated () |
int | GetPriority () const |
Get the priority of this client. Larger value means higher priority. | |
void | SetPriority (int iPriority) |
Set a new priority for this client. | |
const CDateTime & | GetDateTimeFirstChannelsAdded () const |
Get the date and time first channels were added for this client. | |
void | SetDateTimeFirstChannelsAdded (const CDateTime &dateTime) |
Set the date and time first channels were added for this client. | |
PVR_ERROR | GetStreamReadChunkSize (int &iChunkSize) const |
Obtain the chunk size to use when reading streams. | |
static const char * | ToString (const PVR_ERROR error) |
Additional Inherited Members | |
Protected Attributes inherited from ADDON::IAddonInstanceHandler | |
KODI_ADDON_INSTANCE_INFO | m_info {} |
KODI_ADDON_INSTANCE_STRUCT | m_ifc {} |
Interface from Kodi to a PVR add-on.
Also translates Kodi's C++ structures to the add-on's C structures.
PVR::CPVRClient::CPVRClient | ( | const ADDON::AddonInfoPtr & | addonInfo, |
ADDON::AddonInstanceId | instanceId, | ||
int | clientId ) |
|
override |
PVR_ERROR PVR::CPVRClient::AddTimer | ( | const CPVRTimerInfoTag & | timer | ) |
Add a timer on the backend.
timer | The timer to add. |
PVR_ERROR PVR::CPVRClient::CallChannelMenuHook | ( | const CPVRClientMenuHook & | hook, |
const std::shared_ptr< const CPVRChannel > & | channel ) |
Call one of the channel menu hooks of the client.
hook | The hook to call. |
tag | The channel associated with the hook to be called. |
PVR_ERROR PVR::CPVRClient::CallEpgTagMenuHook | ( | const CPVRClientMenuHook & | hook, |
const std::shared_ptr< const CPVREpgInfoTag > & | tag ) |
Call one of the EPG tag menu hooks of the client.
hook | The hook to call. |
tag | The EPG tag associated with the hook to be called. |
PVR_ERROR PVR::CPVRClient::CallRecordingMenuHook | ( | const CPVRClientMenuHook & | hook, |
const std::shared_ptr< const CPVRRecording > & | recording, | ||
bool | bDeleted ) |
Call one of the recording menu hooks of the client.
hook | The hook to call. |
tag | The recording associated with the hook to be called. |
bDeleted | True, if the recording is deleted (trashed), false otherwise |
PVR_ERROR PVR::CPVRClient::CallSettingsMenuHook | ( | const CPVRClientMenuHook & | hook | ) |
Call one of the settings menu hooks of the client.
hook | The hook to call. |
PVR_ERROR PVR::CPVRClient::CallTimerMenuHook | ( | const CPVRClientMenuHook & | hook, |
const std::shared_ptr< const CPVRTimerInfoTag > & | timer ) |
Call one of the timer menu hooks of the client.
hook | The hook to call. |
tag | The timer associated with the hook to be called. |
Check whether PVR backend supports pausing the currently playing stream.
bCanPause | True if the stream can be paused, false otherwise. |
Check whether PVR backend supports seeking for the currently playing stream.
bCanSeek | True if the stream can be seeked, false otherwise. |
PVR_ERROR PVR::CPVRClient::CloseLiveStream | ( | ) |
Close an open live stream.
PVR_ERROR PVR::CPVRClient::CloseRecordedStream | ( | ) |
Close an open recording stream.
void PVR::CPVRClient::Continue | ( | ) |
Continue this add-on instance. Client add-on access is okay again after this call.
ADDON_STATUS PVR::CPVRClient::Create | ( | ) |
Initialise the instance of this add-on.
PVR_ERROR PVR::CPVRClient::DeleteAllRecordingsFromTrash | ( | ) |
Delete all recordings permanent which in the deleted folder on the backend.
PVR_ERROR PVR::CPVRClient::DeleteChannel | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) |
Request the client to delete given channel.
channel | The channel to delete |
PVR_ERROR PVR::CPVRClient::DeleteRecording | ( | const CPVRRecording & | recording | ) |
Delete a recording on the backend.
recording | The recording to delete. |
PVR_ERROR PVR::CPVRClient::DeleteTimer | ( | const CPVRTimerInfoTag & | timer, |
bool | bForce = false ) |
Delete a timer on the backend.
timer | The timer to delete. |
bForce | Set to true to delete a timer that is currently recording a program. |
PVR_ERROR PVR::CPVRClient::DemuxAbort | ( | ) |
Abort the demultiplexer thread in the add-on.
PVR_ERROR PVR::CPVRClient::DemuxFlush | ( | ) |
Flush all data that's currently in the demultiplexer buffer in the add-on.
PVR_ERROR PVR::CPVRClient::DemuxRead | ( | DemuxPacket *& | packet | ) |
Read a packet from the demultiplexer.
packet | The packet read. |
PVR_ERROR PVR::CPVRClient::DemuxReset | ( | ) |
Reset the demultiplexer in the add-on.
void PVR::CPVRClient::Destroy | ( | ) |
Destroy the instance of this add-on.
Notify the pvr addon/demuxer that Kodi wishes to fill demux queue.
mode | for setting on/off |
const std::string & PVR::CPVRClient::GetBackendHostname | ( | ) | const |
the ip address or alias of the pvr backend server
const std::string & PVR::CPVRClient::GetBackendName | ( | ) | const |
const std::string & PVR::CPVRClient::GetBackendVersion | ( | ) | const |
PVR_ERROR PVR::CPVRClient::GetChannelGroupMembers | ( | CPVRChannelGroup * | group, |
std::vector< std::shared_ptr< CPVRChannelGroupMember > > & | groupMembers ) const |
Request the list of all group members from the backend.
group | The group to get the members for. |
groupMembers | The container for the group members. |
PVR_ERROR PVR::CPVRClient::GetChannelGroups | ( | CPVRChannelGroups * | groups | ) | const |
Request the list of all channel groups from the backend.
groups | The groups container to get the groups for. |
Get the total amount of channel groups from the backend.
iGroups | The total amount of channel groups on the server or -1 on error. |
PVR_ERROR PVR::CPVRClient::GetChannels | ( | bool | bRadio, |
std::vector< std::shared_ptr< CPVRChannel > > & | channels ) const |
Request the list of all channels from the backend.
bRadio | True to get the radio channels, false to get the TV channels. |
channels | The container for the channels. |
Get the total amount of channels from the backend.
iChannels | The total amount of channels on the server or -1 on error. |
PVR_ERROR PVR::CPVRClient::GetChannelStreamProperties | ( | const std::shared_ptr< const CPVRChannel > & | channel, |
PVR_SOURCE | source, | ||
CPVRStreamProperties & | props ) const |
Fill the given container with the properties required for playback of the given channel. Values are obtained from the PVR backend.
channel | The channel. |
source | PVR_SOURCE_EPG_AS_LIVE if this call resulted from PVR_STREAM_PROPERTY_EPGPLAYBACKASLIVE being set from GetEPGTagStreamProperties(), DEFAULT otherwise. |
props | The container to be filled with the stream properties. |
|
inline |
Query this add-on's capabilities.
std::string PVR::CPVRClient::GetClientName | ( | ) | const |
PVR_CONNECTION_STATE PVR::CPVRClient::GetConnectionState | ( | ) | const |
Gets the backend connection state.
const std::string & PVR::CPVRClient::GetConnectionString | ( | ) | const |
const CDateTime & PVR::CPVRClient::GetDateTimeFirstChannelsAdded | ( | ) | const |
Get the date and time first channels were added for this client.
PVR_ERROR PVR::CPVRClient::GetDescrambleInfo | ( | int | channelUid, |
CPVRDescrambleInfo & | descrambleinfo ) const |
Get the descramble information of the stream that's currently open.
channelUid | Channel unique identifier |
descrambleinfo | The descramble information. |
PVR_ERROR PVR::CPVRClient::GetDriveSpace | ( | uint64_t & | iTotal, |
uint64_t & | iUsed ) const |
Get the disk space reported by the server.
iTotal | The total disk space. |
iUsed | The used disk space. |
PVR_ERROR PVR::CPVRClient::GetEPGForChannel | ( | int | iChannelUid, |
CPVREpg * | epg, | ||
time_t | start, | ||
time_t | end ) const |
Request an EPG table for a channel from the client.
iChannelUid | The UID of the channel to get the EPG table for. |
epg | The table to write the data to. |
start | The start time to use. |
end | The end time to use. |
PVR_ERROR PVR::CPVRClient::GetEpgTagEdl | ( | const std::shared_ptr< const CPVREpgInfoTag > & | epgTag, |
std::vector< EDL::Edit > & | edls ) const |
Retrieve the edit decision list (EDL) from the backend.
epgTag | The EPG tag. |
edls | The edit decision list (empty on error). |
PVR_ERROR PVR::CPVRClient::GetEpgTagStreamProperties | ( | const std::shared_ptr< const CPVREpgInfoTag > & | tag, |
CPVRStreamProperties & | props ) const |
Fill the given container with the properties required for playback of the given EPG tag. Values are obtained from the PVR backend.
tag | The EPG tag. |
props | The container to be filled with the stream properties. |
std::string PVR::CPVRClient::GetFullClientName | ( | ) | const |
A name used to uniquely identify the client, inclusing addon name and instance name, if multiple instances are supported by the client implementation.
int PVR::CPVRClient::GetID | ( | ) | const |
std::string PVR::CPVRClient::GetInstanceName | ( | ) | const |
Get the length of the currently playing live stream, if any.
iLength | The total length of the stream that's currently being read or -1 on error. |
std::shared_ptr< CPVRClientMenuHooks > PVR::CPVRClient::GetMenuHooks | ( | ) | const |
Get the client's menu hooks.
PVR_CONNECTION_STATE PVR::CPVRClient::GetPreviousConnectionState | ( | ) | const |
Gets the backend's previous connection state.
int PVR::CPVRClient::GetPriority | ( | ) | const |
Get the priority of this client. Larger value means higher priority.
PVR_ERROR PVR::CPVRClient::GetProviders | ( | CPVRProvidersContainer & | providers | ) | const |
Request the list of all providers from the backend.
providers | The providers list to add the providers to. |
Get the total amount of providers from the backend.
iChannels | The total amount of channels on the server or -1 on error. |
Get the length of the currently playing recording stream, if any.
iLength | The total length of the stream that's currently being read or -1 on error. |
PVR_ERROR PVR::CPVRClient::GetRecordingEdl | ( | const CPVRRecording & | recording, |
std::vector< EDL::Edit > & | edls ) const |
Retrieve the edit decision list (EDL) from the backend.
recording | The recording. |
edls | The edit decision list (empty on error). |
PVR_ERROR PVR::CPVRClient::GetRecordingLastPlayedPosition | ( | const CPVRRecording & | recording, |
int & | iPosition ) const |
Retrieve the last watched position of a recording on the backend.
recording | The recording. |
iPosition | The last watched position in seconds or -1 on error |
PVR_ERROR PVR::CPVRClient::GetRecordings | ( | CPVRRecordings * | results, |
bool | deleted ) const |
Request the list of all recordings from the backend.
results | The container to add the recordings to. |
deleted | True to return deleted recordings. |
Get the total amount of recordings from the backend.
deleted | True to return deleted recordings. |
iRecordings | The total amount of recordings on the server or -1 on error. |
PVR_ERROR PVR::CPVRClient::GetRecordingSize | ( | const CPVRRecording & | recording, |
int64_t & | sizeInBytes ) const |
Retrieve the size of a recording on the backend.
recording | The recording. |
sizeInBytes | The size in bytes |
PVR_ERROR PVR::CPVRClient::GetRecordingStreamProperties | ( | const std::shared_ptr< const CPVRRecording > & | recording, |
CPVRStreamProperties & | props ) const |
Fill the given container with the properties required for playback of the given recording. Values are obtained from the PVR backend.
recording | The recording. |
props | The container to be filled with the stream properties. |
PVR_ERROR PVR::CPVRClient::GetStreamProperties | ( | PVR_STREAM_PROPERTIES * | pProperties | ) | const |
Get the stream properties of the stream that's currently being read.
pProperties | The properties. |
Obtain the chunk size to use when reading streams.
iChunkSize | the chunk size in bytes. |
PVR_ERROR PVR::CPVRClient::GetStreamTimes | ( | PVR_STREAM_TIMES * | times | ) | const |
Get Stream times for the currently playing stream, if any (will be moved to inputstream).
times | The stream times. |
PVR_ERROR PVR::CPVRClient::GetTimers | ( | CPVRTimersContainer * | results | ) | const |
Request the list of all timers from the backend.
results | The container to store the result in. |
Get the total amount of timers from the backend.
iTimers | The total amount of timers on the backend or -1 on error. |
const std::vector< std::shared_ptr< CPVRTimerType > > & PVR::CPVRClient::GetTimerTypes | ( | ) | const |
Get the timer types supported by the backend, without updating them from the backend.
bool PVR::CPVRClient::IgnoreClient | ( | ) | const |
Check whether this client should be ignored.
bool PVR::CPVRClient::IsEnabled | ( | ) | const |
Check whether this client is enabled, according to its instance/add-on configuration.
PVR_ERROR PVR::CPVRClient::IsPlayable | ( | const std::shared_ptr< const CPVREpgInfoTag > & | tag, |
bool & | bIsPlayable ) const |
Check whether the currently playing stream, if any, is a real-time stream.
bRealTime | True if real-time, false otherwise. |
PVR_ERROR PVR::CPVRClient::IsRecordable | ( | const std::shared_ptr< const CPVREpgInfoTag > & | tag, |
bool & | bIsRecordable ) const |
PVR_ERROR PVR::CPVRClient::OnPowerSavingActivated | ( | ) |
PVR_ERROR PVR::CPVRClient::OnPowerSavingDeactivated | ( | ) |
|
overridevirtual |
Reimplemented from ADDON::IAddonInstanceHandler.
|
overridevirtual |
Reimplemented from ADDON::IAddonInstanceHandler.
PVR_ERROR PVR::CPVRClient::OnSystemSleep | ( | ) |
Propagate power management events to this add-on.
PVR_ERROR PVR::CPVRClient::OnSystemWake | ( | ) |
PVR_ERROR PVR::CPVRClient::OpenDialogChannelAdd | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) |
Request the client to open dialog about given channel to add.
channel | The channel to add |
PVR_ERROR PVR::CPVRClient::OpenDialogChannelSettings | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) |
Request the client to open dialog about given channel settings.
channel | The channel to edit |
PVR_ERROR PVR::CPVRClient::OpenLiveStream | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) |
Open a live stream on the server.
channel | The channel to stream. |
PVR_ERROR PVR::CPVRClient::OpenRecordedStream | ( | const std::shared_ptr< const CPVRRecording > & | recording | ) |
Open a recording on the server.
recording | The recording to open. |
(Un)Pause a stream.
bPaused | True to pause the stream, false to unpause. |
Read from an open live stream.
lpBuf | The buffer to store the data in. |
uiBufSize | The amount of bytes to read. |
iRead | The amount of bytes that were actually read from the stream. |
Read from an open recording stream.
lpBuf | The buffer to store the data in. |
uiBufSize | The amount of bytes to read. |
iRead | The amount of bytes that were actually read from the stream. |
bool PVR::CPVRClient::ReadyToUse | ( | ) | const |
void PVR::CPVRClient::ReCreate | ( | ) |
Destroy and recreate this add-on.
PVR_ERROR PVR::CPVRClient::RenameChannel | ( | const std::shared_ptr< const CPVRChannel > & | channel | ) |
Request the client to rename given channel.
channel | The channel to rename |
PVR_ERROR PVR::CPVRClient::RenameRecording | ( | const CPVRRecording & | recording | ) |
Rename a recording on the backend.
recording | The recording to rename. |
PVR_ERROR PVR::CPVRClient::SeekLiveStream | ( | int64_t | iFilePosition, |
int | iWhence, | ||
int64_t & | iPosition ) |
Seek in a live stream on a backend.
iFilePosition | The position to seek to. |
iWhence | ? |
iPosition | The new position or -1 on error. |
PVR_ERROR PVR::CPVRClient::SeekRecordedStream | ( | int64_t | iFilePosition, |
int | iWhence, | ||
int64_t & | iPosition ) |
Seek in a recording stream on a backend.
iFilePosition | The position to seek to. |
iWhence | ? |
iPosition | The new position or -1 on error. |
Notify the pvr addon/demuxer that Kodi wishes to seek the stream by time.
time | The absolute time since stream start |
backwards | True to seek to keyframe BEFORE time, else AFTER |
startpts | can be updated to point to where display should start |
void PVR::CPVRClient::SetConnectionState | ( | PVR_CONNECTION_STATE | state | ) |
Sets the backend connection state.
state | the new backend connection state. |
Set the date and time first channels were added for this client.
dateTime | The date and time first channels were added. |
Tell the client the future 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 future epg time frame Kodi uses.
[in] | iFutureDays | number of days after "now". EPG_TIMEFRAME_UNLIMITED means that Kodi is interested in all epg events, regardless of event times. |
Tell the client the past 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 past epg time frame Kodi uses.
[in] | iPastDays | number of days before "now". EPG_TIMEFRAME_UNLIMITED means that Kodi is interested in all epg events, regardless of event times. |
Set a new priority for this client.
iPriority | The new priority. |
PVR_ERROR PVR::CPVRClient::SetRecordingLastPlayedPosition | ( | const CPVRRecording & | recording, |
int | lastplayedposition ) |
Set the last watched position of a recording on the backend.
recording | The recording. |
lastplayedposition | The last watched position in seconds |
PVR_ERROR PVR::CPVRClient::SetRecordingLifetime | ( | const CPVRRecording & | recording | ) |
Set the lifetime of a recording on the backend.
recording | The recording to set the lifetime for. recording.m_iLifetime contains the new lifetime value. |
PVR_ERROR PVR::CPVRClient::SetRecordingPlayCount | ( | const CPVRRecording & | recording, |
int | count ) |
Set the play count of a recording on the backend.
recording | The recording to set the play count. |
count | Play count. |
Notify the pvr addon/demuxer that Kodi wishes to change playback speed.
speed | The requested playback speed |
PVR_ERROR PVR::CPVRClient::SignalQuality | ( | int | channelUid, |
CPVRSignalStatus & | qualityinfo ) const |
Get the signal quality of the stream that's currently open.
channelUid | Channel unique identifier |
qualityinfo | The signal quality. |
PVR_ERROR PVR::CPVRClient::StartChannelScan | ( | ) |
Start a channel scan on the server.
void PVR::CPVRClient::Stop | ( | ) |
Stop this add-on instance. No more client add-on access after this call.
PVR_ERROR PVR::CPVRClient::StreamClosed | ( | ) | const |
A stream was closed or has ended.
|
static |
PVR_ERROR PVR::CPVRClient::UndeleteRecording | ( | const CPVRRecording & | recording | ) |
Undelete a recording on the backend.
recording | The recording to undelete. |
PVR_ERROR PVR::CPVRClient::UpdateTimer | ( | const CPVRTimerInfoTag & | timer | ) |
Update the timer information on the server.
timer | The timer to update. |
PVR_ERROR PVR::CPVRClient::UpdateTimerTypes | ( | ) |
Update all timer types supported by the backend.