Package org.freedesktop.gstreamer.gst
Class ParentBufferMeta
java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.ParentBufferMeta
- All Implemented Interfaces:
Proxy
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 Summary
ConstructorsConstructorDescriptionAllocate a new ParentBufferMeta.ParentBufferMeta(Arena arena) Allocate a new ParentBufferMeta.ParentBufferMeta(MemorySegment address) Create a ParentBufferMeta proxy instance for the provided memory address.ParentBufferMeta(Meta parent, Buffer buffer) Allocate a new ParentBufferMeta with the fields set to the provided values.ParentBufferMeta(Meta parent, Buffer buffer, Arena arena) Allocate a new ParentBufferMeta with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetaInfogetInfo()Gets the globalGstMetaInfodescribing theGstParentBufferMetameta.static MemoryLayoutThe memory layout of the native struct.Read the value of the fieldbuffer.@Nullable MetaRead the value of the fieldparent.voidwriteBuffer(Buffer buffer) Write a value in the fieldbuffer.voidwriteParent(@Nullable Meta parent) Write a value in the fieldparent.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ParentBufferMeta
Create a ParentBufferMeta proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
ParentBufferMeta
Allocate a new ParentBufferMeta.- Parameters:
arena- to control the memory allocation scope
-
ParentBufferMeta
public ParentBufferMeta()Allocate a new ParentBufferMeta. The memory is allocated withArena.ofAuto(). -
ParentBufferMeta
-
ParentBufferMeta
Allocate a new ParentBufferMeta with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
parent- value for the fieldparentbuffer- value for the fieldbuffer
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readParent
Read the value of the fieldparent.- Returns:
- The value of the field
parent
-
writeParent
Write a value in the fieldparent.- Parameters:
parent- The new value for the fieldparent
-
readBuffer
Read the value of the fieldbuffer.- Returns:
- The value of the field
buffer
-
writeBuffer
Write a value in the fieldbuffer.- Parameters:
buffer- The new value for the fieldbuffer
-
getInfo
Gets the globalGstMetaInfodescribing theGstParentBufferMetameta.- Returns:
- The
GstMetaInfo - Since:
- 1.6
-