Table of Contents

Class VulkanOnDemandCaptureSession

Manages a continuous capture session with user-invoked texture conversion.

public sealed class VulkanOnDemandCaptureSession : VulkanContinuousCaptureSession
Inheritance
object
VulkanOnDemandCaptureSession
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

resolution Resolution
textureFormat GraphicsFormat

If 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

acquiredBufferPtr nint
bufferDataSpace int
bufferId long
timestampNs long

ProcessSingleFrameAsync(CancellationToken)

Requests and processes a single frame and returns the result.

public ValueTask<(long, RenderTexture)> ProcessSingleFrameAsync(CancellationToken token = default)

Parameters

token CancellationToken

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