Buffer
@UnstableApi
public abstract class Buffer
DecoderInputBuffer |
Holds input for a decoder. |
DecoderOutputBuffer |
Output buffer decoded by a |
ImageOutputBuffer |
Output buffer for |
MetadataInputBuffer |
A |
SimpleDecoderOutputBuffer |
Buffer for |
SubtitleInputBuffer |
A |
SubtitleOutputBuffer |
Base class for |
VideoDecoderOutputBuffer |
Video decoder output buffer containing video frame data. |
Base class for buffers with flags.
Summary
Public constructors |
|---|
Buffer() |
Public methods |
|
|---|---|
final void |
addFlag(@C.BufferFlags int flag)Adds the |
void |
Clears the buffer. |
final void |
clearFlag(@C.BufferFlags int flag)Removes the |
final boolean |
Returns whether the |
final boolean |
Returns whether the |
final boolean |
Returns whether the |
final boolean |
Returns whether the |
final boolean |
Returns whether the |
final boolean |
Returns whether the |
final void |
setFlags(@C.BufferFlags int flags)Replaces this buffer's flags with |
Protected methods |
|
|---|---|
final boolean |
getFlag(@C.BufferFlags int flag)Returns whether the specified flag has been set on this buffer. |
Public constructors
Public methods
addFlag
public final void addFlag(@C.BufferFlags int flag)
Adds the flag to this buffer's flags.
| Parameters | |
|---|---|
@C.BufferFlags int flag |
The flag to add to this buffer's flags, which should be one of the |
clearFlag
public final void clearFlag(@C.BufferFlags int flag)
Removes the flag from this buffer's flags, if it is set.
| Parameters | |
|---|---|
@C.BufferFlags int flag |
The flag to remove. |
hasSupplementalData
public final boolean hasSupplementalData()
Returns whether the BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA flag is set.
isEndOfStream
public final boolean isEndOfStream()
Returns whether the BUFFER_FLAG_END_OF_STREAM flag is set.
If this is set, all other attributes of the buffer should be ignored.
isFirstSample
public final boolean isFirstSample()
Returns whether the BUFFER_FLAG_FIRST_SAMPLE flag is set.
isLastSample
public final boolean isLastSample()
Returns whether the BUFFER_FLAG_LAST_SAMPLE flag is set.
notDependedOn
public final boolean notDependedOn()
Returns whether the BUFFER_FLAG_NOT_DEPENDED_ON flag is set.
setFlags
public final void setFlags(@C.BufferFlags int flags)
Replaces this buffer's flags with flags.
| Parameters | |
|---|---|
@C.BufferFlags int flags |
The flags to set, which should be a combination of the |
Protected methods
getFlag
protected final boolean getFlag(@C.BufferFlags int flag)
Returns whether the specified flag has been set on this buffer.
| Parameters | |
|---|---|
@C.BufferFlags int flag |
The flag to check. |
| Returns | |
|---|---|
boolean |
Whether the flag is set. |