SimpleDecoderOutputBuffer
@UnstableApi
public class SimpleDecoderOutputBuffer extends DecoderOutputBuffer
| java.lang.Object | |||
| ↳ | androidx.media3.decoder.Buffer | ||
| ↳ | androidx.media3.decoder.DecoderOutputBuffer | ||
| ↳ | androidx.media3.decoder.SimpleDecoderOutputBuffer |
Buffer for SimpleDecoder output.
Summary
Public fields |
|
|---|---|
@Nullable ByteBuffer |
Public constructors |
|---|
Public methods |
|
|---|---|
void |
clear()Clears the buffer. |
ByteBuffer |
grow(int newSize)Grows the buffer to a new size. |
ByteBuffer |
init(long timeUs, int size)Initializes the buffer. |
void |
release()Releases the output buffer for reuse. |
Inherited fields |
||||||
|---|---|---|---|---|---|---|
|
Inherited methods |
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public fields
Public constructors
SimpleDecoderOutputBuffer
public SimpleDecoderOutputBuffer(
DecoderOutputBuffer.Owner<SimpleDecoderOutputBuffer> owner
)
Public methods
grow
public ByteBuffer grow(int newSize)
Grows the buffer to a new size.
Existing data is copied to the new buffer, and position is preserved.
| Parameters | |
|---|---|
int newSize |
New size of the buffer. |
| Returns | |
|---|---|
ByteBuffer |
The |
init
public ByteBuffer init(long timeUs, int size)
Initializes the buffer.
| Parameters | |
|---|---|
long timeUs |
The presentation timestamp for the buffer, in microseconds. |
int size |
An upper bound on the size of the data that will be written to the buffer. |
| Returns | |
|---|---|
ByteBuffer |
The |
release
public void release()
Releases the output buffer for reuse. Must be called when the buffer is no longer needed.