Class ParentBufferMeta

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.ParentBufferMeta
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ParentBufferMeta extends ProxyInstance

The GstParentBufferMeta is a GstMeta which can be attached to a GstBuffer to hold a reference to another buffer that is only released when the child GstBuffer is released.

Typically, GstParentBufferMeta is used when the child buffer is directly using the GstMemory of the parent buffer, and wants to prevent the parent buffer from being returned to a buffer pool until the GstMemory is available for re-use.

Since:
1.6
  • Constructor Details

    • ParentBufferMeta

      public ParentBufferMeta(MemorySegment address)
      Create a ParentBufferMeta proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ParentBufferMeta

      public ParentBufferMeta(Arena arena)
      Allocate a new ParentBufferMeta.
      Parameters:
      arena - to control the memory allocation scope
    • ParentBufferMeta

      public ParentBufferMeta()
      Allocate a new ParentBufferMeta. The memory is allocated with Arena.ofAuto().
    • ParentBufferMeta

      public ParentBufferMeta(Meta parent, Buffer buffer, Arena arena)
      Allocate a new ParentBufferMeta with the fields set to the provided values.
      Parameters:
      parent - value for the field parent
      buffer - value for the field buffer
      arena - to control the memory allocation scope
    • ParentBufferMeta

      public ParentBufferMeta(Meta parent, Buffer buffer)
      Allocate a new ParentBufferMeta with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      parent - value for the field parent
      buffer - value for the field buffer
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readParent

      public @Nullable Meta readParent()
      Read the value of the field parent.
      Returns:
      The value of the field parent
    • writeParent

      public void writeParent(@Nullable Meta parent)
      Write a value in the field parent.
      Parameters:
      parent - The new value for the field parent
    • readBuffer

      public Buffer readBuffer()
      Read the value of the field buffer.
      Returns:
      The value of the field buffer
    • writeBuffer

      public void writeBuffer(Buffer buffer)
      Write a value in the field buffer.
      Parameters:
      buffer - The new value for the field buffer
    • getInfo

      public static MetaInfo getInfo()
      Gets the global GstMetaInfo describing the GstParentBufferMeta meta.
      Returns:
      The GstMetaInfo
      Since:
      1.6