GstAllocators.ShmAllocator¶
- Subclasses:
None
Methods¶
- Inherited:
GstAllocators.FdAllocator (2), Gst.Allocator (5), Gst.Object (27), GObject.Object (37)
- Structs:
class |
|
class |
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GstAllocators.ShmAllocator(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
This is a subclass of
GstAllocators.FdAllocatorthat implements theGst.Allocator.alloc() method usingmemfd_create()when available, POSIXshm_open()otherwise. Platforms not supporting any of those (Windows) will always returnNone.Note that allocating new shared memories has a significant performance cost, it is thus recommended to keep a pool of pre-allocated
Gst.Memory, usingGst.BufferPool. For that reason, this allocator has theGst.AllocatorFlags.NO_COPYflag set.New in version 1.24.
- classmethod get()[source]¶
- Returns:
a
Gst.AllocatororNoneifGstAllocators.ShmAllocator.init_once() has not been previously called.- Return type:
Get the
GstAllocators.ShmAllocatorsingleton previously registered withGstAllocators.ShmAllocator.init_once().New in version 1.24.
- classmethod init_once()[source]¶
Register a
GstAllocators.ShmAllocatorusingGst.Allocator.register() with the nameGstAllocators.ALLOCATOR_SHM. This is no-op after the first call.New in version 1.24.