Class EncodedVideoFrame
- Namespace
- LiveKit.Rtc
- Assembly
- LivekitRtc.dll
One complete encoded video access unit, without container or RTP headers.
public class EncodedVideoFrame
- Inheritance
-
EncodedVideoFrame
- Inherited Members
Constructors
EncodedVideoFrame(byte[], int, int, VideoCodec, EncodedFrameType, long, FrameMetadata?)
Creates an encoded frame to capture with CaptureFrame(EncodedVideoFrame).
public EncodedVideoFrame(byte[] data, int width, int height, VideoCodec codec, EncodedFrameType frameType, long timestampUs, FrameMetadata? metadata = null)
Parameters
databyte[]Encoded payload of the frame.
widthintFrame width in pixels.
heightintFrame height in pixels.
codecVideoCodecCodec the payload is encoded with.
frameTypeEncodedFrameTypeKey frame or delta frame.
timestampUslongCapture time in microseconds, increasing along the stream.
metadataFrameMetadataOptional metadata delivered with the frame.
Properties
Codec
The codec of Data. It must match the publication and stay fixed for the lifetime of the track.
public VideoCodec Codec { get; }
Property Value
Data
A single frame encoded with Codec (Annex B for H.264/H.265).
public byte[] Data { get; }
Property Value
- byte[]
FrameType
Whether this is a key frame or a delta frame.
public EncodedFrameType FrameType { get; }
Property Value
Height
Frame height in pixels.
public int Height { get; }
Property Value
Metadata
Optional metadata delivered with the frame.
public FrameMetadata? Metadata { get; }
Property Value
TimestampUs
Capture time in microseconds, increasing along the stream.
public long TimestampUs { get; }
Property Value
Width
Frame width in pixels.
public int Width { get; }