withProducerSync<T> method

T withProducerSync<T>(
  1. T use(
    1. ScopedGpuSync view
    )
)

Reads what to wait for before you read an acquired frame's texture.

See mln_acquired_frame_get_producer_sync in the C API reference.

Errors:

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

Implementation

T withProducerSync<T>(T Function(ScopedGpuSync view) use) => _NativeViewScope(
  _state,
  raw.mln_acquired_frame_view_begin,
  raw.mln_acquired_frame_view_end,
).use((scope) => use(ScopedGpuSync._(scope, _getProducerSync())));