PyNvCodec.PyCudaBufferDownloader¶
- class PyNvCodec.PyCudaBufferDownloader¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: PyNvCodec._PyNvCodec.PyCudaBufferDownloader, elem_size: int, num_elems: int, gpu_id: int) -> None
Constructor method.
- param elem_size:
single buffer element size in bytes
- param num_elems:
number of elements in buffer
- param gpu_id:
GPU to use for memcopy
__init__(self: PyNvCodec._PyNvCodec.PyCudaBufferDownloader, elem_size: int, num_elems: int, context: int, stream: int) -> None
Constructor method.
- param elem_size:
single buffer element size in bytes
- param num_elems:
number of elements in buffer
- param context:
CUDA context to use
- param stream:
CUDA stream to use
Methods
DownloadSingleCudaBuffer
(self, buffer, array)Perform DtoH memcopy.
__init__
(*args, **kwargs)Overloaded function.
- DownloadSingleCudaBuffer(self: PyNvCodec._PyNvCodec.PyCudaBufferDownloader, buffer: PyNvCodec._PyNvCodec.CudaBuffer, array: numpy.ndarray[numpy.uint8]) bool ¶
Perform DtoH memcopy.
- Parameters:
buffer – input CUDA buffer
array – output numpy array
- Returns:
True in case of success, False otherwise