Skip to main content
Version: 20 Mar 2024

NativeBindings

Inherits from:
MagicLeapNativeBindings

Public Methods

delegate void CloseDelegate

public delegate void CloseDelegate(
ulong dataSourceHandle,
IntPtr context
)

Parameters

TypeNameDescription
ulongdataSourceHandle
IntPtrcontext

MLResult.Code Create

public static MLResult.Code Create(
DataSource dataSource,
out ulong handle
)

Parameters

TypeNameDescription
DataSourcedataSource
out ulonghandle

delegate long GetSizeDelegate

public delegate long GetSizeDelegate(
ulong dataSourceHandle,
IntPtr context
)

Parameters

TypeNameDescription
ulongdataSourceHandle
IntPtrcontext

MLResult.Code MLMediaDataSourceCreate

public MLResult.Code MLMediaDataSourceCreate(
ReadAtDelegate readAt,
GetSizeDelegate getSize,
CloseDelegate close,
IntPtr context,
out ulong handle
)

Parameters

TypeNameDescription
ReadAtDelegatereadAt
GetSizeDelegategetSize
CloseDelegateclose
IntPtrcontext
out ulonghandle

MLResult.Code MLMediaDataSourceDestroy

public MLResult.Code MLMediaDataSourceDestroy(
ulong handle
)

Parameters

TypeNameDescription
ulonghandle

delegate long ReadAtDelegate

public delegate long ReadAtDelegate(
ulong dataSourceHandle,
ulong position,
ulong size,
IntPtr buffer,
IntPtr context
)

Parameters

TypeNameDescription
ulongdataSourceHandle
ulongposition
ulongsize
IntPtrbuffer
IntPtrcontext