Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Class: kodi::addon::CInstanceAudioEncoder
Functions | |
kodi::addon::CInstanceAudioEncoder::CInstanceAudioEncoder (const kodi::addon::IInstanceInfo &instance) | |
Audio encoder class constructor used to support multiple instances. | |
virtual bool | kodi::addon::CInstanceAudioEncoder::Start (const kodi::addon::AudioEncoderInfoTag &tag)=0 |
Start encoder (required) | |
virtual ssize_t | kodi::addon::CInstanceAudioEncoder::Encode (const uint8_t *pbtStream, size_t numBytesRead)=0 |
Encode a chunk of audio (required) | |
virtual bool | kodi::addon::CInstanceAudioEncoder::Finish () |
Finalize encoding (optional) | |
ssize_t | kodi::addon::CInstanceAudioEncoder::Write (const uint8_t *data, size_t length) |
Write block of data. | |
ssize_t | kodi::addon::CInstanceAudioEncoder::Seek (ssize_t position, int whence=SEEK_SET) |
Set the file's current position. | |
Class: kodi::addon::CInstanceAudioEncoder
The addon.xml defines the capabilities of this add-on.
Here's an example on addon.xml:
Description to audio encoder related addon.xml values:
Name | Description |
---|---|
point | Addon type specification At all addon types and for this kind always "kodi.audioencoder". |
library_@PLATFORM@ | Sets the used library name, which is automatically set by cmake at addon build. |
extension | The file extensions / styles supported by this addon. |
Here is a code example how this addon is used:
The destruction of the example class CMyAudioEncoder
is called from Kodi's header. Manually deleting the add-on instance is not required.
|
inlineexplicit |
Audio encoder class constructor used to support multiple instances.
[in] | instance | The instance value given to kodi::addon::CAddonBase::CreateInstance(...) . |
Here's example about the use of this:
|
pure virtual |
Encode a chunk of audio (required)
[in] | pbtStream | The input buffer |
[in] | numBytesRead | Number of bytes in input buffer |
|
inlinevirtual |
Finalize encoding (optional)
Set the file's current position.
The whence argument is optional and defaults to SEEK_SET (0)
[in] | position | The position that you want to seek to | ||||||||||||
[in] | whence | [optional] offset relative to You can set the value of whence to one of three things:
|
|
pure virtual |
Start encoder (required)
[in] | tag | Information tag about |
Write block of data.
[in] | data | Pointer to the array of elements to be written |
[in] | length | Size in bytes to be written. |