Back to Exoplayer

Metadata (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/metadata/Metadata.html

latest8.4 KB
Original Source

Package com.google.android.exoplayer2.metadata

Class Metadata

  • java.lang.Object

    • com.google.android.exoplayer2.metadata.Metadata
  • All Implemented Interfaces:Parcelable


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classMetadataextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Parcelable](https://developer.android.com/reference/android/os/Parcelable.html "class or interface in android.os")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

A collection of metadata entries.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static interface | Metadata.Entry | Deprecated.

A metadata entry. |

- 

Nested classes/interfaces inherited from interface android.os.Parcelable

Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static Parcelable.Creator<Metadata> | CREATOR | Deprecated. | | long | presentationTimeUs | Deprecated.

The presentation time of the metadata, in microseconds. |

- 

Fields inherited from interface android.os.Parcelable

CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Metadata​(long presentationTimeUs, Metadata.Entry... entries) | Deprecated. | | Metadata​(long presentationTimeUs, List<? extends Metadata.Entry> entries) | Deprecated. | | Metadata​(Metadata.Entry... entries) | Deprecated. | | Metadata​(List<? extends Metadata.Entry> entries) | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | Metadata | copyWithAppendedEntries​(Metadata.Entry... entriesToAppend) | Deprecated.

Returns a copy of this metadata with the specified entries appended. | | Metadata | copyWithAppendedEntriesFrom​(Metadata other) | Deprecated.

Returns a copy of this metadata with the entries of the specified metadata appended. | | Metadata | copyWithPresentationTimeUs​(long presentationTimeUs) | Deprecated.

Returns a copy of this metadata with the specified presentation time. | | int | describeContents() | Deprecated. | | boolean | equals​(Object obj) | Deprecated. | | Metadata.Entry | get​(int index) | Deprecated.

Returns the entry at the specified index. | | int | hashCode() | Deprecated. | | int | length() | Deprecated.

Returns the number of metadata entries. | | String | toString() | Deprecated. | | void | writeToParcel​(Parcel dest, int flags) | Deprecated. |

- 

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

- 

presentationTimeUs

public final long presentationTimeUs

Deprecated.

The presentation time of the metadata, in microseconds.

This time is an offset from the start of the current Timeline.Period.

This time is C.TIME_UNSET when not known or undefined.

- 

CREATOR

public static final[Parcelable.Creator](https://developer.android.com/reference/android/os/Parcelable.Creator.html "class or interface in android.os")<[Metadata](Metadata.html "class in com.google.android.exoplayer2.metadata")> CREATOR

Deprecated.

Constructor Detail

- 

Metadata

public Metadata​([Metadata.Entry](Metadata.Entry.html "interface in com.google.android.exoplayer2.metadata")... entries)

Deprecated. Parameters:entries - The metadata entries.

- 

Metadata

public Metadata​(long presentationTimeUs,[Metadata.Entry](Metadata.Entry.html "interface in com.google.android.exoplayer2.metadata")... entries)

Deprecated. Parameters:presentationTimeUs - The presentation time for the metadata entries.entries - The metadata entries.

- 

Metadata

public Metadata​([List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<? extends[Metadata.Entry](Metadata.Entry.html "interface in com.google.android.exoplayer2.metadata")> entries)

Deprecated. Parameters:entries - The metadata entries.

- 

Metadata

public Metadata​(long presentationTimeUs,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<? extends[Metadata.Entry](Metadata.Entry.html "interface in com.google.android.exoplayer2.metadata")> entries)

Deprecated. Parameters:presentationTimeUs - The presentation time for the metadata entries.entries - The metadata entries.

Method Detail

- 

length

public int length()

Deprecated.

Returns the number of metadata entries.

- 

get

public[Metadata.Entry](Metadata.Entry.html "interface in com.google.android.exoplayer2.metadata")get​(int index)

Deprecated.

Returns the entry at the specified index. Parameters:index - The index of the entry.Returns:The entry at the specified index.

- 

copyWithAppendedEntriesFrom

public[Metadata](Metadata.html "class in com.google.android.exoplayer2.metadata")copyWithAppendedEntriesFrom​(@Nullable[Metadata](Metadata.html "class in com.google.android.exoplayer2.metadata")other)

Deprecated.

Returns a copy of this metadata with the entries of the specified metadata appended. Returns this instance if other is null. Parameters:other - The metadata that holds the entries to append. If null, this methods returns this instance.Returns:The metadata instance with the appended entries.

- 

copyWithAppendedEntries

public[Metadata](Metadata.html "class in com.google.android.exoplayer2.metadata")copyWithAppendedEntries​([Metadata.Entry](Metadata.Entry.html "interface in com.google.android.exoplayer2.metadata")... entriesToAppend)

Deprecated.

Returns a copy of this metadata with the specified entries appended. Parameters:entriesToAppend - The entries to append.Returns:The metadata instance with the appended entries.

- 

copyWithPresentationTimeUs

public[Metadata](Metadata.html "class in com.google.android.exoplayer2.metadata")copyWithPresentationTimeUs​(long presentationTimeUs)

Deprecated.

Returns a copy of this metadata with the specified presentation time. Parameters:presentationTimeUs - The new presentation time, in microseconds.Returns:The metadata instance with the new presentation time.

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)

Deprecated. Overrides:equals in class Object

- 

hashCode

public int hashCode()

Deprecated. Overrides:hashCode in class Object

- 

toString

public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")toString()

Deprecated. Overrides:toString in class Object

- 

describeContents

public int describeContents()

Deprecated. Specified by:describeContents in interface Parcelable

- 

writeToParcel

public void writeToParcel​([Parcel](https://developer.android.com/reference/android/os/Parcel.html "class or interface in android.os")dest,
                          int flags)

Deprecated. Specified by:writeToParcel in interface Parcelable