public class PNGEncoder extends VideoEncoder
VideoEncoder.EncodedFrame
Constructor and Description |
---|
PNGEncoder() |
Modifier and Type | Method and Description |
---|---|
VideoEncoder.EncodedFrame |
encodeFrame(Picture pic,
ByteBuffer out)
Encode one video frame.
|
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.
|
ColorSpace[] |
getSupportedColorSpaces()
Native color spaces of this video encoder, i.e.
|
public VideoEncoder.EncodedFrame encodeFrame(Picture pic, ByteBuffer out)
VideoEncoder
encodeFrame
in class VideoEncoder
pic
- The video frame to be encoded. Must be in one of the encoder's
native color spaces.out
- 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 ColorSpace[] getSupportedColorSpaces()
VideoEncoder
getSupportedColorSpaces
in class VideoEncoder
public int estimateBufferSize(Picture frame)
VideoEncoder
estimateBufferSize
in class VideoEncoder
frame
- A frame in question.Copyright © 2019. All rights reserved.