Class VulkanContinuousCaptureSession
- Namespace
- Uralstech.UXR.QuestCamera.Vulkan
Manages a camera capture session with a continuous/repeating request.
public class VulkanContinuousCaptureSession : CaptureSessionBase<VulkanContinuousCaptureSession.Proxy>
- Inheritance
-
objectVulkanContinuousCaptureSession
- 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
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).
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
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
acquiredBufferPtrnintbufferDataSpaceintbufferIdlongtimestampNslong
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
acquiredBufferPtrnintbufferDataSpaceintbufferIdlongtimestampNslong
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.