Skip to main content
Version: 20 Mar 2024

NativeBindings

Native bindings for the MLWebRTC.AppDefinedVideoSource class.

Inherits from:
MagicLeapNativeBindings

Public Methods

MLResult.Code InitializeAppDefinedVideoSource

Initialized a given appDefinedVideoSource object and sets it's callbacks.

public static MLResult.Code InitializeAppDefinedVideoSource(
MLWebRTC.AppDefinedVideoSource appDefinedVideoSource
)

Parameters

TypeNameDescription
MLWebRTC.AppDefinedVideoSourceappDefinedVideoSourceThe AppDefinedVideoSource object to initialize.

Returns: MLResult.Result will be MLResult.Code.Ok if the connection was successfully created. MLResult.Result will be MLResult.Code.PermissionDenied if necessary permission is missing. MLResult.Result will be MLResult.Code.UnspecifiedFailure if failed due to other internal error.


MLResult.Code MLWebRTCSourceAppDefinedVideoSourcePushFrame

Creates the local source that links to the user's camera and mic.

public MLResult.Code MLWebRTCSourceAppDefinedVideoSourcePushFrame(
ulong sourceHandle,
in MLWebRTC.VideoSink.Frame.NativeBindings.MLWebRTCFrame frameNative
)

Parameters

TypeNameDescription
ulongsourceHandleThe handle to the local source to return to the caller.
in MLWebRTC.VideoSink.Frame.NativeBindings.MLWebRTCFrameframeNative

Returns: MLResult.Result will be MLResult.Code.Ok if the local source was successfully created. MLResult.Result will be MLResult.Code.PermissionDenied if necessary permission is missing. MLResult.Result will be MLResult.Code.UnspecifiedFailure if failed due to other internal error.


MLResult.Code MLWebRTCSourceCreateAppDefinedVideoSource

Creates the local source that links to the user's camera and mic.

public MLResult.Code MLWebRTCSourceCreateAppDefinedVideoSource(
in AppDefinedSource.NativeBindings.MLWebRTCAppDefinedSourceEventCallbacks callbacks,
out ulong sourceHandle
)

Parameters

TypeNameDescription
in AppDefinedSource.NativeBindings.MLWebRTCAppDefinedSourceEventCallbackssourceHandleThe handle to the local source to return to the caller.
out ulongsourceHandle

Returns: MLResult.Result will be MLResult.Code.Ok if the local source was successfully created. MLResult.Result will be MLResult.Code.PermissionDenied if necessary permission is missing. MLResult.Result will be MLResult.Code.UnspecifiedFailure if failed due to other internal error.