Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

Demux packet
To processed codec and demux inputstream stream.

This part is in the "C" style in order to have better performance and possibly to be used in "C" libraries.

The structure should be created with kodi::addon::CInstanceInputStream::AllocateDemuxPacket() or kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket() and if not added to Kodi with kodi::addon::CInstanceInputStream::FreeDemuxPacket() be deleted again.

Packages that have been given to Kodi and processed will then be deleted by him.


Class Documentation

◆ DEMUX_PACKET

struct DEMUX_PACKET
Class Members
uint8_t * pData Stream package which is given for decoding.
Note
Associated storage from here is created using kodi::addon::CInstanceInputStream::AllocateDemuxPacket() or kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket().
int iSize Size of the package given at pData.
int iStreamId Identification of the stream.
int64_t demuxerId Identification of the associated demuxer, this can be identical on several streams.
int iGroupId The group this data belongs to, used to group data from different streams together.
void * pSideData Additional packet data that can be provided by the container.

Packet can contain several types of side information.

This is usually based on that of ffmpeg, see AVPacketSideData.

int iSideDataElems Data elements stored at pSideData.
double pts Presentation time stamp (PTS).
double dts Decoding time stamp (DTS).
double duration Duration in STREAM_TIME_BASE if available.
int dispTime Display time from input stream.
bool recoveryPoint To show that this package allows recreating the presentation by mistake.
struct DEMUX_CRYPTO_INFO * cryptoInfo Optional data to allow decryption at processing site if necessary.

This can be created using kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket(), otherwise this is declared as nullptr.

See DEMUX_CRYPTO_INFO for their style.