Class 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.
    • 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.

    • 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 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 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.
      • equals

        public boolean equals​(@Nullable
                              Object obj)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object