Class XRCpuImage.Api
An API for interacting with XRCpuImages.
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: solution.dll
Syntax
public abstract class XRCpuImage.Api
Remarks
This interface is intended to be implemented by AR platform providers (for example, ARCore, ARKit, Magic Leap, and HoloLens). The XRCpuImage uses it to make platform-specific API calls. Unity developers don't need to interact directly with this class; use the XRCpuImage instead.
Methods
Name | Description |
---|---|
ConvertAsync(int, ConversionParams) | Method to be implemented by the provider to create an asynchronous request to convert a camera image, similar to TryConvert(int, ConversionParams, IntPtr, int) except the conversion should happen on a thread other than the calling (main) thread. |
ConvertAsync(int, ConversionParams, OnImageRequestCompleteDelegate, IntPtr) | Method to be implemented by the provider. It is similar to ConvertAsync(int, ConversionParams) but takes a delegate to invoke when the request is complete, rather than returning a request id. |
DisposeAsyncRequest(int) | Method to be implemented by the provider to dispose an existing async conversion request. |
DisposeImage(int) | Method to be implemented by the provider to dispose an existing native image identified by
|
FormatSupported(XRCpuImage, TextureFormat) | Determines whether a given TextureFormat is supported for image conversion. |
GetAsyncRequestStatus(int) | Method to be implemented by the provider to get the status of an existing asynchronous conversion request. |
NativeHandleValid(int) | Method to be implemented by the provider to determine whether a native image handle is currently valid. An image can become invalid if it has been disposed. |
TryConvert(int, ConversionParams, IntPtr, int) | Method to be implemented by the provider to convert the image with handle
|
TryGetAsyncRequestData(int, out IntPtr, out int) | Method to be implemented by the provider to get a pointer to the image data from a completed asynchronous request. This method should only succeed if GetAsyncRequestStatus(int) returns Ready. |
TryGetConvertedDataSize(int, Vector2Int, TextureFormat, out int) | Method to be implemented by the provider to get the number of bytes required to store an image with the
given dimensions and |
TryGetPlane(int, int, out Cinfo) | Method to be implemented by the provider to get information about an image plane from a native image handle by index. |