Package org.freedesktop.gstreamer.gst
Class CustomMeta
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.CustomMeta
- All Implemented Interfaces:
Proxy
Extra custom metadata. The
structure
field is the same as returned by
gst_custom_meta_get_structure().
Since 1.24 it can be serialized using gst_meta_serialize() and
gst_meta_deserialize(), but only if the GstStructure
does not contain any
fields that cannot be serialized, see SerializeFlags.STRICT
.
-
Constructor Summary
ConstructorDescriptionAllocate a new CustomMeta.CustomMeta
(Arena arena) Allocate a new CustomMeta.CustomMeta
(MemorySegment address) Create a CustomMeta proxy instance for the provided memory address.CustomMeta
(Meta meta, Structure structure) Allocate a new CustomMeta with the fields set to the provided values.CustomMeta
(Meta meta, Structure structure, Arena arena) Allocate a new CustomMeta with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.Retrieve theGstStructure
backing a custom meta, the structure's mutability is conditioned to the writability of theGstBuffer
this CustomMeta is attached to.boolean
Checks whether the name of the custom meta isname
readMeta()
Read the value of the fieldmeta
.Read the value of the fieldstructure
.void
Write a value in the fieldmeta
.void
writeStructure
(Structure structure) Write a value in the fieldstructure
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
CustomMeta
Create a CustomMeta proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
CustomMeta
Allocate a new CustomMeta.- Parameters:
arena
- to control the memory allocation scope
-
CustomMeta
public CustomMeta()Allocate a new CustomMeta. The memory is allocated withArena.ofAuto()
. -
CustomMeta
-
CustomMeta
Allocate a new CustomMeta with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
meta
- value for the fieldmeta
structure
- value for the fieldstructure
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readMeta
-
writeMeta
Write a value in the fieldmeta
.- Parameters:
meta
- The new value for the fieldmeta
-
readStructure
Read the value of the fieldstructure
.- Returns:
- The value of the field
structure
-
writeStructure
Write a value in the fieldstructure
.- Parameters:
structure
- The new value for the fieldstructure
-
getStructure
Retrieve theGstStructure
backing a custom meta, the structure's mutability is conditioned to the writability of theGstBuffer
this CustomMeta is attached to.- Returns:
- the
GstStructure
backing this CustomMeta
-
hasName
Checks whether the name of the custom meta isname
- Returns:
- Whether
name
is the name of the custom meta
-