cuda.bindings._v2.driver.egl_stream_consumer_acquire_frame#

cuda.bindings._v2.driver.egl_stream_consumer_acquire_frame(
intptr_t conn,
intptr_t p_stream,
unsigned int timeout,
) → intptr_t#

Acquire an image frame from the EGLStream with CUDA as a consumer.

Acquire an image frame from EGLStreamKHR. This API can also acquire an old frame presented by the producer unless explicitly disabled by setting EGL_SUPPORT_REUSE_NV flag to EGL_FALSE during stream initialization. By default, EGLStream is created with this flag set to EGL_TRUE. cuGraphicsResourceGetMappedEglFrame can be called on p_cuda_resource to get CUeglFrame.

Parameters:
  • conn (intptr_t) – Connection on which to acquire.

  • p_stream (intptr_t) – CUDA stream for synchronization and any data migrations implied by CUeglResourceLocationFlags.

  • timeout (unsigned int) – Desired timeout in usec for a new frame to be acquired. If set as CUDA_EGL_INFINITE_TIMEOUT, acquire waits infinitely. After timeout occurs CUDA consumer tries to acquire an old frame if available and EGL_SUPPORT_REUSE_NV flag is set.

Returns:

CUDA resource on which the stream frame will be mapped

for use.

Return type:

intptr_t

See also

cuEGLStreamConsumerAcquireFrame