MdtaMetadataEntry


@UnstableApi
public final class MdtaMetadataEntry implements Metadata.Entry


Stores extensible metadata with handler type 'mdta'. See also the QuickTime File Format Specification.

Summary

Constants

static final byte

The auxiliary tracks samples are interleaved in the primary video track’s mdat box.

static final byte

The auxiliary tracks samples are not interleaved and are in the axte.mdat box.

static final int

The default locale indicator which implies all speakers in all countries.

static final String
KEY_ANDROID_CAPTURE_FPS = "com.android.capture.fps"

Key for the capture frame rate (in frames per second).

static final String
KEY_AUXILIARY_TRACKS_INTERLEAVED = "auxiliary.tracks.interleaved"

Key for whether auxiliary tracks samples are interleaved.

static final String
KEY_AUXILIARY_TRACKS_LENGTH = "auxiliary.tracks.length"

Key for auxiliary tracks extension box (axte) length.

static final String
KEY_AUXILIARY_TRACKS_MAP = "auxiliary.tracks.map"

Key for auxiliary tracks map.

static final String
KEY_AUXILIARY_TRACKS_OFFSET = "auxiliary.tracks.offset"

Key for auxiliary tracks extension box (axte) offset.

static final int

The type indicator for an 8-bit unsigned integer.

static final int

The type indicator for Float32.

static final int

The type indicator for 32-bit signed integer.

static final int

The type indicator to use when no type needs to be indicated.

static final int

The type indicator for UTF-8 string.

static final int

The type indicator for 64-bit unsigned integer.

Public fields

final String

The metadata key name.

final int

The four byte locale indicator.

final int

The four byte type indicator.

final byte[]

The payload.

Public constructors

MdtaMetadataEntry(String key, byte[] value, int typeIndicator)

Creates a new metadata entry for the specified metadata key/value with default locale indicator.

MdtaMetadataEntry(
    String key,
    byte[] value,
    int localeIndicator,
    int typeIndicator
)

Creates a new metadata entry for the specified metadata key/value.

Public methods

boolean
List<Integer>

Returns the auxiliary track types from the auxiliary tracks map metadata.

int
String

Inherited methods

From androidx.media3.common.Metadata.Entry
@Nullable byte[]

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.

@Nullable Format

Returns the Format that can be used to decode the wrapped metadata in getWrappedMetadataBytes, or null if this Entry doesn't contain wrapped metadata.

void

Updates the MediaMetadata.Builder with the type-specific values stored in this Entry.

Constants

AUXILIARY_TRACKS_SAMPLES_INTERLEAVED

public static final byte AUXILIARY_TRACKS_SAMPLES_INTERLEAVED = 1

The auxiliary tracks samples are interleaved in the primary video track’s mdat box.

AUXILIARY_TRACKS_SAMPLES_NOT_INTERLEAVED

public static final byte AUXILIARY_TRACKS_SAMPLES_NOT_INTERLEAVED = 0

The auxiliary tracks samples are not interleaved and are in the axte.mdat box.

DEFAULT_LOCALE_INDICATOR

public static final int DEFAULT_LOCALE_INDICATOR = 0

The default locale indicator which implies all speakers in all countries.

KEY_ANDROID_CAPTURE_FPS

public static final String KEY_ANDROID_CAPTURE_FPS = "com.android.capture.fps"

Key for the capture frame rate (in frames per second).

KEY_AUXILIARY_TRACKS_INTERLEAVED

public static final String KEY_AUXILIARY_TRACKS_INTERLEAVED = "auxiliary.tracks.interleaved"

Key for whether auxiliary tracks samples are interleaved.

KEY_AUXILIARY_TRACKS_LENGTH

public static final String KEY_AUXILIARY_TRACKS_LENGTH = "auxiliary.tracks.length"

Key for auxiliary tracks extension box (axte) length.

KEY_AUXILIARY_TRACKS_MAP

public static final String KEY_AUXILIARY_TRACKS_MAP = "auxiliary.tracks.map"

Key for auxiliary tracks map.

KEY_AUXILIARY_TRACKS_OFFSET

public static final String KEY_AUXILIARY_TRACKS_OFFSET = "auxiliary.tracks.offset"

Key for auxiliary tracks extension box (axte) offset.

TYPE_INDICATOR_8_BIT_UNSIGNED_INT

public static final int TYPE_INDICATOR_8_BIT_UNSIGNED_INT = 75

The type indicator for an 8-bit unsigned integer.

TYPE_INDICATOR_FLOAT32

public static final int TYPE_INDICATOR_FLOAT32 = 23

The type indicator for Float32.

TYPE_INDICATOR_INT32

public static final int TYPE_INDICATOR_INT32 = 67

The type indicator for 32-bit signed integer.

TYPE_INDICATOR_RESERVED

public static final int TYPE_INDICATOR_RESERVED = 0

The type indicator to use when no type needs to be indicated.

TYPE_INDICATOR_STRING

public static final int TYPE_INDICATOR_STRING = 1

The type indicator for UTF-8 string.

TYPE_INDICATOR_UNSIGNED_INT64

public static final int TYPE_INDICATOR_UNSIGNED_INT64 = 78

The type indicator for 64-bit unsigned integer.

Public fields

key

public final String key

The metadata key name.

localeIndicator

public final int localeIndicator

The four byte locale indicator.

typeIndicator

public final int typeIndicator

The four byte type indicator.

value

public final byte[] value

The payload. The interpretation of the value depends on typeIndicator.

Public constructors

MdtaMetadataEntry

public MdtaMetadataEntry(String key, byte[] value, int typeIndicator)

Creates a new metadata entry for the specified metadata key/value with default locale indicator.

MdtaMetadataEntry

public MdtaMetadataEntry(
    String key,
    byte[] value,
    int localeIndicator,
    int typeIndicator
)

Creates a new metadata entry for the specified metadata key/value.

Public methods

equals

public boolean equals(@Nullable Object obj)

getAuxiliaryTrackTypesFromMap

public List<IntegergetAuxiliaryTrackTypesFromMap()

Returns the auxiliary track types from the auxiliary tracks map metadata.

hashCode

public int hashCode()

toString

public String toString()