docs/doc/reference/com/google/android/exoplayer2/decoder/Buffer.html
Package com.google.android.exoplayer2.decoder
Direct Known Subclasses:DecoderInputBuffer, DecoderOutputBuffer
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public abstract classBufferextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
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.
Constructors | Constructor | Description |
| --- | --- |
| Buffer() |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | addFlag(@com.google.android.exoplayer2.C.BufferFlags int flag) |
Deprecated.
Adds the flag to this buffer's flags.
|
| void | clear() |
Deprecated.
Clears the buffer.
|
| void | clearFlag(@com.google.android.exoplayer2.C.BufferFlags int flag) |
Deprecated.
Removes the flag from this buffer's flags, if it is set.
|
| protected boolean | getFlag(@com.google.android.exoplayer2.C.BufferFlags int flag) |
Deprecated.
Returns whether the specified flag has been set on this buffer.
|
| boolean | hasSupplementalData() |
Deprecated.
Returns whether the C.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA flag is set.
|
| boolean | isDecodeOnly() |
Deprecated.
Returns whether the C.BUFFER_FLAG_DECODE_ONLY flag is set.
|
| boolean | isEndOfStream() |
Deprecated.
Returns whether the C.BUFFER_FLAG_END_OF_STREAM flag is set.
|
| boolean | isFirstSample() |
Deprecated.
Returns whether the C.BUFFER_FLAG_FIRST_SAMPLE flag is set.
|
| boolean | isKeyFrame() |
Deprecated.
Returns whether the C.BUFFER_FLAG_KEY_FRAME flag is set.
|
| boolean | isLastSample() |
Deprecated.
Returns whether the C.BUFFER_FLAG_LAST_SAMPLE flag is set.
|
| void | setFlags(@com.google.android.exoplayer2.C.BufferFlags int flags) |
Deprecated.
Replaces this buffer's flags with flags.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public Buffer()
Deprecated.
-
public void clear()
Deprecated.
Clears the buffer.
-
public final boolean isDecodeOnly()
Deprecated.
Returns whether the C.BUFFER_FLAG_DECODE_ONLY flag is set.
-
public final boolean isFirstSample()
Deprecated.
Returns whether the C.BUFFER_FLAG_FIRST_SAMPLE flag is set.
-
public final boolean isEndOfStream()
Deprecated.
Returns whether the C.BUFFER_FLAG_END_OF_STREAM flag is set.
-
public final boolean isKeyFrame()
Deprecated.
Returns whether the C.BUFFER_FLAG_KEY_FRAME flag is set.
-
public final boolean isLastSample()
Deprecated.
Returns whether the C.BUFFER_FLAG_LAST_SAMPLE flag is set.
-
public final boolean hasSupplementalData()
Deprecated.
Returns whether the C.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA flag is set.
-
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.
-
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.
-
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.
-
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.