Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Read demux streams. More...
Functions | |
virtual bool | kodi::addon::CInstanceInputStream::GetStreamIds (std::vector< unsigned int > &ids) |
Get IDs of available streams. | |
virtual bool | kodi::addon::CInstanceInputStream::GetStream (int streamid, kodi::addon::InputstreamInfo &stream) |
Function for giving detailed stream information. | |
virtual void | kodi::addon::CInstanceInputStream::EnableStream (int streamid, bool enable) |
Enable or disable a stream. | |
virtual bool | kodi::addon::CInstanceInputStream::OpenStream (int streamid) |
Opens a stream for playback. | |
virtual void | kodi::addon::CInstanceInputStream::DemuxReset () |
Reset the demultiplexer in the add-on. | |
virtual void | kodi::addon::CInstanceInputStream::DemuxAbort () |
Abort the demultiplexer thread in the add-on. | |
virtual void | kodi::addon::CInstanceInputStream::DemuxFlush () |
Flush all data that's currently in the demultiplexer buffer in the add-on. | |
virtual DEMUX_PACKET * | kodi::addon::CInstanceInputStream::DemuxRead () |
Read the next packet from the demultiplexer, if there is one. | |
virtual bool | kodi::addon::CInstanceInputStream::DemuxSeekTime (double time, bool backwards, double &startpts) |
Notify the InputStream addon/demuxer that Kodi wishes to seek the stream by time. | |
virtual void | kodi::addon::CInstanceInputStream::DemuxSetSpeed (int speed) |
Notify the InputStream addon/demuxer that Kodi wishes to change playback speed. | |
virtual void | kodi::addon::CInstanceInputStream::SetVideoResolution (unsigned int width, unsigned int height) |
Notify current screen resolution. | |
virtual void | kodi::addon::CInstanceInputStream::SetVideoResolution (unsigned int width, unsigned int height, unsigned int maxWidth, unsigned int maxHeight) |
Notify current screen resolution and max screen resolution allowed. | |
DEMUX_PACKET * | kodi::addon::CInstanceInputStream::AllocateDemuxPacket (int dataSize) |
Allocate a demux packet. Free with FreeDemuxPacket. | |
DEMUX_PACKET * | kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket (int dataSize, unsigned int encryptedSubsampleCount) |
Allocate a encrypted demux packet. Free with FreeDemuxPacket. | |
void | kodi::addon::CInstanceInputStream::FreeDemuxPacket (DEMUX_PACKET *packet) |
Free a packet that was allocated with AllocateDemuxPacket. | |
Read demux streams.
|
inline |
Allocate a demux packet. Free with FreeDemuxPacket.
[in] | dataSize | The size of the data that will go into the packet |
|
inline |
Allocate a encrypted demux packet. Free with FreeDemuxPacket.
[in] | dataSize | The size of the data that will go into the packet |
[in] | encryptedSubsampleCount | The encrypted subsample count |
|
inlinevirtual |
Abort the demultiplexer thread in the add-on.
|
inlinevirtual |
Flush all data that's currently in the demultiplexer buffer in the add-on.
|
inlinevirtual |
Read the next packet from the demultiplexer, if there is one.
nullptr
if an error occurred.nullptr
if this add-on won't provide this function.
|
inlinevirtual |
Reset the demultiplexer in the add-on.
|
inlinevirtual |
Notify the InputStream addon/demuxer that Kodi wishes to seek the stream by time.
Demuxer is required to set stream to an IDR frame
[in] | time | The absolute time since stream start |
[in] | backwards | True to seek to keyframe BEFORE time, else AFTER |
[in] | startpts | can be updated to point to where display should start |
Notify the InputStream addon/demuxer that Kodi wishes to change playback speed.
[in] | speed | The requested playback speed |
|
inlinevirtual |
Enable or disable a stream.
A disabled stream does not send demux packets
[in] | streamid | unique id of stream |
[in] | enable | true for enable, false for disable |
|
inline |
Free a packet that was allocated with AllocateDemuxPacket.
[in] | packet | The packet to free |
|
inlinevirtual |
Function for giving detailed stream information.
The associated information is set here for IDs previously given with GetStreamIds.
This data is required to identify the associated codec and, if necessary, to refer to your own codec (if available in the addon).
[in] | streamid | unique id of stream |
[out] | stream | Information data of wanted stream |
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 |
Example:
|
inlinevirtual |
Get IDs of available streams.
[in] | ids | list of used identifications |
Example:
Opens a stream for playback.
[in] | streamid | unique id of stream |
|
inlinevirtual |
Notify current screen resolution.
[in] | width | Width to set |
[in] | height | Height to set |
|
inlinevirtual |
Notify current screen resolution and max screen resolution allowed.
[in] | width | Width to set |
[in] | height | Height to set |
[in] | maxWidth | Max width allowed |
[in] | maxHeight | Max height allowed |