MLNativeSurface
NameSpace: MagicLeap
Public Fields
Handle
public ulong Handle { get; set; }
Public Methods
MLResult AcquireNextAvailableFrame
public MLResult AcquireNextAvailableFrame(
out ulong nativeBuffer
)
Parameters
Type | Name | Description |
---|---|---|
out ulong | nativeBuffer |
MLResult Destroy
public MLResult Destroy()
MLResult GetFrameNumber
public MLResult GetFrameNumber(
out ulong number
)
Parameters
Type | Name | Description |
---|---|---|
out ulong | number |
MLResult GetFrameQueueBufferTimestamp
public MLResult GetFrameQueueBufferTimestamp(
out long timestampNs
)
Parameters
Type | Name | Description |
---|---|---|
out long | timestampNs |
MLResult GetFrameTimestamp
public MLResult GetFrameTimestamp(
out long timestampNs
)
Parameters
Type | Name | Description |
---|---|---|
out long | timestampNs |
MLResult GetFrameTransformMatrix
public MLResult GetFrameTransformMatrix(
float [] frameTransformMatColMajor
)
Parameters
Type | Name | Description |
---|---|---|
float [] | frameTransformMatColMajor |
MLNativeSurface
public MLNativeSurface(
PixelFormat pixelFormat,
ushort bufferCount,
uint width,
uint height
)
Parameters
Type | Name | Description |
---|---|---|
PixelFormat | pixelFormat | |
ushort | bufferCount | |
uint | width | |
uint | height |
MLNativeSurface
For externally owned native surface, like in the case of MLMediaRecorder
public MLNativeSurface(
ulong surfaceHandle
)
Parameters
Type | Name | Description |
---|---|---|
ulong | surfaceHandle |
delegate void OnFrameAvailableDelegate
public delegate void OnFrameAvailableDelegate()
MLResult ReleaseFrame
public MLResult ReleaseFrame(
ulong nativeBuffer
)
Parameters
Type | Name | Description |
---|---|---|
ulong | nativeBuffer |
Public Events
OnFrameAvailable
public OnFrameAvailableDelegate OnFrameAvailable()
Public Enums
PixelFormat
Enumerator | Value | Description |
---|---|---|
Custom | -4 | Custom |
Translucent | -3 | Translucent |
Transparent | -2 | Transparent |
Opaque | -1 | Opaque |
None | 0 | None |
Rgba8888 | 1 | 4x8-bit RGBA |
Rgbx8888 | 2 | 4x8-bit RGBX |
Rgb888 | 3 | 3x8-bit RGB |
Rgb565 | 4 | 16-bit RGB |
Bgra8888 | 5 | 4x8-bit BGRA |
RgbaFp16 | 22 | 64-bit RGBA |
Rgba1010102 | 43 | 32-bit RGBA |