Class VulkanOnDemandCaptureSession
- Namespace
- Uralstech.UXR.QuestCamera.Vulkan
Manages a continuous capture session with user-invoked texture conversion.
public sealed class VulkanOnDemandCaptureSession : VulkanContinuousCaptureSession
- Inheritance
-
objectVulkanOnDemandCaptureSession
- Inherited Members
- Extension Methods
Remarks
Texture conversion is done through a native Vulkan plugin.
Constructors
VulkanOnDemandCaptureSession(Resolution, GraphicsFormat)
public VulkanOnDemandCaptureSession(Resolution resolution, GraphicsFormat textureFormat = null)
Parameters
resolutionResolutiontextureFormatGraphicsFormatIf not specified, uses equivalent of RenderTextureFormat.ARGB32.
Exceptions
- NotSupportedException
Thrown if this constructor is invoked in an environment where Vulkan is unavailable or if the current runtime's Android API Level is lower than 33 (Android 13).
Methods
OnFrameReadyNative(nint, int, long, long)
protected override void OnFrameReadyNative(nint acquiredBufferPtr, int bufferDataSpace, long bufferId, long timestampNs)
Parameters
acquiredBufferPtrnintbufferDataSpaceintbufferIdlongtimestampNslong
ProcessSingleFrameAsync(CancellationToken)
Requests and processes a single frame and returns the result.
public ValueTask<(long, RenderTexture)> ProcessSingleFrameAsync(CancellationToken token = default)
Parameters
tokenCancellationToken
Returns
- ValueTask<(long, RenderTexture)>
Capture timestamp and updated texture.
Remarks
The image when returned has not actually finished processing, but all GPU commands to do so have been enqueued.
Exceptions
- ObjectDisposedException
RequestFrame()
Requests that the next frame be processed (converted).
public void RequestFrame()
Exceptions
- ObjectDisposedException