Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

PVR related stream property values
This is used to pass additional data to Kodi on a given PVR stream.

Then transferred to livestream, recordings or EPG Tag stream using the properties.

This defines are used by:


Example:

...
PVR_ERROR CMyPVRInstance::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel,
std::vector<PVRStreamProperty>& properties)
{
...
properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, "inputstream.adaptive");
properties.emplace_back("inputstream.adaptive.manifest_type", "mpd");
properties.emplace_back("inputstream.adaptive.manifest_update_parameter", "full");
properties.emplace_back(PVR_STREAM_PROPERTY_MIMETYPE, "application/xml+dash");
}
...
Definition Channels.h:39
@ PVR_ERROR_NO_ERROR
0 : No error occurred.
Definition pvr_general.h:37
#define PVR_STREAM_PROPERTY_MIMETYPE
the MIME type of the stream that should be played.
Definition pvr_general.h:237
#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:162

Macro Definition Documentation

◆ PVR_STREAM_PROPERTY_STREAMURL

#define PVR_STREAM_PROPERTY_STREAMURL   "streamurl"

the URL of the stream that should be played.

◆ PVR_STREAM_PROPERTY_INPUTSTREAM

#define PVR_STREAM_PROPERTY_INPUTSTREAM   STREAM_PROPERTY_INPUTSTREAM

To define in stream properties the name of the inputstream add-on that should be used.

Leave blank to use Kodi's built-in playing capabilities or to allow ffmpeg to handle directly set to PVR_STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG.

◆ PVR_STREAM_PROPERTY_INPUTSTREAM_PLAYER

#define PVR_STREAM_PROPERTY_INPUTSTREAM_PLAYER   STREAM_PROPERTY_INPUTSTREAM_PLAYER

To define in stream properties the player the inputstream add-on should use.

Leave blank to use Kodi's built-in player selection mechanism. Permitted values are:

  • "videodefaultplayer"
  • "audiodefaultplayer"

◆ PVR_STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID

#define PVR_STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID   STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID

Identification string for an input stream.

This value can be used in addition to PVR_STREAM_PROPERTY_INPUTSTREAM. It is used to provide the respective inpustream addon with additional identification.

The difference between this and other stream properties is that it is also passed in the associated kodi::addon::CAddonBase::CreateInstance() call.

This makes it possible to select different processing classes within the associated add-on.


Example:

...
// On PVR instance of addon
PVR_ERROR CMyPVRInstance::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel,
std::vector<PVRStreamProperty>& properties)
{
...
// For here on example the inpustream is also inside the PVR addon
properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, "pvr.my_one");
properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID, "my_special_id_1");
}
...
// On CAddonBase part of addon
ADDON_STATUS CMyAddon::CreateInstanceEx(int instanceType,
std::string instanceID,
KODI_HANDLE instance,
KODI_HANDLE& addonInstance
const std::string& version)
{
if (instanceType == ADDON_INSTANCE_INPUTSTREAM)
{
kodi::Log(ADDON_LOG_INFO, "Creating my special inputstream");
if (instanceID == "my_special_id_1")
addonInstance = new CMyPVRClientInstance_Type1(instance, version);
else if (instanceID == "my_special_id_2")
addonInstance = new CMyPVRClientInstance_Type2(instance, version);
}
else if (...)
{
...
}
}
...
@ ADDON_LOG_INFO
1 : To include information messages in the log file.
Definition addon_base.h:187
@ ADDON_STATUS_OK
For everything OK and no error.
Definition addon_base.h:140
@ ADDON_STATUS_UNKNOWN
Unknown and incomprehensible error.
Definition addon_base.h:152
@ ADDON_INSTANCE_INPUTSTREAM
Input stream instance, see kodi::addon::CInstanceInputStream.
Definition versions.h:227
#define PVR_STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID
Identification string for an input stream.
Definition pvr_general.h:233
void ATTR_DLL_LOCAL Log(const ADDON_LOG loglevel, const char *format,...)
Add a message to Kodi's log.
Definition AddonBase.h:1746

◆ PVR_STREAM_PROPERTY_MIMETYPE

#define PVR_STREAM_PROPERTY_MIMETYPE   "mimetype"

the MIME type of the stream that should be played.

◆ PVR_STREAM_PROPERTY_ISREALTIMESTREAM

#define PVR_STREAM_PROPERTY_ISREALTIMESTREAM   STREAM_PROPERTY_ISREALTIMESTREAM

"true" to denote that the stream that should be played is a realtime stream.

Any other value indicates that this is no realtime stream.

◆ PVR_STREAM_PROPERTY_EPGPLAYBACKASLIVE

#define PVR_STREAM_PROPERTY_EPGPLAYBACKASLIVE   "epgplaybackaslive"

"true" to denote that if the stream is from an EPG tag.

It should be played is a live stream. Otherwise if it's a EPG tag it will play as normal video.

◆ PVR_STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG

#define PVR_STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG   STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG

Special value for PVR_STREAM_PROPERTY_INPUTSTREAM to use ffmpeg to directly play a stream URL.