JavaI420Buffer
Implementation of VideoFrame.I420Buffer backed by Java direct byte buffers.
Functions
Link copied to clipboard
Allocates an empty I420Buffer suitable for an image of the given dimensions.
Link copied to clipboard
open fun cropAndScale(cropX: Int, cropY: Int, cropWidth: Int, cropHeight: Int, scaleWidth: Int, scaleHeight: Int): VideoFrame.Buffer
Crops a region defined by `cropx`, `cropY`, `cropWidth` and `cropHeight`.
Link copied to clipboard
open fun cropAndScaleI420(buffer: VideoFrame.I420Buffer, cropX: Int, cropY: Int, cropWidth: Int, cropHeight: Int, scaleWidth: Int, scaleHeight: Int): VideoFrame.Buffer
Link copied to clipboard
Returns a memory-backed frame in I420 format.
Link copied to clipboard
open fun wrap(width: Int, height: Int, dataY: ByteBuffer, strideY: Int, dataU: ByteBuffer, strideU: Int, dataV: ByteBuffer, strideV: Int, @Nullable releaseCallback: Runnable): JavaI420Buffer
Wraps existing ByteBuffers into JavaI420Buffer object without copying the contents.