Kodi Development  20.0
for Binary and Script based Add-Ons

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

Modules

 Value Help
 

Function Documentation

◆ SetStreamType()

void SetStreamType ( INPUTSTREAM_TYPE  streamType)
inline

Set the wanted stream type.

Parameters
[in]streamTypeBy INPUTSTREAM_TYPE defined type

◆ GetStreamType()

INPUTSTREAM_TYPE GetStreamType ( ) const
inline

To get with SetStreamType changed values.

◆ SetFeatures()

void SetFeatures ( uint32_t  features)
inline

Set special supported feature flags of inputstream.

Parameters
[in]featuresBy INPUTSTREAM_CODEC_FEATURES defined type

◆ GetFeatures()

uint32_t GetFeatures ( ) const
inline

To get with SetFeatures changed values.

◆ SetFlags()

void SetFlags ( uint32_t  flags)
inline

Set supported flags of inputstream.

Parameters
[in]flagsThe on INPUTSTREAM_FLAGS defined flags to set

◆ GetFlags()

uint32_t GetFlags ( ) const
inline

To get with SetFeatures changed values.

◆ SetName()

void SetName ( const std::string &  name)
inline

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

Parameters
[in]nameStream name

◆ GetName()

std::string GetName ( ) const
inline

To get with SetName changed values.

◆ SetCodecName()

void 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 and INPUTSTREAM_TYPE_RDS this can be ignored and leaved empty.
Parameters
[in]codeNameCodec name

◆ GetCodecName()

std::string GetCodecName ( ) const
inline

To get with SetCodecName changed values.

◆ SetCodecInternalName()

void SetCodecInternalName ( const std::string &  codecName)
inline

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

Parameters
[in]codecNameInternal codec name

◆ GetCodecInternalName()

std::string GetCodecInternalName ( ) const
inline

To get with SetCodecInternalName changed values.

◆ SetCodecProfile()

void SetCodecProfile ( STREAMCODEC_PROFILE  codecProfile)
inline

(optional) The profile of the codec.

Parameters
[in]codecProfileValues with STREAMCODEC_PROFILE to use

◆ GetCodecProfile()

STREAMCODEC_PROFILE GetCodecProfile ( ) const
inline

To get with SetCodecProfile changed values.

◆ SetPhysicalIndex()

void SetPhysicalIndex ( unsigned int  id)
inline

(required) Physical index.

Parameters
[in]idIndex identifier

◆ GetPhysicalIndex()

unsigned int GetPhysicalIndex ( ) const
inline

To get with SetPhysicalIndex changed values.

◆ SetExtraData() [1/2]

void 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 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

◆ GetExtraData()

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

To get with SetExtraData changed values.

◆ GetExtraDataSize()

size_t GetExtraDataSize ( )
inline

To get size with SetExtraData changed values.

◆ CompareExtraData()

bool 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

◆ ClearExtraData()

void ClearExtraData ( )
inline

Clear additional data.

◆ SetLanguage()

void SetLanguage ( const std::string &  language)
inline

RFC 5646 language code (empty string if undefined).

Parameters
[in]languageThe language to set

◆ GetLanguage()

std::string GetLanguage ( ) const
inline

To get with SetLanguage changed values.

◆ SetFpsScale()

void SetFpsScale ( unsigned int  fpsScale)
inline

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

Parameters
[in]fpsScaleScale rate

◆ GetFpsScale()

unsigned int GetFpsScale ( ) const
inline

To get with SetFpsScale changed values.

◆ SetFpsRate()

void SetFpsRate ( unsigned int  fpsRate)
inline

Rate to use for stream.

Parameters
[in]fpsRateRate to use

◆ GetFpsRate()

unsigned int GetFpsRate ( ) const
inline

To get with SetFpsRate changed values.

◆ SetHeight()

void SetHeight ( unsigned int  height)
inline

Height of the stream reported by the demuxer.

Parameters
[in]heightHeight to use

◆ GetHeight()

unsigned int GetHeight ( ) const
inline

To get with SetHeight changed values.

◆ SetWidth()

void SetWidth ( unsigned int  width)
inline

Width of the stream reported by the demuxer.

Parameters
[in]widthWidth to use

◆ GetWidth()

unsigned int GetWidth ( ) const
inline

To get with SetWidth changed values.

◆ SetAspect()

void SetAspect ( float  aspect)
inline

Display aspect of stream.

Parameters
[in]aspectAspect ratio to use

◆ GetAspect()

float GetAspect ( ) const
inline

To get with SetAspect changed values.

◆ SetChannels()

void SetChannels ( unsigned int  channels)
inline

(required) Amount of channels.

Parameters
[in]sampleRateChannels to use

◆ GetChannels()

unsigned int GetChannels ( ) const
inline

To get with SetChannels changed values.

◆ SetSampleRate()

void SetSampleRate ( unsigned int  sampleRate)
inline

(required) Sample rate.

Parameters
[in]sampleRateRate to use

◆ GetSampleRate()

unsigned int GetSampleRate ( ) const
inline

To get with SetSampleRate changed values.

◆ SetBitRate()

void SetBitRate ( unsigned int  bitRate)
inline

Bit rate.

Parameters
[in]bitRateRate to use

◆ GetBitRate()

unsigned int GetBitRate ( ) const
inline

To get with SetBitRate changed values.

◆ SetBitsPerSample()

void SetBitsPerSample ( unsigned int  bitsPerSample)
inline

(required) Bits per sample.

Parameters
[in]bitsPerSampleBits per sample to use

◆ GetBitsPerSample()

unsigned int GetBitsPerSample ( ) const
inline

To get with SetBitsPerSample changed values.

◆ SetBlockAlign()

void SetBlockAlign ( unsigned int  blockAlign)
inline

To set the necessary stream block alignment size.

Parameters
[in]blockAlignBlock size in byte

◆ GetBlockAlign()

unsigned int GetBlockAlign ( ) const
inline

To get with SetBlockAlign changed values.

◆ SetCryptoSession()

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

To set stream crypto session informations.

Parameters
[in]cryptoSessionThe with cpp_kodi_addon_inputstream_Defs_Interface_StreamCryptoSession setable info

◆ GetCryptoSession()

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

To get with GetCryptoSession changed values.

◆ SetCodecFourCC()

void SetCodecFourCC ( unsigned int  codecFourCC)
inline

Codec If available, the fourcc code codec.

Parameters
[in]codecFourCCCodec four CC code

◆ GetCodecFourCC()

unsigned int GetCodecFourCC ( ) const
inline

To get with SetCodecFourCC changed values.

◆ SetColorSpace()

void SetColorSpace ( INPUTSTREAM_COLORSPACE  colorSpace)
inline

Definition of colorspace.

Parameters
[in]colorSpaceThe with INPUTSTREAM_COLORSPACE setable color space

◆ GetColorSpace()

INPUTSTREAM_COLORSPACE GetColorSpace ( ) const
inline

To get with SetColorSpace changed values.

◆ SetColorRange()

void SetColorRange ( INPUTSTREAM_COLORRANGE  colorRange)
inline

Color range if available.

Parameters
[in]colorRangeThe with INPUTSTREAM_COLORRANGE setable color space

◆ GetColorRange()

INPUTSTREAM_COLORRANGE GetColorRange ( ) const
inline

To get with SetColorRange changed values.

◆ SetColorPrimaries()

void 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

◆ GetColorPrimaries()

INPUTSTREAM_COLORPRIMARIES GetColorPrimaries ( ) const
inline

To get with SetColorPrimaries changed values.

◆ SetColorTransferCharacteristic()

void 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

◆ GetColorTransferCharacteristic()

INPUTSTREAM_COLORTRC GetColorTransferCharacteristic ( ) const
inline

To get with SetColorTransferCharacteristic changed values.

◆ SetMasteringMetadata()

void 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

◆ GetMasteringMetadata()

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

To get with SetMasteringMetadata changed values.

◆ ClearMasteringMetadata()

void ClearMasteringMetadata ( )
inline

Clear mastering static Metadata.

◆ SetContentLightMetadata()

void 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

◆ GetContentLightMetadata()

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

To get with SetContentLightMetadata changed values.

◆ ClearContentLightMetadata()

void ClearContentLightMetadata ( )
inline

Clear content light static Metadata.