public abstract class VideoEncoder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
VideoEncoder.EncodedFrame
The bytes of this video frame with associated metadata.
|
Constructor and Description |
---|
VideoEncoder() |
Modifier and Type | Method and Description |
---|---|
abstract VideoEncoder.EncodedFrame |
encodeFrame(Picture pic,
ByteBuffer buffer)
Encode one video frame.
|
abstract int |
estimateBufferSize(Picture frame)
Estimate the output buffer size that will likely be needed for the
current instance of encoder to encode a given frame.
|
abstract ColorSpace[] |
getSupportedColorSpaces()
Native color spaces of this video encoder, i.e.
|
public abstract VideoEncoder.EncodedFrame encodeFrame(Picture pic, ByteBuffer buffer)
pic
- The video frame to be encoded. Must be in one of the encoder's
native color spaces.buffer
- The buffer to store the encoded frame into. Note, only the
storage of this buffer is used, the position and limit are
kept untouched. Instead the returned value contains a
duplicate of this buffer with the position and limit set
correctly to the boundaries of the encoded frame. This buffer
must be large enough to hold the encoded frame. It is
undefined what will happen if the buffer is not large enough.
Most commonly some exception will be thrown.public abstract ColorSpace[] getSupportedColorSpaces()
public abstract int estimateBufferSize(Picture frame)
frame
- A frame in question.Copyright © 2019. All rights reserved.