GstAnalyticsPropertiesMtd
This type of metadata stores a set of key/value properties. Keys are strings and values are GValue. It is intended to annotate another analytics metadata, like a GstAnalyticsODMtd, with arbitrary attributes (color, speed, license plate, ...).
The annotated metadata is associated with the GstAnalyticsPropertiesMtd using GstAnalyticsRelationMeta. The recommended relation is GST_ANALYTICS_REL_TYPE_RELATE_TO from the annotated metadata to the GstAnalyticsPropertiesMtd:
GstAnalyticsODMtd od_mtd;
GstAnalyticsPropertiesMtd props_mtd;
gst_analytics_relation_meta_add_od_mtd (rmeta, type, x, y, w, h, conf,
&od_mtd);
gst_analytics_relation_meta_add_properties_mtd (rmeta, &props_mtd);
gst_analytics_properties_mtd_set_string (&props_mtd, "color", "red");
gst_analytics_properties_mtd_set (&props_mtd,
"license-plate", G_TYPE_STRING, "ABC-123",
"speed", G_TYPE_DOUBLE, 12.5,
NULL);
gst_analytics_relation_meta_set_relation (rmeta,
GST_ANALYTICS_REL_TYPE_RELATE_TO, od_mtd.id, props_mtd.id);
Downstream, gst_analytics_relation_meta_iterate filtered on gst_analytics_od_mtd_get_mtd_type visits each object, and gst_analytics_relation_meta_get_direct_related filtered on gst_analytics_properties_mtd_get_mtd_type returns the properties related to it:
GstAnalyticsODMtd od_mtd;
GstAnalyticsPropertiesMtd props_mtd;
gpointer od_state = NULL;
while (gst_analytics_relation_meta_iterate (rmeta, &od_state,
gst_analytics_od_mtd_get_mtd_type (), &od_mtd)) {
gpointer props_state = NULL;
if (gst_analytics_relation_meta_get_direct_related (rmeta, od_mtd.id,
GST_ANALYTICS_REL_TYPE_RELATE_TO,
gst_analytics_properties_mtd_get_mtd_type (), &props_state,
&props_mtd)) {
const gchar *plate =
gst_analytics_properties_mtd_get_string (&props_mtd,
"license-plate");
...
}
}
GstAnalyticsPropertiesMtd
Handle containing data required to use gst_analytics_properties_mtd APIs. This type is generally expected to be allocated on the stack.
Members
id
(guint)
–
Instance identifier.
meta
(GstAnalyticsRelationMeta *)
–
Instance of GstAnalyticsRelationMeta where this Mtd is stored.
Since : 1.30
GstAnalytics.PropertiesMtd
Handle containing data required to use gst_analytics_properties_mtd APIs. This type is generally expected to be allocated on the stack.
Members
id
(Number)
–
Instance identifier.
meta
(GstAnalytics.RelationMeta)
–
Instance of GstAnalytics.RelationMeta where this Mtd is stored.
Since : 1.30
GstAnalytics.PropertiesMtd
Handle containing data required to use gst_analytics_properties_mtd APIs. This type is generally expected to be allocated on the stack.
Members
id
(int)
–
Instance identifier.
meta
(GstAnalytics.RelationMeta)
–
Instance of GstAnalytics.RelationMeta where this Mtd is stored.
Since : 1.30
Methods
gst_analytics_properties_mtd_get_length
guint gst_analytics_properties_mtd_get_length (const GstAnalyticsPropertiesMtd * mtd)
Parameters:
mtd
–
the number of properties stored in mtd
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.get_length
function GstAnalytics.PropertiesMtd.prototype.get_length(): {
// javascript wrapper for 'gst_analytics_properties_mtd_get_length'
}
Parameters:
the number of properties stored in mtd
Since : 1.30
GstAnalytics.PropertiesMtd.get_length
def GstAnalytics.PropertiesMtd.get_length (self):
#python wrapper for 'gst_analytics_properties_mtd_get_length'
Parameters:
the number of properties stored in mtd
Since : 1.30
gst_analytics_properties_mtd_get_nth_key
const gchar * gst_analytics_properties_mtd_get_nth_key (const GstAnalyticsPropertiesMtd * mtd, guint index)
Gets the name of the property at index, to iterate over all properties along with gst_analytics_properties_mtd_get_length.
the name of the property, or NULL if index is out of range
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.get_nth_key
function GstAnalytics.PropertiesMtd.prototype.get_nth_key(index: Number): {
// javascript wrapper for 'gst_analytics_properties_mtd_get_nth_key'
}
Gets the name of the property at index, to iterate over all properties along with GstAnalytics.PropertiesMtd.prototype.get_length.
Parameters:
the index of the property
Since : 1.30
GstAnalytics.PropertiesMtd.get_nth_key
def GstAnalytics.PropertiesMtd.get_nth_key (self, index):
#python wrapper for 'gst_analytics_properties_mtd_get_nth_key'
Gets the name of the property at index, to iterate over all properties along with GstAnalytics.PropertiesMtd.get_length.
Parameters:
the index of the property
Since : 1.30
gst_analytics_properties_mtd_get_string
const gchar * gst_analytics_properties_mtd_get_string (const GstAnalyticsPropertiesMtd * mtd, const gchar * key)
Gets the string value of the property key.
the string value of the property, or NULL if key doesn't exist or doesn't hold a string
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.get_string
function GstAnalytics.PropertiesMtd.prototype.get_string(key: String): {
// javascript wrapper for 'gst_analytics_properties_mtd_get_string'
}
Gets the string value of the property key.
Parameters:
the name of the property
Since : 1.30
GstAnalytics.PropertiesMtd.get_string
def GstAnalytics.PropertiesMtd.get_string (self, key):
#python wrapper for 'gst_analytics_properties_mtd_get_string'
Gets the string value of the property key.
Parameters:
the name of the property
Since : 1.30
gst_analytics_properties_mtd_get_structure
const GstStructure * gst_analytics_properties_mtd_get_structure (const GstAnalyticsPropertiesMtd * mtd)
Gets the GstStructure holding all properties of mtd. Each field of the structure is a property.
Parameters:
mtd
–
the properties of mtd
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.get_structure
function GstAnalytics.PropertiesMtd.prototype.get_structure(): {
// javascript wrapper for 'gst_analytics_properties_mtd_get_structure'
}
Gets the Gst.Structure holding all properties of mtd. Each field of the structure is a property.
Parameters:
the properties of mtd
Since : 1.30
GstAnalytics.PropertiesMtd.get_structure
def GstAnalytics.PropertiesMtd.get_structure (self):
#python wrapper for 'gst_analytics_properties_mtd_get_structure'
Gets the Gst.Structure holding all properties of mtd. Each field of the structure is a property.
Parameters:
the properties of mtd
Since : 1.30
gst_analytics_properties_mtd_get_value
const GValue * gst_analytics_properties_mtd_get_value (const GstAnalyticsPropertiesMtd * mtd, const gchar * key)
Gets the value of the property key.
the value of the property, or NULL if key doesn't exist
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.get_value
function GstAnalytics.PropertiesMtd.prototype.get_value(key: String): {
// javascript wrapper for 'gst_analytics_properties_mtd_get_value'
}
Gets the value of the property key.
Parameters:
the name of the property
the value of the property, or null if key doesn't exist
Since : 1.30
GstAnalytics.PropertiesMtd.get_value
def GstAnalytics.PropertiesMtd.get_value (self, key):
#python wrapper for 'gst_analytics_properties_mtd_get_value'
Gets the value of the property key.
Parameters:
the name of the property
the value of the property, or None if key doesn't exist
Since : 1.30
gst_analytics_properties_mtd_has_key
gboolean gst_analytics_properties_mtd_has_key (const GstAnalyticsPropertiesMtd * mtd, const gchar * key)
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.has_key
function GstAnalytics.PropertiesMtd.prototype.has_key(key: String): {
// javascript wrapper for 'gst_analytics_properties_mtd_has_key'
}
Parameters:
the name of the property
Since : 1.30
GstAnalytics.PropertiesMtd.has_key
def GstAnalytics.PropertiesMtd.has_key (self, key):
#python wrapper for 'gst_analytics_properties_mtd_has_key'
Parameters:
the name of the property
Since : 1.30
gst_analytics_properties_mtd_remove_key
gboolean gst_analytics_properties_mtd_remove_key (GstAnalyticsPropertiesMtd * mtd, const gchar * key)
Removes the property key from mtd.
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.remove_key
function GstAnalytics.PropertiesMtd.prototype.remove_key(key: String): {
// javascript wrapper for 'gst_analytics_properties_mtd_remove_key'
}
Removes the property key from mtd.
Parameters:
the name of the property
Since : 1.30
GstAnalytics.PropertiesMtd.remove_key
def GstAnalytics.PropertiesMtd.remove_key (self, key):
#python wrapper for 'gst_analytics_properties_mtd_remove_key'
Removes the property key from mtd.
Parameters:
the name of the property
Since : 1.30
gst_analytics_properties_mtd_set
gboolean gst_analytics_properties_mtd_set (GstAnalyticsPropertiesMtd * mtd, const gchar * first_key, ... ...)
Sets several properties at once, using the same variable arguments convention as gst_structure_set. Existing properties are replaced.
Each value must have exactly the C type of its GType, as no conversion
is done: pass 1.0 and not 1 for G_TYPE_DOUBLE, and cast to gint64
or guint64 for 64-bit integer types.
Parameters:
mtd
–
first_key
–
the name of the first property to set
Since : 1.30
gst_analytics_properties_mtd_set_string
gboolean gst_analytics_properties_mtd_set_string (GstAnalyticsPropertiesMtd * mtd, const gchar * key, const gchar * value)
Sets the property key to a copy of the string value. If key already exists its value is replaced.
Parameters:
mtd
–
key
–
the name of the property
value
–
the string value of the property
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.set_string
function GstAnalytics.PropertiesMtd.prototype.set_string(key: String, value: String): {
// javascript wrapper for 'gst_analytics_properties_mtd_set_string'
}
Sets the property key to a copy of the string value. If key already exists its value is replaced.
Parameters:
the name of the property
the string value of the property
Since : 1.30
GstAnalytics.PropertiesMtd.set_string
def GstAnalytics.PropertiesMtd.set_string (self, key, value):
#python wrapper for 'gst_analytics_properties_mtd_set_string'
Sets the property key to a copy of the string value. If key already exists its value is replaced.
Parameters:
the name of the property
the string value of the property
Since : 1.30
gst_analytics_properties_mtd_set_value
gboolean gst_analytics_properties_mtd_set_value (GstAnalyticsPropertiesMtd * mtd, const gchar * key, const GValue * value)
Sets the property key to a copy of value. If key already exists its value is replaced.
Parameters:
mtd
–
key
–
the name of the property
value
–
the value of the property
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.set_value
function GstAnalytics.PropertiesMtd.prototype.set_value(key: String, value: GObject.Value): {
// javascript wrapper for 'gst_analytics_properties_mtd_set_value'
}
Sets the property key to a copy of value. If key already exists its value is replaced.
Parameters:
the name of the property
the value of the property
Since : 1.30
GstAnalytics.PropertiesMtd.set_value
def GstAnalytics.PropertiesMtd.set_value (self, key, value):
#python wrapper for 'gst_analytics_properties_mtd_set_value'
Sets the property key to a copy of value. If key already exists its value is replaced.
Parameters:
the name of the property
the value of the property
Since : 1.30
Functions
gst_analytics_properties_mtd_get_mtd_type
GstAnalyticsMtdType gst_analytics_properties_mtd_get_mtd_type ()
Since : 1.30
GstAnalytics.PropertiesMtd.prototype.get_mtd_type
function GstAnalytics.PropertiesMtd.prototype.get_mtd_type(): {
// javascript wrapper for 'gst_analytics_properties_mtd_get_mtd_type'
}
the Number of GstAnalytics.PropertiesMtd
Since : 1.30
GstAnalytics.PropertiesMtd.get_mtd_type
def GstAnalytics.PropertiesMtd.get_mtd_type ():
#python wrapper for 'gst_analytics_properties_mtd_get_mtd_type'
the int of GstAnalytics.PropertiesMtd
Since : 1.30
The results of the search are