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.CudaStreamon config orNoneif config doesn’t holdGstCuda.CudaStream- Return type:
New in version 1.24.
- GstCuda.buffer_pool_config_get_cuda_stream_ordered_alloc(config)¶
- Parameters:
config (
Gst.Structure) – a buffer pool config- Returns:
Truestream ordered allocation option was specified- enabled:
whether stream ordered allocation was requested or not
- Return type:
New in version 1.26.
- 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.buffer_pool_config_set_cuda_stream_ordered_alloc(config, stream_ordered)¶
- Parameters:
config (
Gst.Structure) – a buffer pool configstream_ordered (
bool) – whether stream ordered allocation is allowed
Sets stream ordered allocation option
New in version 1.26.
- GstCuda.context_new_cuda_context(cuda_ctx)¶
- Parameters:
cuda_ctx (
GstCuda.CudaContext) – aGstCuda.CudaContext- Returns:
a new
Gst.Contextembedding 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.Elementrunning 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.CudaContextexists in cuda_ctx- cuda_ctx:
the resulting
GstCuda.CudaContext
- Return type:
(
bool, cuda_ctx:GstCuda.CudaContext)
Perform the steps necessary for retrieving a
GstCuda.CudaContextfrom the surrounding elements or from the application using theGst.Contextmechanism.If the content of cuda_ctx is not
None, then noGst.Contextquery is necessary forGstCuda.CudaContext.New in version 1.22.
- GstCuda.cuda_handle_context_query(element, query, cuda_ctx)¶
- Parameters:
element (
Gst.Element) – aGst.Elementquery (
Gst.Query) – aGst.Queryof typeGst.QueryType.CONTEXTcuda_ctx (
GstCuda.CudaContextorNone) – 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.Elementcontext (
Gst.Context) – aGst.Contextdevice_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.CudaContextin 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.CudaAllocatoris 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.