GstCuda.CudaAllocator¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class GstCuda.CudaAllocator(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
Gst.Allocatorsubclass for cuda memoryAdded in version 1.22.
- alloc(context, stream, info)¶
- Parameters:
context (
GstCuda.CudaContext) – aGstCuda.CudaContextstream (
GstCuda.CudaStreamorNone) – aGstCuda.CudaStreaminfo (
GstVideo.VideoInfo) – aGstVideo.VideoInfo
- Returns:
a newly allocated
GstCuda.CudaMemory- Return type:
Gst.MemoryorNone
Added in version 1.22.
- alloc_stream_ordered(context, stream, info)¶
- Parameters:
context (
GstCuda.CudaContext) – aGstCuda.CudaContextstream (
GstCuda.CudaStream) – aGstCuda.CudaStreaminfo (
GstVideo.VideoInfo) – aGstVideo.VideoInfo
- Returns:
a newly allocated
GstCuda.CudaMemory- Return type:
Gst.MemoryorNone
Added in version 1.28.
- alloc_wrapped(context, stream, info, dev_ptr, user_data, notify)¶
- Parameters:
context (
GstCuda.CudaContext) – aGstCuda.CudaContextstream (
GstCuda.CudaStreamorNone) – aGstCuda.CudaStreaminfo (
GstVideo.VideoInfo) – aGstVideo.VideoInfodev_ptr (
int) – a CUdeviceptr CUDA device memorynotify (
GLib.DestroyNotifyorNone) – Called with user_data when the memory is freed
- Returns:
a new
Gst.Memory- Return type:
Allocates a new memory that wraps the given CUDA device memory.
info must represent actual memory layout, in other words, offset, stride and size fields of info should be matched with memory layout of dev_ptr
By default, wrapped dev_ptr will be freed at the time when
Gst.Memoryis freed if notify isNone. Otherwise, if caller sets notify, freeing dev_ptr is callers responsibility and defaultGstCuda.CudaAllocatorwill not free it.Added in version 1.24.
- set_active(active)¶
- Parameters:
active (
bool) – the new active state- Returns:
Trueif active state of self was successfully updated.- Return type:
Controls the active state of self. Default
GstCuda.CudaAllocatoris stateless and therefore active state is ignored, but subclass implementation (e.g.,GstCuda.CudaPoolAllocator) will require explicit active state control for its internal resource management.This method is conceptually identical to
Gst.BufferPool.set_activemethod.Added in version 1.24.
- virtual_alloc(context, stream, info, prop, granularity_flags)¶
- Parameters:
context (
GstCuda.CudaContext) – aGstCuda.CudaContextstream (
GstCuda.CudaStream) – aGstCuda.CudaStreaminfo (
GstVideo.VideoInfo) – aGstVideo.VideoInfoprop (
CudaGst.memAllocationProp) – allocation propertygranularity_flags (
CudaGst.memAllocationGranularity_flags) – allocation flags
- Returns:
a newly allocated memory object or
Noneif allocation is not supported- Return type:
Gst.MemoryorNone
Allocates new
Gst.Memoryobject with CUDA virtual memory.Added in version 1.24.
- do_set_active(active) virtual¶
- Parameters:
active (
bool) – the new active state- Returns:
Trueif active state of allocator was successfully updated.- Return type:
Controls the active state of allocator. Default
GstCuda.CudaAllocatoris stateless and therefore active state is ignored, but subclass implementation (e.g.,GstCuda.CudaPoolAllocator) will require explicit active state control for its internal resource management.This method is conceptually identical to
Gst.BufferPool.set_activemethod.Added in version 1.24.