VideoFrame

open class VideoFrame : RefCounted

Java version of webrtc::VideoFrame and webrtc::VideoFrameBuffer. A difference from the C++ version is that no explicit tag is used, and clients are expected to use 'instanceof' to find the right subclass of the buffer. This allows clients to create custom VideoFrame.Buffer in arbitrary format in their custom VideoSources, and then cast it back to the correct subclass in their custom VideoSinks. All implementations must also implement the toI420() function, converting from the underlying representation if necessary. I420 is the most widely accepted format and serves as a fallback for video sinks that can only handle I420, e.g. the internal WebRTC software encoders.

Constructors

Link copied to clipboard
constructor(buffer: VideoFrame.Buffer, rotation: Int, timestampNs: Long)
Constructs a new VideoFrame backed by the given buffer.

Types

Link copied to clipboard
interface Buffer : RefCounted
Implements image storage medium.
Link copied to clipboard
Interface for I420 buffers.
Link copied to clipboard
Interface for buffers that are stored as a single texture, either in OES or RGB format.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun getRotatedHeight(): Int
Link copied to clipboard
open fun getRotatedWidth(): Int
Link copied to clipboard
open fun release()
Decreases ref count by one.
Link copied to clipboard
open fun retain()
Increases ref count by one.