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.

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.

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.

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:

Returns –

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'
}
Returns (Number) –

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'
Returns (int) –

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.

Parameters:

index –

the index of the property

Returns ( [transfer: none][nullable]) –

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:

index (Number) –

the index of the property

Returns (String) –

the name of the property, or null if index is out of range

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:

index (int) –

the index of the property

Returns (str) –

the name of the property, or None if index is out of range

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.

Parameters:

key –

the name of the property

Returns ( [transfer: none][nullable]) –

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:

key (String) –

the name of the property

Returns (String) –

the string value of the property, or null if key doesn't exist or doesn't hold a string

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:

key (str) –

the name of the property

Returns (str) –

the string value of the property, or None if key doesn't exist or doesn't hold a string

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:

Returns ( [transfer: none]) –

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.

Returns (Gst.Structure) –

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.

Returns (Gst.Structure) –

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.

Parameters:

key –

the name of the property

Returns ( [transfer: none][nullable]) –

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:

key (String) –

the name of the property

Returns (GObject.Value) –

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:

key (str) –

the name of the property

Returns (GObject.Value) –

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)

Parameters:

key –

the name of the property

Returns –

TRUE if mtd has a property named key, otherwise FALSE

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:

key (String) –

the name of the property

Returns (Number) –

true if mtd has a property named key, otherwise false

Since : 1.30


GstAnalytics.PropertiesMtd.has_key

def GstAnalytics.PropertiesMtd.has_key (self, key):
    #python wrapper for 'gst_analytics_properties_mtd_has_key'

Parameters:

key (str) –

the name of the property

Returns (bool) –

True if mtd has a property named key, otherwise False

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.

Parameters:

key –

the name of the property

Returns –

TRUE on success, otherwise FALSE

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:

key (String) –

the name of the property

Returns (Number) –

true on success, otherwise false

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:

key (str) –

the name of the property

Returns (bool) –

True on success, otherwise False

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:

first_key –

the name of the first property to set

... –

GType and value of the first property, followed by more key/#GType/value triplets, terminated by NULL

Returns –

TRUE on success, otherwise FALSE

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:

key –

the name of the property

value –

the string value of the property

Returns –

TRUE on success, otherwise FALSE

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:

key (String) –

the name of the property

value (String) –

the string value of the property

Returns (Number) –

true on success, otherwise false

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:

key (str) –

the name of the property

value (str) –

the string value of the property

Returns (bool) –

True on success, otherwise False

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:

key –

the name of the property

value –

the value of the property

Returns –

TRUE on success, otherwise FALSE

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:

key (String) –

the name of the property

value (GObject.Value) –

the value of the property

Returns (Number) –

true on success, otherwise false

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:

key (str) –

the name of the property

value (GObject.Value) –

the value of the property

Returns (bool) –

True on success, otherwise False

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'
}

Since : 1.30


GstAnalytics.PropertiesMtd.get_mtd_type

def GstAnalytics.PropertiesMtd.get_mtd_type ():
    #python wrapper for 'gst_analytics_properties_mtd_get_mtd_type'
Returns (int) –

the int of GstAnalytics.PropertiesMtd

Since : 1.30


The results of the search are