SimpleMetadataDecoder


@UnstableApi
public abstract class SimpleMetadataDecoder implements 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 methods

final @Nullable Metadata

Decodes a Metadata element from the provided input buffer.

Protected methods

abstract @Nullable Metadata
decode(MetadataInputBuffer inputBuffer, ByteBuffer buffer)

Called by decode after input buffer validation has been performed.

Public constructors

SimpleMetadataDecoder

public SimpleMetadataDecoder()

Public methods

decode

public final @Nullable Metadata decode(MetadataInputBuffer inputBuffer)

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
MetadataInputBuffer inputBuffer

The input buffer to decode.

Returns
@Nullable Metadata

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

Protected methods

decode

protected abstract @Nullable Metadata decode(MetadataInputBuffer inputBuffer, ByteBuffer buffer)

Called by decode after input buffer validation has been performed.

Parameters
MetadataInputBuffer inputBuffer

The input buffer to decode.

ByteBuffer buffer

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

Returns
@Nullable Metadata

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