Class Buffer
- java.lang.Object
-
- com.google.android.exoplayer2.decoder.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 Summary
Constructors Constructor Description Buffer()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddFlag(@com.google.android.exoplayer2.C.BufferFlags int flag)Deprecated.Adds theflagto this buffer's flags.voidclear()Deprecated.Clears the buffer.voidclearFlag(@com.google.android.exoplayer2.C.BufferFlags int flag)Deprecated.Removes theflagfrom this buffer's flags, if it is set.protected booleangetFlag(@com.google.android.exoplayer2.C.BufferFlags int flag)Deprecated.Returns whether the specified flag has been set on this buffer.booleanhasSupplementalData()Deprecated.Returns whether theC.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATAflag is set.booleanisDecodeOnly()Deprecated.Returns whether theC.BUFFER_FLAG_DECODE_ONLYflag is set.booleanisEndOfStream()Deprecated.Returns whether theC.BUFFER_FLAG_END_OF_STREAMflag is set.booleanisFirstSample()Deprecated.Returns whether theC.BUFFER_FLAG_FIRST_SAMPLEflag is set.booleanisKeyFrame()Deprecated.Returns whether theC.BUFFER_FLAG_KEY_FRAMEflag is set.booleanisLastSample()Deprecated.Returns whether theC.BUFFER_FLAG_LAST_SAMPLEflag is set.voidsetFlags(@com.google.android.exoplayer2.C.BufferFlags int flags)Deprecated.Replaces this buffer's flags withflags.
-
-
-
Method Detail
-
clear
public void clear()
Deprecated.Clears the buffer.
-
isDecodeOnly
public final boolean isDecodeOnly()
Deprecated.Returns whether theC.BUFFER_FLAG_DECODE_ONLYflag is set.
-
isFirstSample
public final boolean isFirstSample()
Deprecated.Returns whether theC.BUFFER_FLAG_FIRST_SAMPLEflag is set.
-
isEndOfStream
public final boolean isEndOfStream()
Deprecated.Returns whether theC.BUFFER_FLAG_END_OF_STREAMflag is set.
-
isKeyFrame
public final boolean isKeyFrame()
Deprecated.Returns whether theC.BUFFER_FLAG_KEY_FRAMEflag is set.
-
isLastSample
public final boolean isLastSample()
Deprecated.Returns whether theC.BUFFER_FLAG_LAST_SAMPLEflag is set.
-
hasSupplementalData
public final boolean hasSupplementalData()
Deprecated.Returns whether theC.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATAflag is set.
-
setFlags
public final void setFlags(@com.google.android.exoplayer2.C.BufferFlags int flags)
Deprecated.Replaces this buffer's flags withflags.- Parameters:
flags- The flags to set, which should be a combination of theC.BUFFER_FLAG_*constants.
-
addFlag
public final void addFlag(@com.google.android.exoplayer2.C.BufferFlags int flag)
Deprecated.Adds theflagto this buffer's flags.- Parameters:
flag- The flag to add to this buffer's flags, which should be one of theC.BUFFER_FLAG_*constants.
-
clearFlag
public final void clearFlag(@com.google.android.exoplayer2.C.BufferFlags int flag)
Deprecated.Removes theflagfrom 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.
-
-