JavaI420Buffer

Implementation of VideoFrame.I420Buffer backed by Java direct byte buffers.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val height: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val width: Int

Functions

Link copied to clipboard
open fun allocate(width: Int, height: Int): JavaI420Buffer
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
open fun release()
Decreases ref count by one.
Link copied to clipboard
open fun retain()
Increases ref count by one.
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.

Inherited functions

Link copied to clipboard
open fun getBufferType(): Int
Representation of the underlying buffer.