Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstCuda.buffer_pool_config_get_cuda_alloc_method(config)¶
- Parameters:
config (
Gst.Structure
) – a buffer pool config- Return type:
Gets configured allocation method
New in version 1.24.
- GstCuda.buffer_pool_config_get_cuda_stream(config)¶
- Parameters:
config (
Gst.Structure
) – a buffer pool config- Returns:
the currently configured
GstCuda.CudaStream
on config orNone
if config doesn’t holdGstCuda.CudaStream
- Return type:
New in version 1.24.
- GstCuda.buffer_pool_config_set_cuda_alloc_method(config, method)¶
- Parameters:
config (
Gst.Structure
) – a buffer pool configmethod (
GstCuda.CudaMemoryAllocMethod
) –
Sets allocation method
New in version 1.24.
- GstCuda.buffer_pool_config_set_cuda_stream(config, stream)¶
- Parameters:
config (
Gst.Structure
) – a buffer pool configstream (
GstCuda.CudaStream
) – aGstCuda.CudaStream
Sets stream on config
New in version 1.24.
- GstCuda.context_new_cuda_context(cuda_ctx)¶
- Parameters:
cuda_ctx (
GstCuda.CudaContext
) – aGstCuda.CudaContext
- Returns:
a new
Gst.Context
embedding the cuda_ctx- Return type:
New in version 1.22.
- GstCuda.cuda_create_user_token()¶
- Returns:
user token value
- Return type:
Creates new user token value
New in version 1.24.
- GstCuda.cuda_ensure_element_context(element, device_id, cuda_ctx)¶
- Parameters:
element (
Gst.Element
) – theGst.Element
running the querydevice_id (
int
) – preferred device-id, pass device_id >=0 when the device_id explicitly required. Otherwise, set -1.cuda_ctx (
GstCuda.CudaContext
) – the resultingGstCuda.CudaContext
- Returns:
whether a
GstCuda.CudaContext
exists in cuda_ctx- cuda_ctx:
the resulting
GstCuda.CudaContext
- Return type:
(
bool
, cuda_ctx:GstCuda.CudaContext
)
Perform the steps necessary for retrieving a
GstCuda.CudaContext
from the surrounding elements or from the application using theGst.Context
mechanism.If the content of cuda_ctx is not
None
, then noGst.Context
query is necessary forGstCuda.CudaContext
.New in version 1.22.
- GstCuda.cuda_handle_context_query(element, query, cuda_ctx)¶
- Parameters:
element (
Gst.Element
) – aGst.Element
query (
Gst.Query
) – aGst.Query
of typeGst.QueryType.CONTEXT
cuda_ctx (
GstCuda.CudaContext
orNone
) – aGstCuda.CudaContext
- Returns:
Whether the query was successfully responded to from the passed context.
- Return type:
New in version 1.22.
- GstCuda.cuda_handle_set_context(element, context, device_id, cuda_ctx)¶
- Parameters:
element (
Gst.Element
) – aGst.Element
context (
Gst.Context
) – aGst.Context
device_id (
int
) – preferred device-id, pass device_id >=0 when the device_id explicitly required. Otherwise, set -1.cuda_ctx (
GstCuda.CudaContext
) – location of aGstCuda.CudaContext
- Returns:
whether the cuda_ctx could be set successfully
- cuda_ctx:
location of a
GstCuda.CudaContext
- Return type:
(
bool
, cuda_ctx:GstCuda.CudaContext
)
Helper function for implementing
Gst.Element.do_set_context
() in CUDA capable elements.Retrieves the
GstCuda.CudaContext
in context and places the result in cuda_ctx.New in version 1.22.
- GstCuda.cuda_load_library()¶
-
Loads the cuda library
New in version 1.22.
- GstCuda.cuda_memory_init_once()¶
Ensures that the
GstCuda.CudaAllocator
is initialized and ready to be used.New in version 1.22.
- GstCuda.cuda_nvrtc_compile(source)¶
-
New in version 1.22.
- GstCuda.cuda_nvrtc_compile_cubin(source, device)¶
- Parameters:
- Returns:
Compiled CUDA assembly code if successful, otherwise
None
- Return type:
New in version 1.24.
- GstCuda.cuda_nvrtc_load_library()¶
-
Loads the nvrtc library.
New in version 1.22.
- GstCuda.is_cuda_memory(mem)¶
- Parameters:
mem (
Gst.Memory
) – AGst.Memory
- Return type:
Check if mem is a cuda memory
New in version 1.22.