Skip to main content
Version: 20 Mar 2024

NativeBindings

Native bindings for the MLWebRTC.VideoSink class.

Inherits from:
MagicLeapNativeBindings

Public Methods

MLResult.Code MLWebRTCVideoSinkAcquireNextAvailableFrame

Gets a newly available frame from a video sink.

public MLResult.Code MLWebRTCVideoSinkAcquireNextAvailableFrame(
ulong sinkHandle,
out ulong frameHandle
)

Parameters

TypeNameDescription
ulongsinkHandleThe handle to the video sink to get a new frame from.
out ulongframeHandleThe handle to the new frame.

Returns: MLResult.Result will be MLResult.Code.Ok if the new frame was successfully acquired. 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 MLWebRTCVideoSinkCreate

Creates a video sink.

public MLResult.Code MLWebRTCVideoSinkCreate(
out ulong sinkHandle
)

Parameters

TypeNameDescription
out ulongsinkHandleThe handle to the video sink to return to the caller.

Returns: MLResult.Result will be MLResult.Code.Ok if the video sink 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 MLWebRTCVideoSinkDestroy

Destroys a video sink.

public MLResult.Code MLWebRTCVideoSinkDestroy(
ulong sinkHandle
)

Parameters

TypeNameDescription
ulongsinkHandleThe handle to the video sink to destroy.

Returns: MLResult.Result will be MLResult.Code.Ok if the video sink was successfully destroyed. 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 MLWebRTCVideoSinkIsNewFrameAvailable

Gets if a new frame is available for a video sink.

public MLResult.Code MLWebRTCVideoSinkIsNewFrameAvailable(
ulong sinkHandle,
out bool newFrameAvailable
)

Parameters

TypeNameDescription
ulongsinkHandleThe handle to the video sink to check a new frame for.
out boolnewFrameAvailableUsed to return to the caller if a new frame is available.

Returns: MLResult.Result will be MLResult.Code.Ok if the video sink was successfully queried. 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 MLWebRTCVideoSinkReleaseFrame

Releases a frame from a video sink.

public MLResult.Code MLWebRTCVideoSinkReleaseFrame(
ulong sinkHandle,
ulong frameHandle
)

Parameters

TypeNameDescription
ulongsinkHandleThe handle to the video sink to release the frame from.
ulongframeHandleThe handle to the frame to release.

Returns: MLResult.Result will be MLResult.Code.Ok if the frame was successfully released. 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 MLWebRTCVideoSinkSetSource

Sets the source of a video sink.

public MLResult.Code MLWebRTCVideoSinkSetSource(
ulong sinkHandle,
ulong sourceHandle
)

Parameters

TypeNameDescription
ulongsinkHandleThe handle to the video sink to set the source to.
ulongsourceHandleThe handle to the source to set onto the video sink.

Returns: MLResult.Result will be MLResult.Code.Ok if the source was successfully set onto the video sink. 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.