GstMeta
The GstMeta structure should be included as the first member of a GstBuffer metadata structure. The structure defines the API of the metadata and should be accessible to all elements using the metadata.
A metadata API is registered with gst_meta_api_type_register which takes a name for the metadata API and some tags associated with the metadata. With gst_meta_api_type_has_tag one can check if a certain metadata API contains a given tag.
Multiple implementations of a metadata API can be registered. To implement a metadata API, gst_meta_register should be used. This function takes all parameters needed to create, free and transform metadata along with the size of the metadata. The function returns a GstMetaInfo structure that contains the information for the implementation of the API.
A specific implementation can be retrieved by name with gst_meta_get_info.
See GstBuffer for how the metadata can be added, retrieved and removed from buffers.
GstCustomMeta
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 GST_SERIALIZE_FLAG_STRICT.
Members
structure
(GstStructure *)
–
GstStructure containing custom metadata.
Since : 1.20
Gst.CustomMeta
Extra custom metadata. The structure field is the same as returned by Gst.CustomMeta.prototype.get_structure.
Since 1.24 it can be serialized using Gst.Meta.prototype.serialize and Gst.prototype.meta_deserialize, but only if the Gst.Structure does not contain any fields that cannot be serialized, see Gst.SerializeFlags.STRICT.
Members
structure
(Gst.Structure)
–
Gst.Structure containing custom metadata.
Since : 1.20
Gst.CustomMeta
Extra custom metadata. The structure field is the same as returned by Gst.CustomMeta.get_structure.
Since 1.24 it can be serialized using Gst.Meta.serialize and Gst.meta_deserialize, but only if the Gst.Structure does not contain any fields that cannot be serialized, see Gst.SerializeFlags.STRICT.
Members
structure
(Gst.Structure)
–
Gst.Structure containing custom metadata.
Since : 1.20
Methods
gst_custom_meta_get_structure
GstStructure * gst_custom_meta_get_structure (GstCustomMeta * meta)
Retrieve the GstStructure backing a custom meta, the structure's mutability is conditioned to the writability of the GstBuffer meta is attached to.
Parameters:
meta
–
the GstStructure backing meta
Since : 1.20
Gst.CustomMeta.prototype.get_structure
function Gst.CustomMeta.prototype.get_structure(): {
// javascript wrapper for 'gst_custom_meta_get_structure'
}
Retrieve the Gst.Structure backing a custom meta, the structure's mutability is conditioned to the writability of the Gst.Buffer meta is attached to.
Parameters:
the Gst.Structure backing meta
Since : 1.20
Gst.CustomMeta.get_structure
def Gst.CustomMeta.get_structure (self):
#python wrapper for 'gst_custom_meta_get_structure'
Retrieve the Gst.Structure backing a custom meta, the structure's mutability is conditioned to the writability of the Gst.Buffer meta is attached to.
Parameters:
the Gst.Structure backing meta
Since : 1.20
gst_custom_meta_has_name
gboolean gst_custom_meta_has_name (GstCustomMeta * meta, const gchar * name)
Checks whether the name of the custom meta is name
Parameters:
meta
–
name
–
Whether name is the name of the custom meta
Since : 1.20
Gst.CustomMeta.prototype.has_name
function Gst.CustomMeta.prototype.has_name(name: String): {
// javascript wrapper for 'gst_custom_meta_has_name'
}
Checks whether the name of the custom meta is name
Parameters:
Whether name is the name of the custom meta
Since : 1.20
Gst.CustomMeta.has_name
def Gst.CustomMeta.has_name (self, name):
#python wrapper for 'gst_custom_meta_has_name'
Checks whether the name of the custom meta is name
Whether name is the name of the custom meta
Since : 1.20
GstMeta
Base structure for metadata. Custom metadata will put this structure as the first member of their structure.
Members
flags
(GstMetaFlags)
–
extra flags for the metadata
info
(const GstMetaInfo *)
–
pointer to the GstMetaInfo
Gst.Meta
Base structure for metadata. Custom metadata will put this structure as the first member of their structure.
Members
flags
(Gst.MetaFlags)
–
extra flags for the metadata
info
(Gst.MetaInfo)
–
pointer to the Gst.MetaInfo
Gst.Meta
Base structure for metadata. Custom metadata will put this structure as the first member of their structure.
Members
flags
(Gst.MetaFlags)
–
extra flags for the metadata
info
(Gst.MetaInfo)
–
pointer to the Gst.MetaInfo
Methods
gst_meta_compare_seqnum
gint gst_meta_compare_seqnum (const GstMeta * meta1, const GstMeta * meta2)
Meta sequence number compare function. Can be used as GCompareFunc or a GCompareDataFunc.
a negative number if meta1 comes before meta2, 0 if both metas have an equal sequence number, or a positive integer if meta1 comes after meta2.
Since : 1.16
Gst.Meta.prototype.compare_seqnum
function Gst.Meta.prototype.compare_seqnum(meta2: Gst.Meta): {
// javascript wrapper for 'gst_meta_compare_seqnum'
}
Meta sequence number compare function. Can be used as GLib.CompareFunc or a GLib.CompareDataFunc.
a negative number if meta1 comes before meta2, 0 if both metas have an equal sequence number, or a positive integer if meta1 comes after meta2.
Since : 1.16
Gst.Meta.compare_seqnum
def Gst.Meta.compare_seqnum (self, meta2):
#python wrapper for 'gst_meta_compare_seqnum'
Meta sequence number compare function. Can be used as GLib.CompareFunc or a GLib.CompareDataFunc.
a negative number if meta1 comes before meta2, 0 if both metas have an equal sequence number, or a positive integer if meta1 comes after meta2.
Since : 1.16
gst_meta_get_seqnum
guint64 gst_meta_get_seqnum (const GstMeta * meta)
Gets seqnum for this meta.
Parameters:
meta
–
a GstMeta
Since : 1.16
Gst.Meta.prototype.get_seqnum
function Gst.Meta.prototype.get_seqnum(): {
// javascript wrapper for 'gst_meta_get_seqnum'
}
Gets seqnum for this meta.
Since : 1.16
gst_meta_serialize
gboolean gst_meta_serialize (const GstMeta * meta, GstByteArrayInterface * data)
Serialize meta into a format that can be stored or transmitted and later deserialized by gst_meta_deserialize.
This is only supported for meta that implements serialize_func, FALSE is returned otherwise.
Upon failure, data->data pointer could have been reallocated, but data->len won't be modified. This is intended to be able to append multiple metas into the same GByteArray.
Since serialization size is often the same for every buffer, caller may want to remember the size of previous data to preallocate the next.
Since : 1.24
Gst.Meta.prototype.serialize
function Gst.Meta.prototype.serialize(data: Gst.ByteArrayInterface): {
// javascript wrapper for 'gst_meta_serialize'
}
Serialize meta into a format that can be stored or transmitted and later deserialized by Gst.prototype.meta_deserialize.
This is only supported for meta that implements serialize_func, false is returned otherwise.
Upon failure, data->data pointer could have been reallocated, but data->len won't be modified. This is intended to be able to append multiple metas into the same GByteArray (not introspectable).
Since serialization size is often the same for every buffer, caller may want to remember the size of previous data to preallocate the next.
Parameters:
Gst.ByteArrayInterface to append serialization data
Since : 1.24
Gst.Meta.serialize
def Gst.Meta.serialize (self, data):
#python wrapper for 'gst_meta_serialize'
Serialize meta into a format that can be stored or transmitted and later deserialized by Gst.meta_deserialize.
This is only supported for meta that implements serialize_func, False is returned otherwise.
Upon failure, data->data pointer could have been reallocated, but data->len won't be modified. This is intended to be able to append multiple metas into the same GByteArray (not introspectable).
Since serialization size is often the same for every buffer, caller may want to remember the size of previous data to preallocate the next.
Parameters:
Gst.ByteArrayInterface to append serialization data
Since : 1.24
gst_meta_serialize_simple
gboolean gst_meta_serialize_simple (const GstMeta * meta, GByteArray * data)
Same as gst_meta_serialize but with a GByteArray instead of GstByteArrayInterface.
Since : 1.24
Gst.Meta.prototype.serialize_simple
function Gst.Meta.prototype.serialize_simple(data: [ Number ]): {
// javascript wrapper for 'gst_meta_serialize_simple'
}
Same as Gst.Meta.prototype.serialize but with a GByteArray (not introspectable) instead of Gst.ByteArrayInterface.
Parameters:
GByteArray (not introspectable) to append serialization data
Since : 1.24
Gst.Meta.serialize_simple
def Gst.Meta.serialize_simple (self, data):
#python wrapper for 'gst_meta_serialize_simple'
Same as Gst.Meta.serialize but with a GByteArray (not introspectable) instead of Gst.ByteArrayInterface.
Parameters:
GByteArray (not introspectable) to append serialization data
Since : 1.24
Functions
gst_meta_api_type_aggregate_params
gboolean gst_meta_api_type_aggregate_params (GType api, GstStructure ** aggregated_params, const GstStructure * params0, const GstStructure * params1)
When a element like tee
decides the allocation, each downstream element may
fill different parameters and pass them to gst_query_add_allocation_meta.
In order to keep these parameters, a merge operation is needed. This
aggregate function can combine the parameters from params0 and param1, and
write the result back into aggregated_params.
Parameters:
api
–
the GType of the API for which the parameters are being aggregated.
aggregated_params
–
This structure will be updated with the combined parameters from both params0 and params1.
params0
–
a GstStructure containing the new parameters to be aggregated.
params1
–
a GstStructure containing the new parameters to be aggregated.
Since : 1.26
Gst.prototype.meta_api_type_aggregate_params
function Gst.prototype.meta_api_type_aggregate_params(api: GObject.Type, aggregated_params: Gst.Structure, params0: Gst.Structure, params1: Gst.Structure): {
// javascript wrapper for 'gst_meta_api_type_aggregate_params'
}
When a element like tee
decides the allocation, each downstream element may
fill different parameters and pass them to Gst.Query.prototype.add_allocation_meta.
In order to keep these parameters, a merge operation is needed. This
aggregate function can combine the parameters from params0 and param1, and
write the result back into aggregated_params.
Parameters:
the GType of the API for which the parameters are being aggregated.
This structure will be updated with the combined parameters from both params0 and params1.
a Gst.Structure containing the new parameters to be aggregated.
a Gst.Structure containing the new parameters to be aggregated.
Since : 1.26
Gst.meta_api_type_aggregate_params
def Gst.meta_api_type_aggregate_params (api, aggregated_params, params0, params1):
#python wrapper for 'gst_meta_api_type_aggregate_params'
When a element like tee
decides the allocation, each downstream element may
fill different parameters and pass them to Gst.Query.add_allocation_meta.
In order to keep these parameters, a merge operation is needed. This
aggregate function can combine the parameters from params0 and param1, and
write the result back into aggregated_params.
Parameters:
the GType of the API for which the parameters are being aggregated.
This structure will be updated with the combined parameters from both params0 and params1.
a Gst.Structure containing the new parameters to be aggregated.
a Gst.Structure containing the new parameters to be aggregated.
Since : 1.26
gst_meta_api_type_get_tags
const gchar*const ** gst_meta_api_type_get_tags (GType api)
Parameters:
api
–
an API
an array of tags as strings.
Since : 1.2
Gst.prototype.meta_api_type_get_tags
function Gst.prototype.meta_api_type_get_tags(api: GObject.Type): {
// javascript wrapper for 'gst_meta_api_type_get_tags'
}
Parameters:
an API
an array of tags as strings.
Since : 1.2
Gst.meta_api_type_get_tags
def Gst.meta_api_type_get_tags (api):
#python wrapper for 'gst_meta_api_type_get_tags'
Parameters:
an API
an array of tags as strings.
Since : 1.2
gst_meta_api_type_has_tag
gboolean gst_meta_api_type_has_tag (GType api, GQuark tag)
Check if api was registered with tag.
Parameters:
api
–
an API
tag
–
the tag to check
TRUE if api was registered with tag.
Gst.prototype.meta_api_type_has_tag
function Gst.prototype.meta_api_type_has_tag(api: GObject.Type, tag: GLib.Quark): {
// javascript wrapper for 'gst_meta_api_type_has_tag'
}
Check if api was registered with tag.
Gst.meta_api_type_has_tag
def Gst.meta_api_type_has_tag (api, tag):
#python wrapper for 'gst_meta_api_type_has_tag'
Check if api was registered with tag.
gst_meta_api_type_register
GType gst_meta_api_type_register (const gchar * api, const gchar ** tags)
Register and return a GType for the api and associate it with tags.
Parameters:
api
–
an API to register
tags
(
[arrayzero-terminated=1])
–
tags for api
a unique GType for api.
Gst.prototype.meta_api_type_register
function Gst.prototype.meta_api_type_register(api: String, tags: [ String ]): {
// javascript wrapper for 'gst_meta_api_type_register'
}
Register and return a GType for the api and associate it with tags.
a unique GType for api.
Gst.meta_api_type_register
def Gst.meta_api_type_register (api, tags):
#python wrapper for 'gst_meta_api_type_register'
Register and return a GType for the api and associate it with tags.
a unique GType for api.
gst_meta_api_type_set_params_aggregator
gst_meta_api_type_set_params_aggregator (GType api, GstAllocationMetaParamsAggregator aggregator)
This function sets the aggregator function for a specific API type.
Parameters:
api
–
the GType of the API for which the aggregator function is being set.
aggregator
–
the aggregator function to be associated with the given API type.
Since : 1.26
gst_meta_deserialize
GstMeta * gst_meta_deserialize (GstBuffer * buffer, const guint8 * data, gsize size, guint32 * consumed)
Recreate a GstMeta from serialized data returned by gst_meta_serialize and add it to buffer.
Note that the meta must have been previously registered by calling one of
gst_*_meta_get_info ()
functions.
consumed is set to the number of bytes that can be skipped from data to find the next meta serialization, if any. In case of parsing error that does not allow to determine that size, consumed is set to 0.
Parameters:
buffer
–
data
–
serialization data obtained from gst_meta_serialize
size
–
size of data
consumed
(
[out])
–
total size used by this meta, could be less than size
the metadata owned by buffer, or NULL.
Since : 1.24
Gst.prototype.meta_deserialize
function Gst.prototype.meta_deserialize(buffer: Gst.Buffer, data: Number, size: Number): {
// javascript wrapper for 'gst_meta_deserialize'
}
Recreate a Gst.Meta from serialized data returned by Gst.Meta.prototype.serialize and add it to buffer.
Note that the meta must have been previously registered by calling one of
gst_*_meta_get_info ()
functions.
consumed is set to the number of bytes that can be skipped from data to find the next meta serialization, if any. In case of parsing error that does not allow to determine that size, consumed is set to 0.
Returns a tuple made of:
Since : 1.24
Gst.meta_deserialize
def Gst.meta_deserialize (buffer, data, size):
#python wrapper for 'gst_meta_deserialize'
Recreate a Gst.Meta from serialized data returned by Gst.Meta.serialize and add it to buffer.
Note that the meta must have been previously registered by calling one of
gst_*_meta_get_info ()
functions.
consumed is set to the number of bytes that can be skipped from data to find the next meta serialization, if any. In case of parsing error that does not allow to determine that size, consumed is set to 0.
Returns a tuple made of:
Since : 1.24
gst_meta_get_info
const GstMetaInfo * gst_meta_get_info (const gchar * impl)
Lookup a previously registered meta info structure by its implementation name impl.
Parameters:
impl
–
the name
a GstMetaInfo with impl, or NULL when no such metainfo exists.
Gst.prototype.meta_get_info
function Gst.prototype.meta_get_info(impl: String): {
// javascript wrapper for 'gst_meta_get_info'
}
Lookup a previously registered meta info structure by its implementation name impl.
Parameters:
the name
a Gst.MetaInfo with impl, or null when no such metainfo exists.
Gst.meta_get_info
def Gst.meta_get_info (impl):
#python wrapper for 'gst_meta_get_info'
Lookup a previously registered meta info structure by its implementation name impl.
Parameters:
the name
a Gst.MetaInfo with impl, or None when no such metainfo exists.
gst_meta_register
const GstMetaInfo * gst_meta_register (GType api, const gchar * impl, gsize size, GstMetaInitFunction init_func, GstMetaFreeFunction free_func, GstMetaTransformFunction transform_func)
Register a new GstMeta implementation.
The same info can be retrieved later with gst_meta_get_info by using impl as the key.
Parameters:
api
–
the type of the GstMeta API
impl
–
the name of the GstMeta implementation
size
–
the size of the GstMeta structure
init_func
–
free_func
–
transform_func
–
a GstMetaInfo that can be used to access metadata.
gst_meta_register_custom
const GstMetaInfo * gst_meta_register_custom (const gchar * name, const gchar ** tags, GstCustomMetaTransformFunction transform_func, gpointer user_data, GDestroyNotify destroy_data)
Register a new custom GstMeta implementation, backed by an opaque structure holding a GstStructure.
The registered info can be retrieved later with gst_meta_get_info by using name as the key.
The backing GstStructure can be retrieved with gst_custom_meta_get_structure, its mutability is conditioned by the writability of the buffer the meta is attached to.
When transform_func is NULL, the meta and its backing GstStructure will always be copied when the transform operation is copy, other operations are discarded, copy regions are ignored.
Parameters:
name
–
the name of the GstMeta implementation
tags
(
[arrayzero-terminated=1])
–
tags for api
transform_func
(
[scope notified][nullable][closure])
–
user_data
–
user data passed to transform_func
destroy_data
–
GDestroyNotify for user_data
a GstMetaInfo that can be used to access metadata.
Since : 1.20
Gst.prototype.meta_register_custom
function Gst.prototype.meta_register_custom(name: String, tags: [ String ], transform_func: Gst.CustomMetaTransformFunction, user_data: Object): {
// javascript wrapper for 'gst_meta_register_custom'
}
Register a new custom Gst.Meta implementation, backed by an opaque structure holding a Gst.Structure.
The registered info can be retrieved later with Gst.prototype.meta_get_info by using name as the key.
The backing Gst.Structure can be retrieved with Gst.CustomMeta.prototype.get_structure, its mutability is conditioned by the writability of the buffer the meta is attached to.
When transform_func is null, the meta and its backing Gst.Structure will always be copied when the transform operation is copy, other operations are discarded, copy regions are ignored.
Parameters:
tags for api
user data passed to transform_func
a Gst.MetaInfo that can be used to access metadata.
Since : 1.20
Gst.meta_register_custom
def Gst.meta_register_custom (name, tags, transform_func, *user_data):
#python wrapper for 'gst_meta_register_custom'
Register a new custom Gst.Meta implementation, backed by an opaque structure holding a Gst.Structure.
The registered info can be retrieved later with Gst.meta_get_info by using name as the key.
The backing Gst.Structure can be retrieved with Gst.CustomMeta.get_structure, its mutability is conditioned by the writability of the buffer the meta is attached to.
When transform_func is None, the meta and its backing Gst.Structure will always be copied when the transform operation is copy, other operations are discarded, copy regions are ignored.
Parameters:
tags for api
user data passed to transform_func
a Gst.MetaInfo that can be used to access metadata.
Since : 1.20
gst_meta_register_custom_simple
const GstMetaInfo * gst_meta_register_custom_simple (const gchar * name)
Simplified version of gst_meta_register_custom, with no tags and no transform function.
Parameters:
name
–
the name of the GstMeta implementation
a GstMetaInfo that can be used to access metadata.
Since : 1.24
Gst.prototype.meta_register_custom_simple
function Gst.prototype.meta_register_custom_simple(name: String): {
// javascript wrapper for 'gst_meta_register_custom_simple'
}
Simplified version of Gst.prototype.meta_register_custom, with no tags and no transform function.
a Gst.MetaInfo that can be used to access metadata.
Since : 1.24
Gst.meta_register_custom_simple
def Gst.meta_register_custom_simple (name):
#python wrapper for 'gst_meta_register_custom_simple'
Simplified version of Gst.meta_register_custom, with no tags and no transform function.
a Gst.MetaInfo that can be used to access metadata.
Since : 1.24
GstMetaInfo
The GstMetaInfo provides information about a specific metadata structure.
Members
api
(GType)
–
tag identifying the metadata structure and api
type
(GType)
–
type identifying the implementor of the api
size
(gsize)
–
size of the metadata
init_func
(GstMetaInitFunction)
–
function for initializing the metadata
free_func
(GstMetaFreeFunction)
–
function for freeing the metadata
transform_func
(GstMetaTransformFunction)
–
function for transforming the metadata
serialize_func
(GstMetaSerializeFunction)
–
Function for serializing the metadata, or NULL if not supported by this meta.
deserialize_func
(GstMetaDeserializeFunction)
–
Function for deserializing the metadata, or NULL if not supported by this meta.
clear_func
(GstMetaClearFunction)
–
Function for clearing the metadata, or NULL if not supported by this meta. This is called by the buffer pool when a buffer is returned for pooled metas.
Gst.MetaInfo
The Gst.MetaInfo provides information about a specific metadata structure.
Members
api
(GObject.Type)
–
tag identifying the metadata structure and api
type
(GObject.Type)
–
type identifying the implementor of the api
size
(Number)
–
size of the metadata
init_func
(Gst.MetaInitFunction)
–
function for initializing the metadata
free_func
(Gst.MetaFreeFunction)
–
function for freeing the metadata
transform_func
(Gst.MetaTransformFunction)
–
function for transforming the metadata
serialize_func
(Gst.MetaSerializeFunction)
–
Function for serializing the metadata, or null if not supported by this meta.
deserialize_func
(Gst.MetaDeserializeFunction)
–
Function for deserializing the metadata, or null if not supported by this meta.
clear_func
(Gst.MetaClearFunction)
–
Function for clearing the metadata, or null if not supported by this meta. This is called by the buffer pool when a buffer is returned for pooled metas.
Gst.MetaInfo
The Gst.MetaInfo provides information about a specific metadata structure.
Members
api
(GObject.Type)
–
tag identifying the metadata structure and api
type
(GObject.Type)
–
type identifying the implementor of the api
size
(int)
–
size of the metadata
init_func
(Gst.MetaInitFunction)
–
function for initializing the metadata
free_func
(Gst.MetaFreeFunction)
–
function for freeing the metadata
transform_func
(Gst.MetaTransformFunction)
–
function for transforming the metadata
serialize_func
(Gst.MetaSerializeFunction)
–
Function for serializing the metadata, or None if not supported by this meta.
deserialize_func
(Gst.MetaDeserializeFunction)
–
Function for deserializing the metadata, or None if not supported by this meta.
clear_func
(Gst.MetaClearFunction)
–
Function for clearing the metadata, or None if not supported by this meta. This is called by the buffer pool when a buffer is returned for pooled metas.
Methods
gst_meta_info_is_custom
gboolean gst_meta_info_is_custom (const GstMetaInfo * info)
Parameters:
info
–
whether info was registered as a GstCustomMeta with gst_meta_register_custom
Since : 1.20
Gst.MetaInfo.prototype.is_custom
function Gst.MetaInfo.prototype.is_custom(): {
// javascript wrapper for 'gst_meta_info_is_custom'
}
Parameters:
whether info was registered as a Gst.CustomMeta with Gst.prototype.meta_register_custom
Since : 1.20
Gst.MetaInfo.is_custom
def Gst.MetaInfo.is_custom (self):
#python wrapper for 'gst_meta_info_is_custom'
Parameters:
whether info was registered as a Gst.CustomMeta with Gst.meta_register_custom
Since : 1.20
gst_meta_info_register
const GstMetaInfo * gst_meta_info_register (GstMetaInfo * info)
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.
Parameters:
info
(
[transfer: full])
–
a new GstMetaInfo created by gst_meta_info_new
the registered meta
Since : 1.24
Gst.MetaInfo.prototype.register
function Gst.MetaInfo.prototype.register(): {
// javascript wrapper for 'gst_meta_info_register'
}
Registers a new meta.
Use the structure returned by gst_meta_info_new (not introspectable), it consumes it and the structure shouldnt be used after. The one returned by the function can be kept.
Parameters:
a new Gst.MetaInfo created by gst_meta_info_new (not introspectable)
the registered meta
Since : 1.24
Gst.MetaInfo.register
def Gst.MetaInfo.register (self):
#python wrapper for 'gst_meta_info_register'
Registers a new meta.
Use the structure returned by gst_meta_info_new (not introspectable), it consumes it and the structure shouldnt be used after. The one returned by the function can be kept.
Parameters:
a new Gst.MetaInfo created by gst_meta_info_new (not introspectable)
the registered meta
Since : 1.24
Functions
gst_meta_info_new
GstMetaInfo * gst_meta_info_new (GType api, const gchar * impl, gsize size)
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 the GstMeta API
impl
–
the name of the GstMeta implementation
size
–
the size of the GstMeta structure
a new GstMetaInfo that needs to be filled
Since : 1.24
Gst.MetaTransformCopy
Extra data passed to a "gst-copy" transform Gst.MetaTransformFunction.
Members
Function Macros
GST_META_CAST
#define GST_META_CAST(meta) ((GstMeta *)(meta))
GST_META_FLAGS
#define GST_META_FLAGS(meta) (GST_META_CAST (meta)->flags)
A flags word containing GstMetaFlags flags set on meta
Parameters:
meta
–
a GstMeta.
GST_META_FLAG_IS_SET
#define GST_META_FLAG_IS_SET(meta,flag) !!(GST_META_FLAGS (meta) & (flag))
Gives the status of a specific flag on a metadata.
GST_META_FLAG_SET
#define GST_META_FLAG_SET(meta,flag) (GST_META_FLAGS (meta) |= (flag))
Sets a metadata flag on a metadata.
GST_META_FLAG_UNSET
#define GST_META_FLAG_UNSET(meta,flag) (GST_META_FLAGS (meta) &= ~(flag))
Clears a metadata flag.
GST_META_TRANSFORM_IS_COPY
#define GST_META_TRANSFORM_IS_COPY(type) ((type) == _gst_meta_transform_copy)
Check if the transform type is a copy transform
Parameters:
type
–
a transform type
Enumerations
GstMetaFlags
Extra metadata flags.
Members
GST_META_FLAG_NONE
(0)
–
no flags
GST_META_FLAG_READONLY
(1)
–
metadata should not be modified
GST_META_FLAG_POOLED
(2)
–
metadata is managed by a bufferpool
GST_META_FLAG_LOCKED
(4)
–
metadata should not be removed
GST_META_FLAG_LAST
(65536)
–
additional flags can be added starting from this flag.
Gst.MetaFlags
Extra metadata flags.
Members
Gst.MetaFlags.NONE
(0)
–
no flags
Gst.MetaFlags.READONLY
(1)
–
metadata should not be modified
Gst.MetaFlags.POOLED
(2)
–
metadata is managed by a bufferpool
Gst.MetaFlags.LOCKED
(4)
–
metadata should not be removed
Gst.MetaFlags.LAST
(65536)
–
additional flags can be added starting from this flag.
Gst.MetaFlags
Extra metadata flags.
Members
Gst.MetaFlags.NONE
(0)
–
no flags
Gst.MetaFlags.READONLY
(1)
–
metadata should not be modified
Gst.MetaFlags.POOLED
(2)
–
metadata is managed by a bufferpool
Gst.MetaFlags.LOCKED
(4)
–
metadata should not be removed
Gst.MetaFlags.LAST
(65536)
–
additional flags can be added starting from this flag.
Constants
GST_META_TAG_MEMORY
#define GST_META_TAG_MEMORY (_gst_meta_tag_memory)
Metadata tagged with this tag depends on the particular memory or buffer that it is on.
deprecated : The GQuarks are not exported by any public API, use GST_META_TAG_MEMORY_STR instead.
GST_META_TAG_MEMORY_REFERENCE_STR
#define GST_META_TAG_MEMORY_REFERENCE_STR "memory-reference"
This metadata stays relevant until a deep copy is made.
Since : 1.20.4
Gst.META_TAG_MEMORY_REFERENCE_STR
This metadata stays relevant until a deep copy is made.
Since : 1.20.4
Gst.META_TAG_MEMORY_REFERENCE_STR
This metadata stays relevant until a deep copy is made.
Since : 1.20.4
GST_META_TAG_MEMORY_STR
#define GST_META_TAG_MEMORY_STR "memory"
This metadata stays relevant as long as memory layout is unchanged. In hindsight, this tag should have been called "memory-layout".
Since : 1.2
Gst.META_TAG_MEMORY_STR
This metadata stays relevant as long as memory layout is unchanged. In hindsight, this tag should have been called "memory-layout".
Since : 1.2
Gst.META_TAG_MEMORY_STR
This metadata stays relevant as long as memory layout is unchanged. In hindsight, this tag should have been called "memory-layout".
Since : 1.2
Callbacks
GstAllocationMetaParamsAggregator
gboolean (*GstAllocationMetaParamsAggregator) (GstStructure ** aggregated_params, const GstStructure * params0, const GstStructure * params1)
The aggregator function will combine the parameters from params0 and param1 and write the result back into aggregated_params.
Parameters:
aggregated_params
–
This structure will be updated with the combined parameters from both params0 and params1.
params0
–
a GstStructure containing the new parameters to be aggregated.
params1
–
a GstStructure containing the new parameters to be aggregated.
Since : 1.26
Gst.AllocationMetaParamsAggregator
function Gst.AllocationMetaParamsAggregator(aggregated_params: Gst.Structure, params0: Gst.Structure, params1: Gst.Structure): {
// javascript wrapper for 'GstAllocationMetaParamsAggregator'
}
The aggregator function will combine the parameters from params0 and param1 and write the result back into aggregated_params.
Parameters:
This structure will be updated with the combined parameters from both params0 and params1.
a Gst.Structure containing the new parameters to be aggregated.
a Gst.Structure containing the new parameters to be aggregated.
Since : 1.26
Gst.AllocationMetaParamsAggregator
def Gst.AllocationMetaParamsAggregator (aggregated_params, params0, params1):
#python wrapper for 'GstAllocationMetaParamsAggregator'
The aggregator function will combine the parameters from params0 and param1 and write the result back into aggregated_params.
Parameters:
This structure will be updated with the combined parameters from both params0 and params1.
a Gst.Structure containing the new parameters to be aggregated.
a Gst.Structure containing the new parameters to be aggregated.
Since : 1.26
GstCustomMetaTransformFunction
gboolean (*GstCustomMetaTransformFunction) (GstBuffer * transbuf, GstCustomMeta * meta, GstBuffer * buffer, GQuark type, gpointer data, gpointer user_data)
Function called for each meta in buffer as a result of performing a transformation that yields transbuf. Additional type specific transform data is passed to the function as data.
Implementations should check the type of the transform and parse additional type specific fields in data that should be used to update the metadata on transbuf.
Parameters:
transbuf
–
meta
–
buffer
–
type
–
the transform type
data
–
transform specific data.
user_data
–
user data passed when registering the meta
TRUE if the transform could be performed
Since : 1.20
Gst.CustomMetaTransformFunction
function Gst.CustomMetaTransformFunction(transbuf: Gst.Buffer, meta: Gst.CustomMeta, buffer: Gst.Buffer, type: GLib.Quark, data: Object, user_data: Object): {
// javascript wrapper for 'GstCustomMetaTransformFunction'
}
Function called for each meta in buffer as a result of performing a transformation that yields transbuf. Additional type specific transform data is passed to the function as data.
Implementations should check the type of the transform and parse additional type specific fields in data that should be used to update the metadata on transbuf.
Parameters:
the transform type
transform specific data.
user data passed when registering the meta
Since : 1.20
Gst.CustomMetaTransformFunction
def Gst.CustomMetaTransformFunction (transbuf, meta, buffer, type, data, *user_data):
#python wrapper for 'GstCustomMetaTransformFunction'
Function called for each meta in buffer as a result of performing a transformation that yields transbuf. Additional type specific transform data is passed to the function as data.
Implementations should check the type of the transform and parse additional type specific fields in data that should be used to update the metadata on transbuf.
Parameters:
the transform type
transform specific data.
user data passed when registering the meta
Since : 1.20
GstMetaClearFunction
(*GstMetaClearFunction) (GstBuffer * buffer, GstMeta * meta)
Clears the content of the meta. This will be called by the GstBufferPool when a pooled buffer is returned.
Since : 1.24
Gst.MetaClearFunction
function Gst.MetaClearFunction(buffer: Gst.Buffer, meta: Gst.Meta): {
// javascript wrapper for 'GstMetaClearFunction'
}
Clears the content of the meta. This will be called by the GstBufferPool when a pooled buffer is returned.
Since : 1.24
Gst.MetaClearFunction
def Gst.MetaClearFunction (buffer, meta):
#python wrapper for 'GstMetaClearFunction'
Clears the content of the meta. This will be called by the GstBufferPool when a pooled buffer is returned.
Since : 1.24
GstMetaDeserializeFunction
GstMeta * (*GstMetaDeserializeFunction) (const GstMetaInfo * info, GstBuffer * buffer, const guint8 * data, gsize size, guint8 version)
Recreate a GstMeta from serialized data returned by GstMetaSerializeFunction and add it to buffer.
Parameters:
info
–
GstMetaInfo of the meta
buffer
–
data
–
data obtained from GstMetaSerializeFunction
size
–
size of data to avoid buffer overflow
version
–
the metadata owned by buffer, or NULL.
Since : 1.24
Gst.MetaDeserializeFunction
function Gst.MetaDeserializeFunction(info: Gst.MetaInfo, buffer: Gst.Buffer, data: Number, size: Number, version: Number): {
// javascript wrapper for 'GstMetaDeserializeFunction'
}
Recreate a Gst.Meta from serialized data returned by Gst.MetaSerializeFunction and add it to buffer.
Parameters:
Gst.MetaInfo of the meta
data obtained from Gst.MetaSerializeFunction
size of data to avoid buffer overflow
Since : 1.24
Gst.MetaDeserializeFunction
def Gst.MetaDeserializeFunction (info, buffer, data, size, version):
#python wrapper for 'GstMetaDeserializeFunction'
Recreate a Gst.Meta from serialized data returned by Gst.MetaSerializeFunction and add it to buffer.
Parameters:
Gst.MetaInfo of the meta
data obtained from Gst.MetaSerializeFunction
size of data to avoid buffer overflow
Since : 1.24
GstMetaFreeFunction
(*GstMetaFreeFunction) (GstMeta * meta, GstBuffer * buffer)
Function called when meta is freed in buffer.
Gst.MetaFreeFunction
function Gst.MetaFreeFunction(meta: Gst.Meta, buffer: Gst.Buffer): {
// javascript wrapper for 'GstMetaFreeFunction'
}
Function called when meta is freed in buffer.
Gst.MetaFreeFunction
def Gst.MetaFreeFunction (meta, buffer):
#python wrapper for 'GstMetaFreeFunction'
Function called when meta is freed in buffer.
GstMetaInitFunction
gboolean (*GstMetaInitFunction) (GstMeta * meta, gpointer params, GstBuffer * buffer)
Function called when meta is initialized in buffer.
Gst.MetaInitFunction
function Gst.MetaInitFunction(meta: Gst.Meta, params: Object, buffer: Gst.Buffer): {
// javascript wrapper for 'GstMetaInitFunction'
}
Function called when meta is initialized in buffer.
Parameters:
parameters passed to the init function
Gst.MetaInitFunction
def Gst.MetaInitFunction (meta, params, buffer):
#python wrapper for 'GstMetaInitFunction'
Function called when meta is initialized in buffer.
Parameters:
parameters passed to the init function
GstMetaSerializeFunction
gboolean (*GstMetaSerializeFunction) (const GstMeta * meta, GstByteArrayInterface * data, guint8 * version)
Serialize meta into a format that can be stored or transmitted and later deserialized by GstMetaDeserializeFunction.
By default version is set to 0, it should be bumped if incompatible changes are made to the format so GstMetaDeserializeFunction can deserialize each version.
Parameters:
meta
–
a GstMeta
data
–
GstByteArrayInterface to append serialization data
version
(
[out])
–
version of the serialization format
Since : 1.24
Gst.MetaSerializeFunction
function Gst.MetaSerializeFunction(meta: Gst.Meta, data: Gst.ByteArrayInterface): {
// javascript wrapper for 'GstMetaSerializeFunction'
}
Serialize meta into a format that can be stored or transmitted and later deserialized by Gst.MetaDeserializeFunction.
By default version is set to 0, it should be bumped if incompatible changes are made to the format so Gst.MetaDeserializeFunction can deserialize each version.
Parameters:
Gst.ByteArrayInterface to append serialization data
Returns a tuple made of:
Since : 1.24
Gst.MetaSerializeFunction
def Gst.MetaSerializeFunction (meta, data):
#python wrapper for 'GstMetaSerializeFunction'
Serialize meta into a format that can be stored or transmitted and later deserialized by Gst.MetaDeserializeFunction.
By default version is set to 0, it should be bumped if incompatible changes are made to the format so Gst.MetaDeserializeFunction can deserialize each version.
Parameters:
Gst.ByteArrayInterface to append serialization data
Returns a tuple made of:
Since : 1.24
GstMetaTransformFunction
gboolean (*GstMetaTransformFunction) (GstBuffer * transbuf, GstMeta * meta, GstBuffer * buffer, GQuark type, gpointer data)
Function called for each meta in buffer as a result of performing a transformation on transbuf. Additional type specific transform data is passed to the function as data.
Implementations should check the type of the transform and parse additional type specific fields in data that should be used to update the metadata on transbuf.
Parameters:
transbuf
–
meta
–
a GstMeta
buffer
–
type
–
the transform type
data
–
transform specific data.
TRUE if the transform could be performed
Gst.MetaTransformFunction
function Gst.MetaTransformFunction(transbuf: Gst.Buffer, meta: Gst.Meta, buffer: Gst.Buffer, type: GLib.Quark, data: Object): {
// javascript wrapper for 'GstMetaTransformFunction'
}
Function called for each meta in buffer as a result of performing a transformation on transbuf. Additional type specific transform data is passed to the function as data.
Implementations should check the type of the transform and parse additional type specific fields in data that should be used to update the metadata on transbuf.
Parameters:
the transform type
transform specific data.
Gst.MetaTransformFunction
def Gst.MetaTransformFunction (transbuf, meta, buffer, type, data):
#python wrapper for 'GstMetaTransformFunction'
Function called for each meta in buffer as a result of performing a transformation on transbuf. Additional type specific transform data is passed to the function as data.
Implementations should check the type of the transform and parse additional type specific fields in data that should be used to update the metadata on transbuf.
Parameters:
the transform type
transform specific data.
The results of the search are