PyNvCodec.PySurfaceDownloader

class PyNvCodec.PySurfaceDownloader
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: PyNvCodec._PyNvCodec.PySurfaceDownloader, width: int, height: int, format: PyNvCodec._PyNvCodec.PixelFormat, gpu_id: int) -> None

    Constructor method.

    param width:

    Surface width

    param height:

    Surface height

    param format:

    Surface pixel format

    param gpu_id:

    what GPU does Surface belong to

  2. __init__(self: PyNvCodec._PyNvCodec.PySurfaceDownloader, width: int, height: int, format: PyNvCodec._PyNvCodec.PixelFormat, context: int, stream: int) -> None

    Constructor method.

    param width:

    Surface width

    param height:

    Surface height

    param format:

    Surface pixel format

    param context:

    CUDA context to use for HtoD memcopy

    param stream:

    CUDA stream to use for HtoD memcopy

Methods

DownloadSingleSurface(*args, **kwargs)

Overloaded function.

Format(self)

Get pixel format.

__init__(*args, **kwargs)

Overloaded function.

DownloadSingleSurface(*args, **kwargs)

Overloaded function.

  1. DownloadSingleSurface(self: PyNvCodec._PyNvCodec.PySurfaceDownloader, surface: VPF::Surface, frame: numpy.ndarray[numpy.uint8]) -> bool

    Perform DtoH memcpy.

    param src:

    input Surface

    param frame:

    output numpy array

    type frame:

    numpy.ndarray of type numpy.uint8

    return:

    True in case of success False otherwise

    rtype:

    Bool

  2. DownloadSingleSurface(self: PyNvCodec._PyNvCodec.PySurfaceDownloader, surface: VPF::Surface, frame: numpy.ndarray[numpy.float32]) -> bool

    Perform DtoH memcpy.

    param src:

    input Surface

    param frame:

    output numpy array

    type frame:

    numpy.ndarray of type numpy.f

    return:

    True in case of success False otherwise

    rtype:

    Bool

  3. DownloadSingleSurface(self: PyNvCodec._PyNvCodec.PySurfaceDownloader, surface: VPF::Surface, frame: numpy.ndarray[numpy.uint16]) -> bool

    Perform DtoH memcpy.

    param src:

    input Surface

    param frame:

    output numpy array

    type frame:

    numpy.ndarray of type numpy.uint16

    return:

    True in case of success False otherwise

    rtype:

    Bool

Format(self: PyNvCodec._PyNvCodec.PySurfaceDownloader) PyNvCodec._PyNvCodec.PixelFormat

Get pixel format.