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
Type | Name | Description |
---|---|---|
ulong | sinkHandle | The handle to the video sink to get a new frame from. |
out ulong | frameHandle | The 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
Type | Name | Description |
---|---|---|
out ulong | sinkHandle | The 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
Type | Name | Description |
---|---|---|
ulong | sinkHandle | The 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
Type | Name | Description |
---|---|---|
ulong | sinkHandle | The handle to the video sink to check a new frame for. |
out bool | newFrameAvailable | Used 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
Type | Name | Description |
---|---|---|
ulong | sinkHandle | The handle to the video sink to release the frame from. |
ulong | frameHandle | The 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
Type | Name | Description |
---|---|---|
ulong | sinkHandle | The handle to the video sink to set the source to. |
ulong | sourceHandle | The 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.