Functions to get available TV or Radio channels
These are mandatory functions for using this addon to get the available channels.
Channel parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ GetChannelsAmount()
virtual PVR_ERROR GetChannelsAmount |
( |
int & |
amount | ) |
|
|
inlinevirtual |
The total amount of channels on the backend.
- Parameters
-
[out] | amount | The total amount of channels on the backend |
- Returns
- PVR_ERROR_NO_ERROR if the amount has been fetched successfully.
◆ GetChannels()
Request the list of all channels from the backend.
- Parameters
-
- Returns
- PVR_ERROR_NO_ERROR if the list has been fetched successfully.
The following table contains values that can be set with class PVRChannel :
Example:
◆ GetChannelStreamProperties()
Get the stream properties for a channel from the backend.
- Parameters
-
[in] | channel | The channel 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");
}
...
◆ GetSignalStatus()
Get the signal status of the stream that's currently open.
- Parameters
-
[out] | signalStatus | The signal status. |
- Returns
- PVR_ERROR_NO_ERROR if the signal status has been read successfully, false otherwise.
The following table contains values that can be set with class PVRSignalStatus :
Here's example about the use of this:
#include <kodi/addon-instance/PVR.h>
...
class ATTRIBUTE_HIDDEN CPVRExample
{
public:
...
PVR_ERROR SignalStatus(PVRSignalStatus &signalStatus)
override
{
signalStatus.SetAapterName("Example adapter 1");
signalStatus.SetAdapterStatus("OK");
signalStatus.SetSignal(0xFFFF);
}
};
ADDONCREATOR(CPVRExample)
◆ GetDescrambleInfo()
Get the descramble information of the stream that's currently open.
- Parameters
-
[out] | descrambleInfo | The descramble information. |
- Returns
- PVR_ERROR_NO_ERROR if the descramble information has been read successfully, false otherwise.
The following table contains values that can be set with class PVRDescrambleInfo :
◆ TriggerChannelUpdate()
void TriggerChannelUpdate |
( |
| ) |
|
|
inline |
Callback to Kodi Function
Request Kodi to update it's list of channels.