PVR EPG methods
These C ++ class functions of are intended for processing EPG information and for giving it to Kodi.
More...
PVR EPG methods
These C ++ class functions of are intended for processing EPG information and for giving it to Kodi.
The necessary data is transferred with class PVREPGTag.
EPG parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ CallEPGMenuHook()
Call one of the EPG related menu hooks (if supported).
Supported class PVRMenuhook instances have to be added in constructor()
, by calling AddMenuHook() on the callback.
- Parameters
-
[in] | menuhook | The hook to call. |
[in] | tag | The selected EPG item for which the hook was called. |
- Returns
- PVR_ERROR_NO_ERROR if the hook was called successfully.
The following table contains values that can be set with class PVRMenuhook :
◆ EpgEventStateChange()
Callback to Kodi Function
Notify a state change for an EPG event.
- Parameters
-
[in] | tag | The EPG tag where have event. |
[in] | newState | The new state.
|
Example:
...
void CMyPVRInstance::MyProcessFunction()
{
...
...
}
...
const char struct KODI_ADDON_AUDIODECODER_INFO_TAG * tag
Definition addons/kodi-dev-kit/include/kodi/c-api/addon-instance/AudioDecoder.h:122
Definition addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Epg.h:40
@ EPG_EVENT_UPDATED
1 : Event updated.
Definition pvr_epg.h:607
void EpgEventStateChange(kodi::addon::PVREPGTag &tag, EPG_EVENT_STATE newState)
Callback to Kodi Function Notify a state change for an EPG event.
Definition addon-instance/pvr.h:1690
◆ EpgMaxFutureDays()
int kodi::addon::CInstancePVRClient::EpgMaxFutureDays |
( |
| ) |
const |
|
inline |
◆ EpgMaxPastDays()
int kodi::addon::CInstancePVRClient::EpgMaxPastDays |
( |
| ) |
const |
|
inline |
◆ GetEPGForChannel()
Request the EPG for a channel from the backend.
- Parameters
-
[in] | channelUid | The UID of the channel to get the EPG table for. |
[in] | start | Get events after this time (UTC). |
[in] | end | Get events before this time (UTC). |
[out] | results | List where available EPG information becomes transferred with class PVREPGTag and given to Kodi |
- Returns
- PVR_ERROR_NO_ERROR if the table has been fetched successfully.
The following table contains values that can be set with class PVREPGTag :
Example:
...
PVR_ERROR CMyPVRInstance::GetEPGForChannel(int channelUid,
time_t start,
{
tag.SetUniqueBroadcastId(123);
tag.SetUniqueChannelId(123);
tag.SetTitle(
"My epg entry name");
tag.SetStartTime(1589148283);
tag.SetEndTime(1589151913);
...
}
...
T * end(T(&ra)[N])
Definition TestTagLoaderTagLib.cpp:75
@ PVR_ERROR_NO_ERROR
0 : No error occurred.
Definition pvr_general.h:38
@ EPG_EVENT_CONTENTMASK_MOVIEDRAMA
0x10 : Movie/Drama. See EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA about related sub types.
Definition pvr_epg.h:69
◆ GetEPGTagEdl()
Retrieve the edit decision list (EDL) of an EPG tag on the backend.
- Parameters
-
[in] | tag | The epg tag. |
[out] | edl | The function has to write the EDL into this array. |
- Returns
- PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists.
The following table contains values that can be set with class PVREDLEntry :
◆ GetEPGTagStreamProperties()
Get the stream properties for an epg tag from the backend.
- Parameters
-
[in] | tag | The epg tag to get the stream properties for. |
[out] | properties | the properties required to play the stream. |
- Returns
- PVR_ERROR_NO_ERROR if the stream is available.
- Note
- The value directly related to inputstream must always begin with the name of the associated add-on, e.g.
"inputstream.adaptive.manifest_update_parameter"
.
Example:
...
std::vector<kodi::addon::PVRStreamProperty>& properties)
{
...
properties.emplace_back("inputstream.adaptive.manifest_type", "mpd");
properties.emplace_back("inputstream.adaptive.manifest_update_parameter", "full");
}
...
#define PVR_STREAM_PROPERTY_MIMETYPE
the MIME type of the stream that should be played.
Definition pvr_general.h:311
#define PVR_STREAM_PROPERTY_INPUTSTREAM
To define in stream properties the name of the inputstream add-on that should be used.
Definition pvr_general.h:235
◆ IsEPGTagPlayable()
Check if the given EPG tag can be played.
- Parameters
-
[in] | tag | the epg tag to check. |
[out] | isPlayable | Set to true if the tag can be played. |
- Returns
- PVR_ERROR_NO_ERROR if bIsPlayable has been set successfully.
◆ IsEPGTagRecordable()
Check if the given EPG tag can be recorded.
- Parameters
-
[in] | tag | the epg tag to check. |
[out] | isRecordable | Set to true if the tag can be recorded. |
- Returns
- PVR_ERROR_NO_ERROR if bIsRecordable has been set successfully.
◆ SetEPGMaxFutureDays()
virtual PVR_ERROR kodi::addon::CInstancePVRClient::SetEPGMaxFutureDays |
( |
int | futureDays | ) |
|
|
inlinevirtual |
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 epg time frame Kodi uses. Kodi supplies the current epg max future time frame value EpgMaxFutureDays() when creating the addon and calls SetEPGMaxFutureDays later whenever Kodi's epg time frame value changes.
- Parameters
-
[in] | futureDays | number 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.
◆ SetEPGMaxPastDays()
virtual PVR_ERROR kodi::addon::CInstancePVRClient::SetEPGMaxPastDays |
( |
int | pastDays | ) |
|
|
inlinevirtual |
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 epg time frame Kodi uses. Kodi supplies the current epg max past time frame value EpgMaxPastDays() when creating the addon and calls SetEPGMaxPastDays later whenever Kodi's epg time frame value changes.
- Parameters
-
[in] | pastDays | number of days before "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.
◆ TriggerEpgUpdate()
void kodi::addon::CInstancePVRClient::TriggerEpgUpdate |
( |
unsigned int | channelUid | ) |
|
|
inline |
Callback to Kodi Function
Schedule an EPG update for the given channel channel.
- Parameters
-
[in] | channelUid | The unique id of the channel for this add-on |