Package org.freedesktop.gstreamer.gst
Class ParentBufferMeta
java.lang.Object
io.github.jwharm.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.
-
Constructor Summary
ConstructorDescriptionAllocate 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 MetaInfo
getInfo()
Gets the globalGstMetaInfo
describing theGstParentBufferMeta
meta.static MemoryLayout
The memory layout of the native struct.Read the value of the fieldbuffer
.Read the value of the fieldparent
.void
writeBuffer
(Buffer buffer) Write a value in the fieldbuffer
.void
writeParent
(Meta parent) Write a value in the fieldparent
.Methods inherited from class io.github.jwharm.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 fieldparent
buffer
- value for the fieldbuffer
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readParent
-
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 globalGstMetaInfo
describing theGstParentBufferMeta
meta.- Returns:
- The
GstMetaInfo
-