Package org.freedesktop.gstreamer.gst
Class MetaInfo
java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.MetaInfo
- All Implemented Interfaces:
Proxy
The
GstMetaInfo provides information about a specific metadata
structure.-
Constructor Summary
ConstructorsConstructorDescriptionMetaInfo()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 MemoryLayoutThe memory layout of the native struct.booleanisCustom()static MetaInfoCreates a new structure that needs to be filled before being registered.readApi()Read the value of the fieldapi.@Nullable MetaClearFunctionRead the value of the fieldclear_func.@Nullable MetaDeserializeFunctionRead the value of the fielddeserialize_func.@Nullable MetaFreeFunctionRead the value of the fieldfree_func.@Nullable MetaInitFunctionRead the value of the fieldinit_func.@Nullable MetaSerializeFunctionRead the value of the fieldserialize_func.longreadSize()Read the value of the fieldsize.@Nullable MetaTransformFunctionRead the value of the fieldtransform_func.readType()Read the value of the fieldtype.register()Registers a new meta.voidWrite a value in the fieldapi.voidwriteClearFunc(@Nullable MetaClearFunction clearFunc, Arena _arena) Write a value in the fieldclear_func.voidwriteDeserializeFunc(@Nullable MetaDeserializeFunction deserializeFunc, Arena _arena) Write a value in the fielddeserialize_func.voidwriteFreeFunc(@Nullable MetaFreeFunction freeFunc, Arena _arena) Write a value in the fieldfree_func.voidwriteInitFunc(@Nullable MetaInitFunction initFunc, Arena _arena) Write a value in the fieldinit_func.voidwriteSerializeFunc(@Nullable MetaSerializeFunction serializeFunc, Arena _arena) Write a value in the fieldserialize_func.voidwriteSize(long size) Write a value in the fieldsize.voidwriteTransformFunc(@Nullable MetaTransformFunction transformFunc, Arena _arena) Write a value in the fieldtransform_func.voidWrite a value in the fieldtype.Methods inherited from class org.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 fieldapitype- value for the fieldtypesize- value for the fieldsizeinitFunc- value for the fieldinitFuncfreeFunc- value for the fieldfreeFunctransformFunc- value for the fieldtransformFuncserializeFunc- value for the fieldserializeFuncdeserializeFunc- value for the fielddeserializeFuncclearFunc- value for the fieldclearFuncarena- 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 fieldapitype- value for the fieldtypesize- value for the fieldsizeinitFunc- value for the fieldinitFuncfreeFunc- value for the fieldfreeFunctransformFunc- value for the fieldtransformFuncserializeFunc- value for the fieldserializeFuncdeserializeFunc- value for the fielddeserializeFuncclearFunc- 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 theGstMetaAPIimpl- the name of theGstMetaimplementationsize- the size of theGstMetastructure- Returns:
- a new
GstMetaInfothat needs to be filled - Since:
- 1.24
-
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
- Since:
- 1.24
-