GstCuda.CudaMemory

Fields

Name

Type

Access

Description

context

GstCuda.CudaContext

r/w

info

GstVideo.VideoInfo

r/w

mem

Gst.Memory

r/w

Methods

class

init_once ()

export ()

get_alloc_method ()

get_stream ()

get_texture (plane, filter_mode)

get_token_data (token)

get_user_data ()

set_token_data (token, data, notify)

sync ()

Details

class GstCuda.CudaMemory

New in version 1.22.

classmethod init_once()

Ensures that the GstCuda.CudaAllocator is initialized and ready to be used.

New in version 1.22.

export()
Returns:

True if successful

os_handle:

a pointer to OS handle

Return type:

(bool, os_handle: object)

Exports virtual memory handle to OS specific handle.

On Windows, os_handle should be pointer to HANDLE (i.e., void **), and pointer to file descriptor (i.e., int *) on Linux.

The returned os_handle is owned by self and therefore caller shouldn’t close the handle.

New in version 1.24.

get_alloc_method()
Return type:

GstCuda.CudaMemoryAllocMethod

Query allocation method

New in version 1.24.

get_stream()
Returns:

a GstCuda.CudaStream or None if default CUDA stream is in use

Return type:

GstCuda.CudaStream or None

Gets CUDA stream object associated with self

New in version 1.24.

get_texture(plane, filter_mode)
Parameters:
Returns:

True if successful

texture:

a pointer to CUtexObject object

Return type:

(bool, texture: int)

Creates CUtexObject with given parameters

New in version 1.24.

get_token_data(token)
Parameters:

token (int) – an user token

Returns:

user data pointer or None

Return type:

object or None

Gets back user data pointer stored via GstCuda.CudaMemory.set_token_data()

New in version 1.24.

get_user_data()
Returns:

the user data pointer

Return type:

object or None

Gets user data pointer stored via GstCuda.CudaAllocator.alloc_wrapped()

New in version 1.24.

set_token_data(token, data, notify)
Parameters:
  • token (int) – an user token

  • data (object or None) – an user data

  • notify (GLib.DestroyNotify) – function to invoke with data as argument, when data needs to be freed

Sets an opaque user data on a GstCuda.CudaMemory

New in version 1.24.

sync()

Performs synchronization if needed

New in version 1.24.