gstallocators.shm_allocator

Module for [ShmAllocator] class

Types 3

This is a subclass of #GstFdAllocator that implements the [gst.allocator.Allocator.alloc] method using memfd_create() when available, POSIX shm_open() otherwise. Platforms not supporting any of those (Windows) will always return null.

Note that allocating new shared memories has a significant performance cost, it is thus recommended to keep a pool of pre-allocated #GstMemory, using #GstBufferPool. For that reason, this allocator has the [gst.types.AllocatorFlags.NoCopy] flag set.

Methods
GType _gType() @property
ShmAllocator self()Returns `this`, for use in `with` statements.
ShmAllocatorGidBuilder builder()Get builder for [gstallocators.shm_allocator.ShmAllocator] Returns: New builder object
gst.allocator.Allocator get()Get the #GstShmAllocator singleton previously registered with [gstallocators.shmallocator.ShmAllocator.initOnce]. Returns: a #GstAllocator or null if [gstallocators.shmallocator.ShmAllocator.initOn...
void initOnce()Register a #GstShmAllocator using [gst.allocator.Allocator.register] with the name [gstallocators.types.ALLOCATOR_SHM]. This is no-op after the first call.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder for [gstallocators.shm_allocator.ShmAllocator]