Skip to main content
Version: 20 Mar 2024

MLWebRTCFrame

Representation of the native frame structure.

Public Methods

MLWebRTCFrame Create

public static MLWebRTCFrame Create(
OutputFormat format
)

Parameters

TypeNameDescription
OutputFormatformatDefines the supported output formats of the image planes.

MLWebRTCFrame Create

Caller MUST call FreeUnmanagedMemory when finished with the returned MLWebRTCFrame ! Unmanaged memory will be allocated for the FrameData pointer. Creates and returns an initialized version of this struct from a MLWebRTC.VideoSink.Frame object.

public static MLWebRTCFrame Create(
MLWebRTC.VideoSink.Frame frame
)

Parameters

TypeNameDescription
MLWebRTC.VideoSink.FrameframeThe frame object to use for initializing.

Returns: An initialized version of this struct.


void FreeUnmanagedMemory

public void FreeUnmanagedMemory()

override string ToString

public override string ToString()

Public Attributes

Format

Output format that the image planes will be in.


public OutputFormat Format;

TypeDescription
OutputFormatDefines the supported output formats of the image planes.

FrameData

Frame data to be interpreted as a MLWebRTCNativeFrameInfo if Format is OutputFormat.NativeBuffer, otherwise interpreted as a MLWebRTCFramePlanes.


public IntPtr FrameData;


TimeStamp

Timestamp of the frame.


public ulong TimeStamp;


Version

Version of this structure.


public uint Version;