analytics: Change pointers in getters to const

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7403>
This commit is contained in:
Oskar Fiedot 2024-08-30 09:52:55 +02:00 committed by GStreamer Marge Bot
parent 6218b153fd
commit 327df9766d
9 changed files with 75 additions and 75 deletions

View file

@ -34,7 +34,7 @@ identified by @id is stored.</doc>
<parameters> <parameters>
<instance-parameter name="handle" transfer-ownership="none"> <instance-parameter name="handle" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Instance handle</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Instance handle</doc>
<type name="ClsMtd" c:type="GstAnalyticsClsMtd*"/> <type name="ClsMtd" c:type="const GstAnalyticsClsMtd*"/>
</instance-parameter> </instance-parameter>
<parameter name="quark" transfer-ownership="none"> <parameter name="quark" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Quark of the class <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Quark of the class
@ -53,7 +53,7 @@ Get index of class represented by @quark</doc>
<instance-parameter name="handle" transfer-ownership="none"> <instance-parameter name="handle" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Instance handle <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Instance handle
Get number of classes</doc> Get number of classes</doc>
<type name="ClsMtd" c:type="GstAnalyticsClsMtd*"/> <type name="ClsMtd" c:type="const GstAnalyticsClsMtd*"/>
</instance-parameter> </instance-parameter>
</parameters> </parameters>
</method> </method>
@ -67,7 +67,7 @@ Get number of classes</doc>
<parameters> <parameters>
<instance-parameter name="handle" transfer-ownership="none"> <instance-parameter name="handle" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">instance handle</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">instance handle</doc>
<type name="ClsMtd" c:type="GstAnalyticsClsMtd*"/> <type name="ClsMtd" c:type="const GstAnalyticsClsMtd*"/>
</instance-parameter> </instance-parameter>
<parameter name="index" transfer-ownership="none"> <parameter name="index" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Object class index</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Object class index</doc>
@ -84,7 +84,7 @@ Get number of classes</doc>
<parameters> <parameters>
<instance-parameter name="handle" transfer-ownership="none"> <instance-parameter name="handle" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Instance handle</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">Instance handle</doc>
<type name="ClsMtd" c:type="GstAnalyticsClsMtd*"/> <type name="ClsMtd" c:type="const GstAnalyticsClsMtd*"/>
</instance-parameter> </instance-parameter>
<parameter name="index" transfer-ownership="none"> <parameter name="index" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">index of the class <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsclassificationmtd.c">index of the class
@ -143,7 +143,7 @@ identified by @id is stored.</doc>
<parameters> <parameters>
<instance-parameter name="instance" transfer-ownership="none"> <instance-parameter name="instance" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of #GstAnalyticsMtd</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of #GstAnalyticsMtd</doc>
<type name="Mtd" c:type="GstAnalyticsMtd*"/> <type name="Mtd" c:type="const GstAnalyticsMtd*"/>
</instance-parameter> </instance-parameter>
</parameters> </parameters>
</method> </method>
@ -157,7 +157,7 @@ identified by @id is stored.</doc>
<instance-parameter name="instance" transfer-ownership="none"> <instance-parameter name="instance" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of #GstAnalyticsMtd <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of #GstAnalyticsMtd
Get analysis result type.</doc> Get analysis result type.</doc>
<type name="Mtd" c:type="GstAnalyticsMtd*"/> <type name="Mtd" c:type="const GstAnalyticsMtd*"/>
</instance-parameter> </instance-parameter>
</parameters> </parameters>
</method> </method>
@ -171,7 +171,7 @@ Get analysis result type.</doc>
<parameters> <parameters>
<instance-parameter name="instance" transfer-ownership="none"> <instance-parameter name="instance" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of #GstAnalyticsMtd</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of #GstAnalyticsMtd</doc>
<type name="Mtd" c:type="GstAnalyticsMtd*"/> <type name="Mtd" c:type="const GstAnalyticsMtd*"/>
</instance-parameter> </instance-parameter>
</parameters> </parameters>
</method> </method>
@ -252,7 +252,7 @@ identified by @id is stored.</doc>
<parameters> <parameters>
<instance-parameter name="instance" transfer-ownership="none"> <instance-parameter name="instance" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">instance</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">instance</doc>
<type name="ODMtd" c:type="GstAnalyticsODMtd*"/> <type name="ODMtd" c:type="const GstAnalyticsODMtd*"/>
</instance-parameter> </instance-parameter>
<parameter name="loc_conf_lvl" direction="out" caller-allocates="0" transfer-ownership="full"> <parameter name="loc_conf_lvl" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">Confidence on object location</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">Confidence on object location</doc>
@ -270,7 +270,7 @@ identified by @id is stored.</doc>
<parameters> <parameters>
<instance-parameter name="instance" transfer-ownership="none"> <instance-parameter name="instance" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">instance</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">instance</doc>
<type name="ODMtd" c:type="GstAnalyticsODMtd*"/> <type name="ODMtd" c:type="const GstAnalyticsODMtd*"/>
</instance-parameter> </instance-parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full"> <parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">x component of upper-left corner of the object location</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">x component of upper-left corner of the object location</doc>
@ -304,7 +304,7 @@ identified by @id is stored.</doc>
<parameters> <parameters>
<instance-parameter name="handle" transfer-ownership="none"> <instance-parameter name="handle" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">Instance handle</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c">Instance handle</doc>
<type name="ODMtd" c:type="GstAnalyticsODMtd*"/> <type name="ODMtd" c:type="const GstAnalyticsODMtd*"/>
</instance-parameter> </instance-parameter>
</parameters> </parameters>
</method> </method>
@ -517,7 +517,7 @@ between @an_meta_first_id and @an_meta_second_id.</doc>
<instance-parameter name="rmeta" transfer-ownership="none"> <instance-parameter name="rmeta" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">a #GstAnalyticsRelationMeta describing analysis-meta <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">a #GstAnalyticsRelationMeta describing analysis-meta
relation</doc> relation</doc>
<type name="RelationMeta" c:type="GstAnalyticsRelationMeta*"/> <type name="RelationMeta" c:type="const GstAnalyticsRelationMeta*"/>
</instance-parameter> </instance-parameter>
<parameter name="an_meta_first_id" transfer-ownership="none"> <parameter name="an_meta_first_id" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">First analysis-meta</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">First analysis-meta</doc>
@ -649,7 +649,7 @@ otherwise this method return FALSE and @rlt is invalid.</doc>
<parameters> <parameters>
<instance-parameter name="meta" transfer-ownership="none"> <instance-parameter name="meta" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of GstAnalyticsRelationMeta</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of GstAnalyticsRelationMeta</doc>
<type name="RelationMeta" c:type="GstAnalyticsRelationMeta*"/> <type name="RelationMeta" c:type="const GstAnalyticsRelationMeta*"/>
</instance-parameter> </instance-parameter>
<parameter name="an_meta_id" transfer-ownership="none"> <parameter name="an_meta_id" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Id of GstAnalyticsMtd instance to retrieve</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Id of GstAnalyticsMtd instance to retrieve</doc>
@ -693,7 +693,7 @@ Ids (@an_meta_first_id and @an_meta_second_id) must be from a call to
<parameters> <parameters>
<instance-parameter name="meta" transfer-ownership="none"> <instance-parameter name="meta" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">a #GstAnalyticsRelationMeta</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">a #GstAnalyticsRelationMeta</doc>
<type name="RelationMeta" c:type="GstAnalyticsRelationMeta*"/> <type name="RelationMeta" c:type="const GstAnalyticsRelationMeta*"/>
</instance-parameter> </instance-parameter>
<parameter name="an_meta_first_id" transfer-ownership="none"> <parameter name="an_meta_first_id" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Id of first analysis-meta</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Id of first analysis-meta</doc>
@ -828,7 +828,7 @@ identified by @id is stored.</doc>
<parameters> <parameters>
<instance-parameter name="instance" transfer-ownership="none"> <instance-parameter name="instance" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjecttrackingmtd.c">Instance of tracking metadata</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjecttrackingmtd.c">Instance of tracking metadata</doc>
<type name="TrackingMtd" c:type="GstAnalyticsTrackingMtd*"/> <type name="TrackingMtd" c:type="const GstAnalyticsTrackingMtd*"/>
</instance-parameter> </instance-parameter>
<parameter name="tracking_id" direction="out" caller-allocates="0" transfer-ownership="full"> <parameter name="tracking_id" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjecttrackingmtd.c">Updated tracking id</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjecttrackingmtd.c">Updated tracking id</doc>
@ -1005,7 +1005,7 @@ information about the tracking, for example, it can be used alongside a
<parameters> <parameters>
<parameter name="instance" transfer-ownership="none"> <parameter name="instance" transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of #GstAnalyticsRelationMeta</doc> <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c">Instance of #GstAnalyticsRelationMeta</doc>
<type name="RelationMeta" c:type="GstAnalyticsRelationMeta*"/> <type name="RelationMeta" c:type="const GstAnalyticsRelationMeta*"/>
</parameter> </parameter>
</parameters> </parameters>
</function> </function>

View file

@ -95,7 +95,7 @@ gst_analytics_cls_mtd_get_mtd_type (void)
* Since: 1.24 * Since: 1.24
*/ */
gfloat gfloat
gst_analytics_cls_mtd_get_level (GstAnalyticsClsMtd * handle, gsize index) gst_analytics_cls_mtd_get_level (const GstAnalyticsClsMtd * handle, gsize index)
{ {
g_return_val_if_fail (handle, -1.0); g_return_val_if_fail (handle, -1.0);
g_return_val_if_fail (handle->meta != NULL, -1.0); g_return_val_if_fail (handle->meta != NULL, -1.0);
@ -118,7 +118,7 @@ gst_analytics_cls_mtd_get_level (GstAnalyticsClsMtd * handle, gsize index)
* Since: 1.24 * Since: 1.24
*/ */
gint gint
gst_analytics_cls_mtd_get_index_by_quark (GstAnalyticsClsMtd * handle, gst_analytics_cls_mtd_get_index_by_quark (const GstAnalyticsClsMtd * handle,
GQuark quark) GQuark quark)
{ {
g_return_val_if_fail (handle, -1); g_return_val_if_fail (handle, -1);
@ -145,7 +145,7 @@ gst_analytics_cls_mtd_get_index_by_quark (GstAnalyticsClsMtd * handle,
* Since: 1.24 * Since: 1.24
*/ */
gsize gsize
gst_analytics_cls_mtd_get_length (GstAnalyticsClsMtd * handle) gst_analytics_cls_mtd_get_length (const GstAnalyticsClsMtd * handle)
{ {
GstAnalyticsClsMtdData *cls_mtd_data; GstAnalyticsClsMtdData *cls_mtd_data;
cls_mtd_data = gst_analytics_relation_meta_get_mtd_data (handle->meta, cls_mtd_data = gst_analytics_relation_meta_get_mtd_data (handle->meta,
@ -164,7 +164,7 @@ gst_analytics_cls_mtd_get_length (GstAnalyticsClsMtd * handle)
* Since: 1.24 * Since: 1.24
*/ */
GQuark GQuark
gst_analytics_cls_mtd_get_quark (GstAnalyticsClsMtd * handle, gsize index) gst_analytics_cls_mtd_get_quark (const GstAnalyticsClsMtd * handle, gsize index)
{ {
GstAnalyticsClsMtdData *cls_mtd_data; GstAnalyticsClsMtdData *cls_mtd_data;
g_return_val_if_fail (handle, 0); g_return_val_if_fail (handle, 0);

View file

@ -27,7 +27,6 @@
#include <gst/analytics/gstanalyticsmeta.h> #include <gst/analytics/gstanalyticsmeta.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/** /**
* GstAnalyticsClsMtd: * GstAnalyticsClsMtd:
* @id: Instance identifier. * @id: Instance identifier.
@ -45,18 +44,18 @@ GST_ANALYTICS_META_API
GstAnalyticsMtdType gst_analytics_cls_mtd_get_mtd_type (void); GstAnalyticsMtdType gst_analytics_cls_mtd_get_mtd_type (void);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gfloat gst_analytics_cls_mtd_get_level (GstAnalyticsClsMtd * handle, gfloat gst_analytics_cls_mtd_get_level (const GstAnalyticsClsMtd * handle,
gsize index); gsize index);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gint gst_analytics_cls_mtd_get_index_by_quark (GstAnalyticsClsMtd * handle, gint gst_analytics_cls_mtd_get_index_by_quark (const GstAnalyticsClsMtd *
GQuark quark); handle, GQuark quark);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gsize gst_analytics_cls_mtd_get_length (GstAnalyticsClsMtd * handle); gsize gst_analytics_cls_mtd_get_length (const GstAnalyticsClsMtd * handle);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
GQuark gst_analytics_cls_mtd_get_quark (GstAnalyticsClsMtd * handle, GQuark gst_analytics_cls_mtd_get_quark (const GstAnalyticsClsMtd * handle,
gsize index); gsize index);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API

View file

@ -113,8 +113,8 @@ gst_analytics_relation_meta_get_next_id (GstAnalyticsRelationMeta * meta);
static GstAnalyticsRelatableMtdData * static GstAnalyticsRelatableMtdData *
gst_analytics_relation_meta_get_mtd_data_internal (GstAnalyticsRelationMeta * gst_analytics_relation_meta_get_mtd_data_internal (const
meta, guint an_meta_id) GstAnalyticsRelationMeta * meta, guint an_meta_id)
{ {
GstAnalyticsRelatableMtdData *rv; GstAnalyticsRelatableMtdData *rv;
g_return_val_if_fail (meta, NULL); g_return_val_if_fail (meta, NULL);
@ -137,7 +137,7 @@ gst_analytics_relation_meta_get_mtd_data_internal (GstAnalyticsRelationMeta *
* Since: 1.24 * Since: 1.24
*/ */
GstAnalyticsMtdType GstAnalyticsMtdType
gst_analytics_mtd_get_mtd_type (GstAnalyticsMtd * instance) gst_analytics_mtd_get_mtd_type (const GstAnalyticsMtd * instance)
{ {
GstAnalyticsRelatableMtdData *rlt; GstAnalyticsRelatableMtdData *rlt;
@ -159,7 +159,7 @@ gst_analytics_mtd_get_mtd_type (GstAnalyticsMtd * instance)
* Since: 1.24 * Since: 1.24
*/ */
guint guint
gst_analytics_mtd_get_id (GstAnalyticsMtd * instance) gst_analytics_mtd_get_id (const GstAnalyticsMtd * instance)
{ {
return instance->id; return instance->id;
} }
@ -174,7 +174,7 @@ gst_analytics_mtd_get_id (GstAnalyticsMtd * instance)
* Since: 1.24 * Since: 1.24
*/ */
gsize gsize
gst_analytics_mtd_get_size (GstAnalyticsMtd * instance) gst_analytics_mtd_get_size (const GstAnalyticsMtd * instance)
{ {
GstAnalyticsRelatableMtdData *rlt; GstAnalyticsRelatableMtdData *rlt;
@ -222,7 +222,7 @@ gst_analytics_mtd_type_get_name (GstAnalyticsMtdType type)
* Since: 1.24 * Since: 1.24
*/ */
gsize gsize
gst_analytics_relation_get_length (GstAnalyticsRelationMeta * instance) gst_analytics_relation_get_length (const GstAnalyticsRelationMeta * instance)
{ {
gsize rv; gsize rv;
g_return_val_if_fail (instance, 0); g_return_val_if_fail (instance, 0);
@ -583,7 +583,7 @@ gst_analytics_relation_meta_get_next_id (GstAnalyticsRelationMeta * meta)
* Since: 1.24 * Since: 1.24
*/ */
GstAnalyticsRelTypes GstAnalyticsRelTypes
gst_analytics_relation_meta_get_relation (GstAnalyticsRelationMeta * meta, gst_analytics_relation_meta_get_relation (const GstAnalyticsRelationMeta * meta,
guint an_meta_first_id, guint an_meta_second_id) guint an_meta_first_id, guint an_meta_second_id)
{ {
GstAnalyticsRelTypes types = GST_ANALYTICS_REL_TYPE_NONE; GstAnalyticsRelTypes types = GST_ANALYTICS_REL_TYPE_NONE;
@ -675,7 +675,7 @@ gst_analytics_relation_meta_set_relation (GstAnalyticsRelationMeta * meta,
* Since: 1.24 * Since: 1.24
*/ */
gboolean gboolean
gst_analytics_relation_meta_exist (GstAnalyticsRelationMeta * rmeta, gst_analytics_relation_meta_exist (const GstAnalyticsRelationMeta * rmeta,
guint an_meta_first_id, guint an_meta_first_id,
guint an_meta_second_id, guint an_meta_second_id,
gint max_relation_span, gint max_relation_span,
@ -999,7 +999,7 @@ gst_analytics_relation_meta_get_mtd (GstAnalyticsRelationMeta * meta,
* Since: 1.24 * Since: 1.24
*/ */
gpointer gpointer
gst_analytics_relation_meta_get_mtd_data (GstAnalyticsRelationMeta * gst_analytics_relation_meta_get_mtd_data (const GstAnalyticsRelationMeta *
meta, guint an_meta_id) meta, guint an_meta_id)
{ {
GstAnalyticsRelatableMtdData *rv = GstAnalyticsRelatableMtdData *rv =

View file

@ -30,7 +30,6 @@
#include <gst/analytics/analytics-meta-prelude.h> #include <gst/analytics/analytics-meta-prelude.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/** /**
* GST_INF_RELATION_SPAN: * GST_INF_RELATION_SPAN:
* *
@ -112,31 +111,33 @@ struct _GstAnalyticsMtd
* Since: 1.24 * Since: 1.24
*/ */
typedef struct { typedef struct
{
const char *name; const char *name;
gboolean (*mtd_meta_transform) (GstBuffer *transbuf, GstAnalyticsMtd *transmtd, gboolean (*mtd_meta_transform) (GstBuffer * transbuf,
GstBuffer *buffer, GQuark type, GstAnalyticsMtd * transmtd, GstBuffer * buffer, GQuark type,
gpointer data); gpointer data);
/*< private >*/ /*< private > */
gpointer _reserved[GST_PADDING_LARGE]; gpointer _reserved[GST_PADDING_LARGE];
} GstAnalyticsMtdImpl; } GstAnalyticsMtdImpl;
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
GstAnalyticsMtdType gst_analytics_mtd_get_mtd_type (GstAnalyticsMtd * instance); GstAnalyticsMtdType gst_analytics_mtd_get_mtd_type (const GstAnalyticsMtd *
instance);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
guint gst_analytics_mtd_get_id (GstAnalyticsMtd * instance); guint gst_analytics_mtd_get_id (const GstAnalyticsMtd * instance);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gsize gst_analytics_mtd_get_size (GstAnalyticsMtd * instance); gsize gst_analytics_mtd_get_size (const GstAnalyticsMtd * instance);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
const gchar *gst_analytics_mtd_type_get_name (GstAnalyticsMtdType type); const gchar *gst_analytics_mtd_type_get_name (GstAnalyticsMtdType type);
typedef struct _GstAnalyticsRelationMetaInitParams typedef struct _GstAnalyticsRelationMetaInitParams
GstAnalyticsRelationMetaInitParams; GstAnalyticsRelationMetaInitParams;
/** /**
* GST_ANALYTICS_RELATION_META_API_TYPE: * GST_ANALYTICS_RELATION_META_API_TYPE:
@ -202,13 +203,12 @@ const GstMetaInfo *gst_analytics_relation_meta_get_info (void);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gsize gsize
gst_analytics_relation_get_length (GstAnalyticsRelationMeta * gst_analytics_relation_get_length (const GstAnalyticsRelationMeta * instance);
instance);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
GstAnalyticsRelTypes GstAnalyticsRelTypes
gst_analytics_relation_meta_get_relation (GstAnalyticsRelationMeta * meta, gst_analytics_relation_meta_get_relation (const GstAnalyticsRelationMeta * meta,
guint an_meta_first_id, guint an_meta_second_id); guint an_meta_first_id, guint an_meta_second_id);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gboolean
@ -218,7 +218,7 @@ gst_analytics_relation_meta_set_relation (GstAnalyticsRelationMeta
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gboolean
gst_analytics_relation_meta_exist (GstAnalyticsRelationMeta * gst_analytics_relation_meta_exist (const GstAnalyticsRelationMeta *
rmeta, guint an_meta_first_id, guint an_meta_second_id, rmeta, guint an_meta_first_id, guint an_meta_second_id,
gint max_relation_span, GstAnalyticsRelTypes cond_types, gint max_relation_span, GstAnalyticsRelTypes cond_types,
GArray ** relations_path); GArray ** relations_path);
@ -248,19 +248,19 @@ gst_analytics_relation_meta_get_mtd (GstAnalyticsRelationMeta *
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gpointer gpointer
gst_analytics_relation_meta_get_mtd_data (GstAnalyticsRelationMeta * meta, gst_analytics_relation_meta_get_mtd_data (const GstAnalyticsRelationMeta * meta,
guint an_meta_id); guint an_meta_id);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gboolean
gst_analytics_relation_meta_iterate (GstAnalyticsRelationMeta * gst_analytics_relation_meta_iterate (GstAnalyticsRelationMeta *
meta, gpointer * state, GstAnalyticsMtdType type, meta, gpointer * state, GstAnalyticsMtdType type,
GstAnalyticsMtd * rlt_mtd); GstAnalyticsMtd * rlt_mtd);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gboolean
gst_analytics_relation_meta_get_direct_related (GstAnalyticsRelationMeta * meta, gst_analytics_relation_meta_get_direct_related (GstAnalyticsRelationMeta *
guint an_meta_id, GstAnalyticsRelTypes relation_type, meta, guint an_meta_id, GstAnalyticsRelTypes relation_type,
GstAnalyticsMtdType type, gpointer * state, GstAnalyticsMtd * rlt_mtd); GstAnalyticsMtdType type, gpointer * state, GstAnalyticsMtd * rlt_mtd);
G_END_DECLS G_END_DECLS

View file

@ -135,7 +135,7 @@ gst_analytics_od_mtd_get_mtd_type (void)
* Since: 1.24 * Since: 1.24
*/ */
gboolean gboolean
gst_analytics_od_mtd_get_location (GstAnalyticsODMtd * instance, gst_analytics_od_mtd_get_location (const GstAnalyticsODMtd * instance,
gint * x, gint * y, gint * w, gint * h, gfloat * loc_conf_lvl) gint * x, gint * y, gint * w, gint * h, gfloat * loc_conf_lvl)
{ {
GstAnalyticsODMtdData *data; GstAnalyticsODMtdData *data;
@ -168,7 +168,7 @@ gst_analytics_od_mtd_get_location (GstAnalyticsODMtd * instance,
* Since: 1.24 * Since: 1.24
*/ */
gboolean gboolean
gst_analytics_od_mtd_get_confidence_lvl (GstAnalyticsODMtd * instance, gst_analytics_od_mtd_get_confidence_lvl (const GstAnalyticsODMtd * instance,
gfloat * loc_conf_lvl) gfloat * loc_conf_lvl)
{ {
GstAnalyticsODMtdData *data; GstAnalyticsODMtdData *data;
@ -194,7 +194,7 @@ gst_analytics_od_mtd_get_confidence_lvl (GstAnalyticsODMtd * instance,
* Since: 1.24 * Since: 1.24
*/ */
GQuark GQuark
gst_analytics_od_mtd_get_obj_type (GstAnalyticsODMtd * handle) gst_analytics_od_mtd_get_obj_type (const GstAnalyticsODMtd * handle)
{ {
GstAnalyticsODMtdData *data; GstAnalyticsODMtdData *data;
g_return_val_if_fail (handle != NULL, 0); g_return_val_if_fail (handle != NULL, 0);

View file

@ -31,7 +31,6 @@
#include <gst/analytics/gstanalyticsmeta.h> #include <gst/analytics/gstanalyticsmeta.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/** /**
* GstAnalyticsODMtd: * GstAnalyticsODMtd:
* @id: Instance identifier. * @id: Instance identifier.
@ -49,20 +48,20 @@ GST_ANALYTICS_META_API
GstAnalyticsMtdType gst_analytics_od_mtd_get_mtd_type (void); GstAnalyticsMtdType gst_analytics_od_mtd_get_mtd_type (void);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gst_analytics_od_mtd_get_location (GstAnalyticsODMtd * instance, gboolean gst_analytics_od_mtd_get_location (const GstAnalyticsODMtd *
gint * x, gint * y, gint * w, gint * h, gfloat * loc_conf_lvl); instance, gint * x, gint * y, gint * w, gint * h, gfloat * loc_conf_lvl);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gst_analytics_od_mtd_get_confidence_lvl (GstAnalyticsODMtd * instance, gboolean gst_analytics_od_mtd_get_confidence_lvl (const GstAnalyticsODMtd *
gfloat * loc_conf_lvl); instance, gfloat * loc_conf_lvl);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
GQuark gst_analytics_od_mtd_get_obj_type (GstAnalyticsODMtd * handle); GQuark gst_analytics_od_mtd_get_obj_type (const GstAnalyticsODMtd * handle);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gst_analytics_relation_meta_add_od_mtd ( gboolean gst_analytics_relation_meta_add_od_mtd (GstAnalyticsRelationMeta *
GstAnalyticsRelationMeta * instance, GQuark type, gint x, gint y, instance, GQuark type, gint x, gint y, gint w, gint h, gfloat loc_conf_lvl,
gint w, gint h, gfloat loc_conf_lvl, GstAnalyticsODMtd * od_mtd); GstAnalyticsODMtd * od_mtd);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gboolean

View file

@ -138,7 +138,7 @@ gst_analytics_tracking_mtd_set_lost (GstAnalyticsTrackingMtd * instance)
* Since: 1.24 * Since: 1.24
*/ */
gboolean gboolean
gst_analytics_tracking_mtd_get_info (GstAnalyticsTrackingMtd * instance, gst_analytics_tracking_mtd_get_info (const GstAnalyticsTrackingMtd * instance,
guint64 * tracking_id, GstClockTime * tracking_first_seen, GstClockTime * guint64 * tracking_id, GstClockTime * tracking_first_seen, GstClockTime *
tracking_last_seen, gboolean * tracking_lost) tracking_last_seen, gboolean * tracking_lost)
{ {

View file

@ -31,7 +31,6 @@
#include <gst/analytics/gstanalyticsmeta.h> #include <gst/analytics/gstanalyticsmeta.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/** /**
* GstAnalyticsTrackMtd: * GstAnalyticsTrackMtd:
* @id: Instance identifier. * @id: Instance identifier.
@ -49,21 +48,24 @@ GST_ANALYTICS_META_API
GstAnalyticsMtdType gst_analytics_tracking_mtd_get_mtd_type (void); GstAnalyticsMtdType gst_analytics_tracking_mtd_get_mtd_type (void);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gst_analytics_tracking_mtd_update_last_seen (GstAnalyticsTrackingMtd * instance, gboolean
gst_analytics_tracking_mtd_update_last_seen (GstAnalyticsTrackingMtd * instance,
GstClockTime last_seen); GstClockTime last_seen);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gst_analytics_tracking_mtd_set_lost (GstAnalyticsTrackingMtd * instance); gboolean gst_analytics_tracking_mtd_set_lost (GstAnalyticsTrackingMtd *
instance);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gst_analytics_tracking_mtd_get_info (GstAnalyticsTrackingMtd * instance, gboolean gst_analytics_tracking_mtd_get_info (const GstAnalyticsTrackingMtd
guint64 * tracking_id, GstClockTime * tracking_first_seen, GstClockTime * * instance, guint64 * tracking_id, GstClockTime * tracking_first_seen,
tracking_last_seen, gboolean * tracking_lost); GstClockTime * tracking_last_seen, gboolean * tracking_lost);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gst_analytics_relation_meta_add_tracking_mtd ( gboolean
GstAnalyticsRelationMeta * instance, guint64 tracking_id, gst_analytics_relation_meta_add_tracking_mtd (GstAnalyticsRelationMeta *
GstClockTime tracking_first_seen, GstAnalyticsTrackingMtd * trk_mtd); instance, guint64 tracking_id, GstClockTime tracking_first_seen,
GstAnalyticsTrackingMtd * trk_mtd);
GST_ANALYTICS_META_API GST_ANALYTICS_META_API
gboolean gboolean