withVulkanTexture<T> method

T withVulkanTexture<T>(
  1. T use(
    1. ScopedVulkanTextureFrame view
    )
)

Gets the Vulkan image of an acquired frame.

See mln_acquired_frame_get_vulkan_texture in the C API reference.

Errors:

  • Status.targetLost when the session failed, or you detached, abandoned, or disposed it.

Implementation

T withVulkanTexture<T>(T Function(ScopedVulkanTextureFrame view) use) =>
    _NativeViewScope(
      _state,
      raw.mln_acquired_frame_view_begin,
      raw.mln_acquired_frame_view_end,
    ).use(
      (scope) => use(ScopedVulkanTextureFrame._(scope, _getVulkanTexture())),
    );