NativeBindings
Inherits from:
MagicLeapNativeBindings
Public Methods
MLResult.Code MLNativeSurfaceAcquireHardwareBufferFromNativeBuffer
public MLResult.Code MLNativeSurfaceAcquireHardwareBufferFromNativeBuffer(
ulong handle,
ulong native_buffer,
out IntPtr hardwareBuffer,
out uint width,
out uint height
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
ulong | native_buffer | |
out IntPtr | hardwareBuffer | |
out uint | width | |
out uint | height |
MLResult.Code MLNativeSurfaceAcquireNextAvailableFrame
public MLResult.Code MLNativeSurfaceAcquireNextAvailableFrame(
ulong handle,
out ulong nativeBuffer
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
out ulong | nativeBuffer |
MLResult.Code MLNativeSurfaceCreate
public MLResult.Code MLNativeSurfaceCreate(
ref MLNativeSurfaceConfig configValues,
out ulong handle
)
Parameters
Type | Name | Description |
---|---|---|
ref MLNativeSurfaceConfig | configValues | |
out ulong | handle |
MLResult.Code MLNativeSurfaceGetFrameCropRect
public MLResult.Code MLNativeSurfaceGetFrameCropRect(
ulong handle,
out MLRecti cropRect
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
out MLRecti | cropRect | 2D rectangle with integer values in native format. |
MLResult.Code MLNativeSurfaceGetFrameNumber
public MLResult.Code MLNativeSurfaceGetFrameNumber(
ulong handle,
out ulong number
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
out ulong | number |
MLResult.Code MLNativeSurfaceGetFrameQueueBufferTimestamp
public MLResult.Code MLNativeSurfaceGetFrameQueueBufferTimestamp(
ulong handle,
out long timestampNs
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
out long | timestampNs |
MLResult.Code MLNativeSurfaceGetFrameTimestamp
public MLResult.Code MLNativeSurfaceGetFrameTimestamp(
ulong handle,
out long timestampNs
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
out long | timestampNs |
MLResult.Code MLNativeSurfaceGetFrameTransformationMatrix
public MLResult.Code MLNativeSurfaceGetFrameTransformationMatrix(
ulong handle,
float [] OutMtx
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
float [] | OutMtx |
MLResult.Code MLNativeSurfaceRelease
public MLResult.Code MLNativeSurfaceRelease(
ulong handle
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle |
MLResult.Code MLNativeSurfaceReleaseFrame
public MLResult.Code MLNativeSurfaceReleaseFrame(
ulong handle,
ulong native_buffer
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
ulong | native_buffer |
MLResult.Code MLNativeSurfaceSetOnFrameAvailableCallback
public MLResult.Code MLNativeSurfaceSetOnFrameAvailableCallback(
ulong handle,
ref MLNativeSurfaceOnFrameAvailableCallback callback,
IntPtr userData
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
ref MLNativeSurfaceOnFrameAvailableCallback | callback | |
IntPtr | userData |
delegate void OnFrameAvailable
public delegate void OnFrameAvailable(
ulong handle,
ref MLNativeSurfaceFrameAvailableInfo info
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | |
ref MLNativeSurfaceFrameAvailableInfo | info |
Public Enums
MLNativeSurfaceAcquiredBufferCount
Enumerator | Value | Description |
---|---|---|
Min | 1 | |
Max | 16 |