Class Metadata
- java.lang.Object
-
- com.google.android.exoplayer2.metadata.Metadata
-
- All Implemented Interfaces:
Parcelable
@Deprecated public final class Metadata extends Object implements Parcelable
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.
-
-
-
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<Metadata> CREATOR
Deprecated.
-
-
Constructor Detail
-
Metadata
public Metadata(Metadata.Entry... entries)
Deprecated.- Parameters:
entries
- The metadata entries.
-
Metadata
public Metadata(long presentationTimeUs, Metadata.Entry... entries)
Deprecated.- Parameters:
presentationTimeUs
- The presentation time for the metadata entries.entries
- The metadata entries.
-
Metadata
public Metadata(List<? extends Metadata.Entry> entries)
Deprecated.- Parameters:
entries
- The metadata entries.
-
Metadata
public Metadata(long presentationTimeUs, List<? extends Metadata.Entry> 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 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 copyWithAppendedEntriesFrom(@Nullable Metadata other)
Deprecated.Returns a copy of this metadata with the entries of the specified metadata appended. Returns this instance ifother
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 copyWithAppendedEntries(Metadata.Entry... 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 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.
-
describeContents
public int describeContents()
Deprecated.- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
Deprecated.- Specified by:
writeToParcel
in interfaceParcelable
-
-