cuda.bindings._v2.driver.graphics_vdpau_register_video_surface#
- cuda.bindings._v2.driver.graphics_vdpau_register_video_surface(
- VdpVideoSurface vdp_surface,
- unsigned int flags,
Registers a VDPAU
VdpVideoSurfaceobject.Registers the
VdpVideoSurfacespecified byvdp_surfacefor access by CUDA. A handle to the registered object is returned asp_cuda_resource. The surface’s intended usage is specified usingflags, as follows:.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. It is therefore assumed that this resource will be read from and written to by CUDA. This is the default value.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY: Specifies that CUDA will not write to this resource.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD: Specifies that CUDA will not read from this resource and will write over the entire contents of the resource, so none of the data previously stored in the resource will be preserved.
The
VdpVideoSurfaceis presented as an array of subresources that may be accessed using pointers returned bycuGraphicsSubResourceGetMappedArray. The exact number of validarrayIndexvalues depends on the VDPAU surface format. The mapping is shown in the table below.mipLevelmust be 0.- Parameters:
vdp_surface (VdpVideoSurface) – The
VdpVideoSurfaceto be registered.flags (unsigned int) – Map flags.
- Returns:
Pointer to the returned object handle.
- Return type:
intptr_t
See also
cuGraphicsVDPAURegisterVideoSurface