Table of Contents

Class VulkanContinuousCaptureSession

Manages a camera capture session with a continuous/repeating request.

public class VulkanContinuousCaptureSession : CaptureSessionBase<VulkanContinuousCaptureSession.Proxy>
Inheritance
object
VulkanContinuousCaptureSession
Derived
Inherited Members
Extension Methods

Remarks

Texture conversion is done through a native Vulkan plugin.

Constructors

VulkanContinuousCaptureSession(Resolution, GraphicsFormat)

public VulkanContinuousCaptureSession(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).

Fields

Texture

The output texture with converted frames.

public readonly RenderTexture Texture

Field Value

RenderTexture

Properties

CaptureTimestamp

The capture timestamp of the last processed frame.

public long CaptureTimestamp { get; }

Property Value

long

HasNewFrame

true if a capture was processed this frame; false otherwise.

public bool HasNewFrame { get; }

Property Value

bool

Methods

DispatchFrameConversionAsync(nint, int, long, long)

protected Task DispatchFrameConversionAsync(nint acquiredBufferPtr, int bufferDataSpace, long bufferId, long timestampNs)

Parameters

acquiredBufferPtr nint
bufferDataSpace int
bufferId long
timestampNs long

Returns

Task

DisposeAsync()

Closes the session (if not already closed) and releases native resources.

public override ValueTask DisposeAsync()

Returns

ValueTask

OnFrameReadyNative(nint, int, long, long)

protected virtual void OnFrameReadyNative(nint acquiredBufferPtr, int bufferDataSpace, long bufferId, long timestampNs)

Parameters

acquiredBufferPtr nint
bufferDataSpace int
bufferId long
timestampNs long

Events

OnFrameProcessed

Callback for when a frame has been processed, with the frame texture and capture timestamp.

public event Action<RenderTexture, long>? OnFrameProcessed

Event Type

Action<RenderTexture, long>

Remarks

The image at this point has not actually finished processing, but all GPU commands to do so have been enqueued.