Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

Inputstream add-on stream info
This is used to give Kodi the associated and necessary data for an open stream. More...

Topics

 Value Help
 

Classes

class  kodi::addon::InputstreamInfo
 

Functions

void kodi::addon::InputstreamInfo::SetStreamType (INPUTSTREAM_TYPE streamType)
 Set the wanted stream type.
 
INPUTSTREAM_TYPE kodi::addon::InputstreamInfo::GetStreamType () const
 To get with SetStreamType changed values.
 
void kodi::addon::InputstreamInfo::SetFeatures (uint32_t features)
 Set special supported feature flags of inputstream.
 
uint32_t kodi::addon::InputstreamInfo::GetFeatures () const
 To get with SetFeatures changed values.
 
void kodi::addon::InputstreamInfo::SetFlags (uint32_t flags)
 Set supported flags of inputstream.
 
uint32_t kodi::addon::InputstreamInfo::GetFlags () const
 To get with SetFeatures changed values.
 
void kodi::addon::InputstreamInfo::SetName (const std::string &name)
 (optional) Name of the stream, leave empty for default handling.
 
std::string kodi::addon::InputstreamInfo::GetName () const
 To get with SetName changed values.
 
void kodi::addon::InputstreamInfo::SetCodecName (const std::string &codecName)
 (required) Name of codec according to ffmpeg.
 
std::string kodi::addon::InputstreamInfo::GetCodecName () const
 To get with SetCodecName changed values.
 
void kodi::addon::InputstreamInfo::SetCodecInternalName (const std::string &codecName)
 (optional) Internal name of codec (selectionstream info).
 
std::string kodi::addon::InputstreamInfo::GetCodecInternalName () const
 To get with SetCodecInternalName changed values.
 
void kodi::addon::InputstreamInfo::SetCodecProfile (STREAMCODEC_PROFILE codecProfile)
 (optional) The profile of the codec.
 
STREAMCODEC_PROFILE kodi::addon::InputstreamInfo::GetCodecProfile () const
 To get with SetCodecProfile changed values.
 
void kodi::addon::InputstreamInfo::SetPhysicalIndex (unsigned int id)
 (required) Physical index.
 
unsigned int kodi::addon::InputstreamInfo::GetPhysicalIndex () const
 To get with SetPhysicalIndex changed values.
 
void kodi::addon::InputstreamInfo::SetExtraData (const std::vector< uint8_t > &extraData)
 Additional data where can needed on streams.
 
void kodi::addon::InputstreamInfo::SetExtraData (const uint8_t *extraData, size_t extraSize)
 Additional data where can needed on streams.
 
const std::vector< uint8_t > & kodi::addon::InputstreamInfo::GetExtraData ()
 To get with SetExtraData changed values.
 
size_t kodi::addon::InputstreamInfo::GetExtraDataSize ()
 To get size with SetExtraData changed values.
 
bool kodi::addon::InputstreamInfo::CompareExtraData (const uint8_t *extraData, size_t extraSize) const
 Compare extra data from outside with class.
 
void kodi::addon::InputstreamInfo::ClearExtraData ()
 Clear additional data.
 
void kodi::addon::InputstreamInfo::SetLanguage (const std::string &language)
 RFC 5646 language code (empty string if undefined).
 
std::string kodi::addon::InputstreamInfo::GetLanguage () const
 To get with SetLanguage changed values.
 
void kodi::addon::InputstreamInfo::SetFpsScale (unsigned int fpsScale)
 Scale of 1000 and a rate of 29970 will result in 29.97 fps.
 
unsigned int kodi::addon::InputstreamInfo::GetFpsScale () const
 To get with SetFpsScale changed values.
 
void kodi::addon::InputstreamInfo::SetFpsRate (unsigned int fpsRate)
 Rate to use for stream.
 
unsigned int kodi::addon::InputstreamInfo::GetFpsRate () const
 To get with SetFpsRate changed values.
 
void kodi::addon::InputstreamInfo::SetHeight (unsigned int height)
 Height of the stream reported by the demuxer.
 
unsigned int kodi::addon::InputstreamInfo::GetHeight () const
 To get with SetHeight changed values.
 
void kodi::addon::InputstreamInfo::SetWidth (unsigned int width)
 Width of the stream reported by the demuxer.
 
unsigned int kodi::addon::InputstreamInfo::GetWidth () const
 To get with SetWidth changed values.
 
void kodi::addon::InputstreamInfo::SetAspect (float aspect)
 Display aspect of stream.
 
float kodi::addon::InputstreamInfo::GetAspect () const
 To get with SetAspect changed values.
 
void kodi::addon::InputstreamInfo::SetChannels (unsigned int channels)
 (required) Amount of channels.
 
unsigned int kodi::addon::InputstreamInfo::GetChannels () const
 To get with SetChannels changed values.
 
void kodi::addon::InputstreamInfo::SetSampleRate (unsigned int sampleRate)
 (required) Sample rate.
 
unsigned int kodi::addon::InputstreamInfo::GetSampleRate () const
 To get with SetSampleRate changed values.
 
void kodi::addon::InputstreamInfo::SetBitRate (unsigned int bitRate)
 Bit rate.
 
unsigned int kodi::addon::InputstreamInfo::GetBitRate () const
 To get with SetBitRate changed values.
 
void kodi::addon::InputstreamInfo::SetBitsPerSample (unsigned int bitsPerSample)
 (required) Bits per sample.
 
unsigned int kodi::addon::InputstreamInfo::GetBitsPerSample () const
 To get with SetBitsPerSample changed values.
 
void kodi::addon::InputstreamInfo::SetBlockAlign (unsigned int blockAlign)
 To set the necessary stream block alignment size.
 
unsigned int kodi::addon::InputstreamInfo::GetBlockAlign () const
 To get with SetBlockAlign changed values.
 
void kodi::addon::InputstreamInfo::SetCryptoSession (const kodi::addon::StreamCryptoSession &cryptoSession)
 To set stream crypto session information.
 
const kodi::addon::StreamCryptoSessionkodi::addon::InputstreamInfo::GetCryptoSession () const
 To get with GetCryptoSession changed values.
 
void kodi::addon::InputstreamInfo::SetCodecFourCC (unsigned int codecFourCC)
 Codec If available, the fourcc code codec.
 
unsigned int kodi::addon::InputstreamInfo::GetCodecFourCC () const
 To get with SetCodecFourCC changed values.
 
void kodi::addon::InputstreamInfo::SetColorSpace (INPUTSTREAM_COLORSPACE colorSpace)
 Definition of colorspace.
 
INPUTSTREAM_COLORSPACE kodi::addon::InputstreamInfo::GetColorSpace () const
 To get with SetColorSpace changed values.
 
void kodi::addon::InputstreamInfo::SetColorRange (INPUTSTREAM_COLORRANGE colorRange)
 Color range if available.
 
INPUTSTREAM_COLORRANGE kodi::addon::InputstreamInfo::GetColorRange () const
 To get with SetColorRange changed values.
 
void kodi::addon::InputstreamInfo::SetColorPrimaries (INPUTSTREAM_COLORPRIMARIES colorPrimaries)
 Chromaticity coordinates of the source primaries. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1.
 
INPUTSTREAM_COLORPRIMARIES kodi::addon::InputstreamInfo::GetColorPrimaries () const
 To get with SetColorPrimaries changed values.
 
void kodi::addon::InputstreamInfo::SetColorTransferCharacteristic (INPUTSTREAM_COLORTRC colorTransferCharacteristic)
 Color Transfer Characteristic. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.2.
 
INPUTSTREAM_COLORTRC kodi::addon::InputstreamInfo::GetColorTransferCharacteristic () const
 To get with SetColorTransferCharacteristic changed values.
 
void kodi::addon::InputstreamInfo::SetMasteringMetadata (const kodi::addon::InputstreamMasteringMetadata &masteringMetadata)
 Mastering static Metadata.
 
const kodi::addon::InputstreamMasteringMetadatakodi::addon::InputstreamInfo::GetMasteringMetadata () const
 To get with SetMasteringMetadata changed values.
 
void kodi::addon::InputstreamInfo::ClearMasteringMetadata ()
 Clear mastering static Metadata.
 
void kodi::addon::InputstreamInfo::SetContentLightMetadata (const kodi::addon::InputstreamContentlightMetadata &contentLightMetadata)
 Content light static Metadata.
 
const kodi::addon::InputstreamContentlightMetadatakodi::addon::InputstreamInfo::GetContentLightMetadata () const
 To get with SetContentLightMetadata changed values.
 
void kodi::addon::InputstreamInfo::ClearContentLightMetadata ()
 Clear content light static Metadata.
 

Detailed Description

Inputstream add-on stream info
This is used to give Kodi the associated and necessary data for an open stream.

Used on kodi::addon::CInstanceInputStream::GetStream().


The following table contains values that can be set with class InputstreamInfo :

Name Type used Required Set call Get call
Stream type all yes SetStreamType GetStreamType
Feature flags all yes SetFeatures GetFeatures
Flags all yes SetFlags GetFlags
Name all no SetName GetName
Codec name all yes SetCodecName GetCodecName
Codec internal name all no SetCodecInternalName GetCodecInternalName
Codec Profile all no SetCodecProfile GetCodecProfile
Physical index all yes SetPhysicalIndex GetPhysicalIndex
Extra data Subtitle / all Type related required SetExtraData GetExtraData
RFC 5646 language code all no SetLanguage GetLanguage
FPS scale Video Type related required SetFpsScale GetFpsScale
FPS rate Video Type related required SetFpsRate GetFpsRate
Height Video Type related required SetHeight GetHeight
Width Video Type related required SetWidth GetWidth
Aspect Video Type related required SetAspect GetAspect
Channel quantity Audio Type related required SetChannels GetChannels
Sample rate Audio Type related required SetSampleRate GetSampleRate
Bit rate Audio Type related required SetBitRate GetBitRate
Bits per sample Audio Type related required SetBitsPerSample GetBitsPerSample
Block align no SetBlockAlign GetBlockAlign
Crypto session info no SetCryptoSession GetCryptoSession
Four CC code no SetCodecFourCC GetCodecFourCC
Color space no SetColorSpace GetColorSpace
Color range no SetColorRange GetColorRange
Color primaries no SetColorPrimaries GetColorPrimaries
Color transfer characteristic no SetColorTransferCharacteristic GetColorTransferCharacteristic
Mastering metadata no SetMasteringMetadata GetMasteringMetadata
Content light metadata no SetContentLightMetadata GetContentLightMetadata

Function Documentation

◆ ClearContentLightMetadata()

void kodi::addon::InputstreamInfo::ClearContentLightMetadata ( )
inline

Clear content light static Metadata.

◆ ClearExtraData()

void kodi::addon::InputstreamInfo::ClearExtraData ( )
inline

Clear additional data.

◆ ClearMasteringMetadata()

void kodi::addon::InputstreamInfo::ClearMasteringMetadata ( )
inline

Clear mastering static Metadata.

◆ CompareExtraData()

bool kodi::addon::InputstreamInfo::CompareExtraData ( const uint8_t * extraData,
size_t extraSize ) const
inline

Compare extra data from outside with class.

Parameters
[in]extraDataPointer with memory of extra data for compare
[in]extraSizeSize to compare
Returns
true if they equal, false otherwise

◆ GetAspect()

float kodi::addon::InputstreamInfo::GetAspect ( ) const
inline

To get with SetAspect changed values.

◆ GetBitRate()

unsigned int kodi::addon::InputstreamInfo::GetBitRate ( ) const
inline

To get with SetBitRate changed values.

◆ GetBitsPerSample()

unsigned int kodi::addon::InputstreamInfo::GetBitsPerSample ( ) const
inline

To get with SetBitsPerSample changed values.

◆ GetBlockAlign()

unsigned int kodi::addon::InputstreamInfo::GetBlockAlign ( ) const
inline

To get with SetBlockAlign changed values.

◆ GetChannels()

unsigned int kodi::addon::InputstreamInfo::GetChannels ( ) const
inline

To get with SetChannels changed values.

◆ GetCodecFourCC()

unsigned int kodi::addon::InputstreamInfo::GetCodecFourCC ( ) const
inline

To get with SetCodecFourCC changed values.

◆ GetCodecInternalName()

std::string kodi::addon::InputstreamInfo::GetCodecInternalName ( ) const
inline

To get with SetCodecInternalName changed values.

◆ GetCodecName()

std::string kodi::addon::InputstreamInfo::GetCodecName ( ) const
inline

To get with SetCodecName changed values.

◆ GetCodecProfile()

STREAMCODEC_PROFILE kodi::addon::InputstreamInfo::GetCodecProfile ( ) const
inline

To get with SetCodecProfile changed values.

◆ GetColorPrimaries()

INPUTSTREAM_COLORPRIMARIES kodi::addon::InputstreamInfo::GetColorPrimaries ( ) const
inline

To get with SetColorPrimaries changed values.

◆ GetColorRange()

INPUTSTREAM_COLORRANGE kodi::addon::InputstreamInfo::GetColorRange ( ) const
inline

To get with SetColorRange changed values.

◆ GetColorSpace()

INPUTSTREAM_COLORSPACE kodi::addon::InputstreamInfo::GetColorSpace ( ) const
inline

To get with SetColorSpace changed values.

◆ GetColorTransferCharacteristic()

INPUTSTREAM_COLORTRC kodi::addon::InputstreamInfo::GetColorTransferCharacteristic ( ) const
inline

To get with SetColorTransferCharacteristic changed values.

◆ GetContentLightMetadata()

const kodi::addon::InputstreamContentlightMetadata & kodi::addon::InputstreamInfo::GetContentLightMetadata ( ) const
inline

To get with SetContentLightMetadata changed values.

◆ GetCryptoSession()

const kodi::addon::StreamCryptoSession & kodi::addon::InputstreamInfo::GetCryptoSession ( ) const
inline

To get with GetCryptoSession changed values.

◆ GetExtraData()

const std::vector< uint8_t > & kodi::addon::InputstreamInfo::GetExtraData ( )
inline

To get with SetExtraData changed values.

◆ GetExtraDataSize()

size_t kodi::addon::InputstreamInfo::GetExtraDataSize ( )
inline

To get size with SetExtraData changed values.

◆ GetFeatures()

uint32_t kodi::addon::InputstreamInfo::GetFeatures ( ) const
inline

To get with SetFeatures changed values.

◆ GetFlags()

uint32_t kodi::addon::InputstreamInfo::GetFlags ( ) const
inline

To get with SetFeatures changed values.

◆ GetFpsRate()

unsigned int kodi::addon::InputstreamInfo::GetFpsRate ( ) const
inline

To get with SetFpsRate changed values.

◆ GetFpsScale()

unsigned int kodi::addon::InputstreamInfo::GetFpsScale ( ) const
inline

To get with SetFpsScale changed values.

◆ GetHeight()

unsigned int kodi::addon::InputstreamInfo::GetHeight ( ) const
inline

To get with SetHeight changed values.

◆ GetLanguage()

std::string kodi::addon::InputstreamInfo::GetLanguage ( ) const
inline

To get with SetLanguage changed values.

◆ GetMasteringMetadata()

const kodi::addon::InputstreamMasteringMetadata & kodi::addon::InputstreamInfo::GetMasteringMetadata ( ) const
inline

To get with SetMasteringMetadata changed values.

◆ GetName()

std::string kodi::addon::InputstreamInfo::GetName ( ) const
inline

To get with SetName changed values.

◆ GetPhysicalIndex()

unsigned int kodi::addon::InputstreamInfo::GetPhysicalIndex ( ) const
inline

To get with SetPhysicalIndex changed values.

◆ GetSampleRate()

unsigned int kodi::addon::InputstreamInfo::GetSampleRate ( ) const
inline

To get with SetSampleRate changed values.

◆ GetStreamType()

INPUTSTREAM_TYPE kodi::addon::InputstreamInfo::GetStreamType ( ) const
inline

To get with SetStreamType changed values.

◆ GetWidth()

unsigned int kodi::addon::InputstreamInfo::GetWidth ( ) const
inline

To get with SetWidth changed values.

◆ SetAspect()

void kodi::addon::InputstreamInfo::SetAspect ( float aspect)
inline

Display aspect of stream.

Parameters
[in]aspectAspect ratio to use

◆ SetBitRate()

void kodi::addon::InputstreamInfo::SetBitRate ( unsigned int bitRate)
inline

Bit rate.

Parameters
[in]bitRateRate to use

◆ SetBitsPerSample()

void kodi::addon::InputstreamInfo::SetBitsPerSample ( unsigned int bitsPerSample)
inline

(required) Bits per sample.

Parameters
[in]bitsPerSampleBits per sample to use

◆ SetBlockAlign()

void kodi::addon::InputstreamInfo::SetBlockAlign ( unsigned int blockAlign)
inline

To set the necessary stream block alignment size.

Parameters
[in]blockAlignBlock size in byte

◆ SetChannels()

void kodi::addon::InputstreamInfo::SetChannels ( unsigned int channels)
inline

(required) Amount of channels.

Parameters
[in]sampleRateChannels to use

◆ SetCodecFourCC()

void kodi::addon::InputstreamInfo::SetCodecFourCC ( unsigned int codecFourCC)
inline

Codec If available, the fourcc code codec.

Parameters
[in]codecFourCCCodec four CC code

◆ SetCodecInternalName()

void kodi::addon::InputstreamInfo::SetCodecInternalName ( const std::string & codecName)
inline

(optional) Internal name of codec (selectionstream info).

Parameters
[in]codecNameInternal codec name

◆ SetCodecName()

void kodi::addon::InputstreamInfo::SetCodecName ( const std::string & codecName)
inline

(required) Name of codec according to ffmpeg.

See https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/codec_desc.c about available names.

Remarks
On INPUTSTREAM_TYPE_TELETEXT, INPUTSTREAM_TYPE_RDS, and INPUTSTREAM_TYPE_ID3 this can be ignored and leaved empty.
Parameters
[in]codeNameCodec name

◆ SetCodecProfile()

void kodi::addon::InputstreamInfo::SetCodecProfile ( STREAMCODEC_PROFILE codecProfile)
inline

(optional) The profile of the codec.

Parameters
[in]codecProfileValues with STREAMCODEC_PROFILE to use

◆ SetColorPrimaries()

void kodi::addon::InputstreamInfo::SetColorPrimaries ( INPUTSTREAM_COLORPRIMARIES colorPrimaries)
inline

Chromaticity coordinates of the source primaries. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1.

Parameters
[in]colorPrimariesThe with INPUTSTREAM_COLORPRIMARIES setable values

◆ SetColorRange()

void kodi::addon::InputstreamInfo::SetColorRange ( INPUTSTREAM_COLORRANGE colorRange)
inline

Color range if available.

Parameters
[in]colorRangeThe with INPUTSTREAM_COLORRANGE setable color space

◆ SetColorSpace()

void kodi::addon::InputstreamInfo::SetColorSpace ( INPUTSTREAM_COLORSPACE colorSpace)
inline

Definition of colorspace.

Parameters
[in]colorSpaceThe with INPUTSTREAM_COLORSPACE setable color space

◆ SetColorTransferCharacteristic()

void kodi::addon::InputstreamInfo::SetColorTransferCharacteristic ( INPUTSTREAM_COLORTRC colorTransferCharacteristic)
inline

Color Transfer Characteristic. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.2.

Parameters
[in]colorTransferCharacteristicThe with INPUTSTREAM_COLORTRC setable characteristic

◆ SetContentLightMetadata()

void kodi::addon::InputstreamInfo::SetContentLightMetadata ( const kodi::addon::InputstreamContentlightMetadata & contentLightMetadata)
inline

Content light static Metadata.

The maximum content light level (MaxCLL) and frame average light level (MaxFALL) for the metadata for HDR10.

Parameters
[in]contentLightMetadataThe with class InputstreamContentlightMetadata setable metadata

◆ SetCryptoSession()

void kodi::addon::InputstreamInfo::SetCryptoSession ( const kodi::addon::StreamCryptoSession & cryptoSession)
inline

To set stream crypto session information.

Parameters
[in]cryptoSessionThe with cpp_kodi_addon_inputstream_Defs_Interface_StreamCryptoSession setable info

◆ SetExtraData() [1/2]

void kodi::addon::InputstreamInfo::SetExtraData ( const std::vector< uint8_t > & extraData)
inline

Additional data where can needed on streams.

Parameters
[in]extraDataList with memory of extra data

◆ SetExtraData() [2/2]

void kodi::addon::InputstreamInfo::SetExtraData ( const uint8_t * extraData,
size_t extraSize )
inline

Additional data where can needed on streams.

Parameters
[in]extraDataPointer with memory of extra data
[in]extraSizeSize to store

◆ SetFeatures()

void kodi::addon::InputstreamInfo::SetFeatures ( uint32_t features)
inline

Set special supported feature flags of inputstream.

Parameters
[in]featuresBy INPUTSTREAM_CODEC_FEATURES defined type

◆ SetFlags()

void kodi::addon::InputstreamInfo::SetFlags ( uint32_t flags)
inline

Set supported flags of inputstream.

Parameters
[in]flagsThe on INPUTSTREAM_FLAGS defined flags to set

◆ SetFpsRate()

void kodi::addon::InputstreamInfo::SetFpsRate ( unsigned int fpsRate)
inline

Rate to use for stream.

Parameters
[in]fpsRateRate to use

◆ SetFpsScale()

void kodi::addon::InputstreamInfo::SetFpsScale ( unsigned int fpsScale)
inline

Scale of 1000 and a rate of 29970 will result in 29.97 fps.

Parameters
[in]fpsScaleScale rate

◆ SetHeight()

void kodi::addon::InputstreamInfo::SetHeight ( unsigned int height)
inline

Height of the stream reported by the demuxer.

Parameters
[in]heightHeight to use

◆ SetLanguage()

void kodi::addon::InputstreamInfo::SetLanguage ( const std::string & language)
inline

RFC 5646 language code (empty string if undefined).

Parameters
[in]languageThe language to set

◆ SetMasteringMetadata()

void kodi::addon::InputstreamInfo::SetMasteringMetadata ( const kodi::addon::InputstreamMasteringMetadata & masteringMetadata)
inline

Mastering static Metadata.

Describes the metadata for HDR10, used when video is compressed using High Efficiency Video Coding (HEVC). This is used to describe the capabilities of the display used to master the content and the luminance values of the content.

Parameters
[in]masteringMetadataThe with class InputstreamMasteringMetadata setable metadata

◆ SetName()

void kodi::addon::InputstreamInfo::SetName ( const std::string & name)
inline

(optional) Name of the stream, leave empty for default handling.

Parameters
[in]nameStream name

◆ SetPhysicalIndex()

void kodi::addon::InputstreamInfo::SetPhysicalIndex ( unsigned int id)
inline

(required) Physical index.

Parameters
[in]idIndex identifier

◆ SetSampleRate()

void kodi::addon::InputstreamInfo::SetSampleRate ( unsigned int sampleRate)
inline

(required) Sample rate.

Parameters
[in]sampleRateRate to use

◆ SetStreamType()

void kodi::addon::InputstreamInfo::SetStreamType ( INPUTSTREAM_TYPE streamType)
inline

Set the wanted stream type.

Parameters
[in]streamTypeBy INPUTSTREAM_TYPE defined type

◆ SetWidth()

void kodi::addon::InputstreamInfo::SetWidth ( unsigned int width)
inline

Width of the stream reported by the demuxer.

Parameters
[in]widthWidth to use