Klasse Allocator

Alle implementierten Schnittstellen:
PointerInterface

public class Allocator extends PropertyHolder
Memory is usually created by allocators with a gst_allocator_alloc()
method call. When %NULL is used as the allocator, the default allocator will
be used.

New allocators can be registered with gst_allocator_register().
Allocators are identified by name and can be retrieved with
gst_allocator_find(). gst_allocator_set_default() can be used to change the
default allocator.

New memory can be created with gst_memory_new_wrapped() that wraps the memory
allocated elsewhere.

https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • alloc

      public Memory alloc(long size, @Nullable AllocationParams params)
      Use @allocator to allocate a new memory block with memory that is at least
      @size big.

      The optional @params can specify the prefix and padding for the memory. If
      %NULL is passed, no flags, no extra prefix/padding and a default alignment is
      used.

      The prefix/padding will be filled with 0 if flags contains
      #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively.

      When @allocator is %NULL, the default allocator will be used.

      The alignment in @params is given as a bitmask so that @align + 1 equals
      the amount of bytes to align to. For example, to align to 8 bytes,
      use an alignment of 7.
      Parameter:
      size - size of the visible memory area
      params - optional parameters
      Gibt zurück:
      a new #GstMemory.
    • free

      public void free(@Nonnull Memory memory)
      Free @memory that was previously allocated with gst_allocator_alloc().
      Parameter:
      memory - the memory to free
    • setDefault

      public void setDefault()
      Set the default allocator.
    • find

      public static Allocator find(@Nullable Str name)
      Find a previously registered allocator with @name. When @name is %NULL, the
      default allocator will be returned.
      Parameter:
      name - the name of the allocator
      Gibt zurück:
      a #GstAllocator or %NULL when the allocator with @name was not registered.
    • register

      public static void register(@Nonnull Str name, @Nonnull Allocator allocator)
      Registers the memory @allocator with @name.
      Parameter:
      name - the name of the allocator
      allocator - #GstAllocator
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()