SimpleMetadataDecoder


@UnstableApi
abstract class SimpleMetadataDecoder : MetadataDecoder

Known direct subclasses
AppInfoTableDecoder

Decoder for the DVB Application Information Table (AIT).

EventMessageDecoder

Decodes data encoded by EventMessageEncoder.

IcyDecoder

Decodes ICY stream information.

Id3Decoder

Decodes ID3 tags.

SpliceInfoDecoder

Decodes splice info sections and produces splice commands.


A MetadataDecoder base class that validates input buffers.

Summary

Public constructors

Public functions

Metadata?
decode(inputBuffer: MetadataInputBuffer!)

Decodes a Metadata element from the provided input buffer.

Protected functions

abstract Metadata?
decode(inputBuffer: MetadataInputBuffer!, buffer: ByteBuffer!)

Called by decode after input buffer validation has been performed.

Public constructors

SimpleMetadataDecoder

SimpleMetadataDecoder()

Public functions

decode

fun decode(inputBuffer: MetadataInputBuffer!): Metadata?

Decodes a Metadata element from the provided input buffer.

Respects limit of inputBuffer.data, but assumes position and arrayOffset are both zero and hasArray is true.

Parameters
inputBuffer: MetadataInputBuffer!

The input buffer to decode.

Returns
Metadata?

The decoded metadata object, or null if the metadata could not be decoded.

Protected functions

decode

protected abstract fun decode(inputBuffer: MetadataInputBuffer!, buffer: ByteBuffer!): Metadata?

Called by decode after input buffer validation has been performed.

Parameters
inputBuffer: MetadataInputBuffer!

The input buffer to decode.

buffer: ByteBuffer!

The input buffer's data buffer, for convenience. Validation by decode guarantees that hasArray, position and arrayOffset are true, 0 and 0 respectively.

Returns
Metadata?

The decoded metadata object, or null if the metadata could not be decoded.