Package org.freedesktop.gstreamer.gst
Class MetaInfo
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.MetaInfo
- All Implemented Interfaces:
Proxy
The
GstMetaInfo
provides information about a specific metadata
structure.-
Constructor Summary
ConstructorDescriptionMetaInfo()
Allocate a new MetaInfo.Allocate a new MetaInfo.MetaInfo
(MemorySegment address) Create a MetaInfo proxy instance for the provided memory address.MetaInfo
(Type api, Type type, long size, MetaInitFunction initFunc, MetaFreeFunction freeFunc, MetaTransformFunction transformFunc, MetaSerializeFunction serializeFunc, MetaDeserializeFunction deserializeFunc, MetaClearFunction clearFunc) Allocate a new MetaInfo with the fields set to the provided values.MetaInfo
(Type api, Type type, long size, MetaInitFunction initFunc, MetaFreeFunction freeFunc, MetaTransformFunction transformFunc, MetaSerializeFunction serializeFunc, MetaDeserializeFunction deserializeFunc, MetaClearFunction clearFunc, Arena arena) Allocate a new MetaInfo with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.boolean
isCustom()
static MetaInfo
Creates a new structure that needs to be filled before being registered.readApi()
Read the value of the fieldapi
.Read the value of the fieldclear_func
.Read the value of the fielddeserialize_func
.Read the value of the fieldfree_func
.Read the value of the fieldinit_func
.Read the value of the fieldserialize_func
.long
readSize()
Read the value of the fieldsize
.Read the value of the fieldtransform_func
.readType()
Read the value of the fieldtype
.register()
Registers a new meta.void
Write a value in the fieldapi
.void
writeClearFunc
(MetaClearFunction clearFunc, Arena _arena) Write a value in the fieldclear_func
.void
writeDeserializeFunc
(MetaDeserializeFunction deserializeFunc, Arena _arena) Write a value in the fielddeserialize_func
.void
writeFreeFunc
(MetaFreeFunction freeFunc, Arena _arena) Write a value in the fieldfree_func
.void
writeInitFunc
(MetaInitFunction initFunc, Arena _arena) Write a value in the fieldinit_func
.void
writeSerializeFunc
(MetaSerializeFunction serializeFunc, Arena _arena) Write a value in the fieldserialize_func
.void
writeSize
(long size) Write a value in the fieldsize
.void
writeTransformFunc
(MetaTransformFunction transformFunc, Arena _arena) Write a value in the fieldtransform_func
.void
Write a value in the fieldtype
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
MetaInfo
Create a MetaInfo proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
MetaInfo
Allocate a new MetaInfo.- Parameters:
arena
- to control the memory allocation scope
-
MetaInfo
public MetaInfo()Allocate a new MetaInfo. The memory is allocated withArena.ofAuto()
. -
MetaInfo
public MetaInfo(Type api, Type type, long size, MetaInitFunction initFunc, MetaFreeFunction freeFunc, MetaTransformFunction transformFunc, MetaSerializeFunction serializeFunc, MetaDeserializeFunction deserializeFunc, MetaClearFunction clearFunc, Arena arena) Allocate a new MetaInfo with the fields set to the provided values.- Parameters:
api
- value for the fieldapi
type
- value for the fieldtype
size
- value for the fieldsize
initFunc
- value for the fieldinitFunc
freeFunc
- value for the fieldfreeFunc
transformFunc
- value for the fieldtransformFunc
serializeFunc
- value for the fieldserializeFunc
deserializeFunc
- value for the fielddeserializeFunc
clearFunc
- value for the fieldclearFunc
arena
- to control the memory allocation scope
-
MetaInfo
public MetaInfo(Type api, Type type, long size, MetaInitFunction initFunc, MetaFreeFunction freeFunc, MetaTransformFunction transformFunc, MetaSerializeFunction serializeFunc, MetaDeserializeFunction deserializeFunc, MetaClearFunction clearFunc) Allocate a new MetaInfo with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
api
- value for the fieldapi
type
- value for the fieldtype
size
- value for the fieldsize
initFunc
- value for the fieldinitFunc
freeFunc
- value for the fieldfreeFunc
transformFunc
- value for the fieldtransformFunc
serializeFunc
- value for the fieldserializeFunc
deserializeFunc
- value for the fielddeserializeFunc
clearFunc
- value for the fieldclearFunc
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readApi
-
writeApi
Write a value in the fieldapi
.- Parameters:
api
- The new value for the fieldapi
-
readType
-
writeType
Write a value in the fieldtype
.- Parameters:
type
- The new value for the fieldtype
-
readSize
public long readSize()Read the value of the fieldsize
.- Returns:
- The value of the field
size
-
writeSize
public void writeSize(long size) Write a value in the fieldsize
.- Parameters:
size
- The new value for the fieldsize
-
readInitFunc
Read the value of the fieldinit_func
.- Returns:
- The value of the field
init_func
-
writeInitFunc
Write a value in the fieldinit_func
.- Parameters:
initFunc
- The new value for the fieldinit_func
_arena
- to control the memory allocation scope
-
readFreeFunc
Read the value of the fieldfree_func
.- Returns:
- The value of the field
free_func
-
writeFreeFunc
Write a value in the fieldfree_func
.- Parameters:
freeFunc
- The new value for the fieldfree_func
_arena
- to control the memory allocation scope
-
readTransformFunc
Read the value of the fieldtransform_func
.- Returns:
- The value of the field
transform_func
-
writeTransformFunc
Write a value in the fieldtransform_func
.- Parameters:
transformFunc
- The new value for the fieldtransform_func
_arena
- to control the memory allocation scope
-
readSerializeFunc
Read the value of the fieldserialize_func
.- Returns:
- The value of the field
serialize_func
-
writeSerializeFunc
Write a value in the fieldserialize_func
.- Parameters:
serializeFunc
- The new value for the fieldserialize_func
_arena
- to control the memory allocation scope
-
readDeserializeFunc
Read the value of the fielddeserialize_func
.- Returns:
- The value of the field
deserialize_func
-
writeDeserializeFunc
Write a value in the fielddeserialize_func
.- Parameters:
deserializeFunc
- The new value for the fielddeserialize_func
_arena
- to control the memory allocation scope
-
readClearFunc
Read the value of the fieldclear_func
.- Returns:
- The value of the field
clear_func
-
writeClearFunc
Write a value in the fieldclear_func
.- Parameters:
clearFunc
- The new value for the fieldclear_func
_arena
- to control the memory allocation scope
-
new_
Creates a new structure that needs to be filled before being registered. This structure should filled and then registered with gst_meta_info_register().Example:
const GstMetaInfo * gst_my_meta_get_info (void) { static const GstMetaInfo *meta_info = NULL; if (g_once_init_enter ((GstMetaInfo **) & meta_info)) { GstMetaInfo *info = gst_meta_info_new ( gst_my_meta_api_get_type (), "GstMyMeta", sizeof (GstMyMeta)); const GstMetaInfo *meta = NULL; info->init_func = my_meta_init; info->free_func = my_meta_free; info->transform_func = my_meta_transform; info->serialize_func = my_meta_serialize; info->deserialize_func = my_meta_deserialize; meta = gst_meta_info_register (info); g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) meta); } return meta_info; }
- Parameters:
api
- the type of theGstMeta
APIimpl
- the name of theGstMeta
implementationsize
- the size of theGstMeta
structure- Returns:
- a new
GstMetaInfo
that needs to be filled
-
isCustom
public boolean isCustom() -
register
Registers a new meta.Use the structure returned by gst_meta_info_new(), it consumes it and the structure shouldnt be used after. The one returned by the function can be kept.
- Returns:
- the registered meta
-