Class Buffer

  • Direct Known Subclasses:
    DecoderInputBuffer, DecoderOutputBuffer

    @Deprecated
    public abstract class Buffer
    extends Object
    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.
    Base class for buffers with flags.
    • Constructor Detail

      • Buffer

        public Buffer()
        Deprecated.
    • Method Detail

      • clear

        public void clear()
        Deprecated.
        Clears the buffer.
      • isKeyFrame

        public final boolean isKeyFrame()
        Deprecated.
        Returns whether the C.BUFFER_FLAG_KEY_FRAME flag is set.
      • setFlags

        public final void setFlags​(@com.google.android.exoplayer2.C.BufferFlags int flags)
        Deprecated.
        Replaces this buffer's flags with flags.
        Parameters:
        flags - The flags to set, which should be a combination of the C.BUFFER_FLAG_* constants.
      • addFlag

        public final void addFlag​(@com.google.android.exoplayer2.C.BufferFlags int flag)
        Deprecated.
        Adds the flag to this buffer's flags.
        Parameters:
        flag - The flag to add to this buffer's flags, which should be one of the C.BUFFER_FLAG_* constants.
      • clearFlag

        public final void clearFlag​(@com.google.android.exoplayer2.C.BufferFlags int flag)
        Deprecated.
        Removes the flag from this buffer's flags, if it is set.
        Parameters:
        flag - The flag to remove.
      • getFlag

        protected final boolean getFlag​(@com.google.android.exoplayer2.C.BufferFlags int flag)
        Deprecated.
        Returns whether the specified flag has been set on this buffer.
        Parameters:
        flag - The flag to check.
        Returns:
        Whether the flag is set.