analytics: add _N_TO_N relation type
authorDaniel Morin <daniel.morin@collabora.com>
Fri, 6 Dec 2024 05:04:45 +0000 (00:04 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 9 Dec 2024 18:18:30 +0000 (18:18 +0000)
This relation type define relations between each components of two groups.
First component of first group relate to first component of second group,
Second component of second group relate to second component of second group,
and so on. It's a denser way to express relations in this context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8087>

.gitlab-image-tags.yml
girs/GstAnalytics-1.0.gir
subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.c
subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.h

index c229ed9e7db16915e1f5f4f59debde1cdce9ec93..751d6cfa0235fa9b8ded772864d80f3055f0df06 100644 (file)
@@ -13,6 +13,6 @@ variables:
 
   LINT_TAG: '2024-02-20.0'
 
-  ABI_CHECK_TAG: '2024-12-04.0'
+  ABI_CHECK_TAG: '2024-12-09.0'
 
   WINDOWS_TAG: '2024-11-29.0'
index 3dbbdaafd448588a788d0d80bc6b42cfebe7d296..7fc10dfe31addb0ad065046437d2b08eed7435c2 100644 (file)
@@ -353,7 +353,12 @@ identified by @id is stored.</doc>
       </member>
       <member name="relate_to" value="8" c:identifier="GST_ANALYTICS_REL_TYPE_RELATE_TO">
       </member>
-      <member name="last" value="16" c:identifier="GST_ANALYTICS_REL_TYPE_LAST">
+      <member name="n_to_n" value="16" c:identifier="GST_ANALYTICS_REL_TYPE_N_TO_N">
+        <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.h">Used to express relations between two groups
+   where each group's components correspond to the respective component in the
+   other group. Since: 1.26</doc>
+      </member>
+      <member name="last" value="32" c:identifier="GST_ANALYTICS_REL_TYPE_LAST">
         <doc xml:space="preserve" filename="../subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsmeta.h">reserved</doc>
       </member>
       <member name="any" value="2147483647" c:identifier="GST_ANALYTICS_REL_TYPE_ANY">
index 4877f6808a8f44fbc4da0009d724da127b755d35..da2f1c7b6ee300d9956684d3e5b8fdc9e1a8b40a 100644 (file)
@@ -649,7 +649,7 @@ gboolean
 gst_analytics_relation_meta_set_relation (GstAnalyticsRelationMeta * meta,
     GstAnalyticsRelTypes type, guint an_meta_first_id, guint an_meta_second_id)
 {
-  g_return_val_if_fail (type < GST_ANALYTICS_REL_TYPE_LAST, FALSE);
+  g_return_val_if_fail (type <= 0xFF, FALSE);
   g_return_val_if_fail (meta, FALSE);
   if (an_meta_first_id >= meta->rel_order
       || an_meta_second_id >= meta->rel_order) {
index 1bb761c097ae61f47db156c3a57d10c6794c0e9b..a6e9ab816be988dab80910fd9a08eb89da5c27e3 100644 (file)
@@ -169,8 +169,10 @@ GstAnalyticsRelationMetaInitParams;
  * @GST_ANALYTICS_REL_TYPE_NONE: No relation
  * @GST_ANALYTICS_REL_TYPE_IS_PART_OF: First analysis-meta is part of second analysis-meta
  * @GST_ANALYTICS_REL_TYPE_CONTAIN: First analysis-meta contain second analysis-meta.
- * @GST_ANALYTICS_REL_TYPE_RELATE: First analysis-meta relate to second analysis-meta.
- * @GST_ANALYTICS_REL_TYPE_LAST: reserved
+ * @GST_ANALYTICS_REL_TYPE_RELATE_TO: First analysis-meta relate to second analysis-meta.
+ * @GST_ANALYTICS_REL_TYPE_N_TO_N: Used to express relations between two groups
+ *    where each group's components correspond to the respective component in the
+ *    other group. Since: 1.26
  * @GST_ANALYTICS_REL_TYPE_ANY: Only use for criteria.
  *
  * Since: 1.24
@@ -181,7 +183,15 @@ typedef enum
   GST_ANALYTICS_REL_TYPE_IS_PART_OF = (1 << 1),
   GST_ANALYTICS_REL_TYPE_CONTAIN = (1 << 2),
   GST_ANALYTICS_REL_TYPE_RELATE_TO = (1 << 3),
-  GST_ANALYTICS_REL_TYPE_LAST = (1 << 4),
+  /**
+   * GST_ANALYTICS_REL_TYPE_N_TO_N:
+   *
+   * Used to express relations between two groups where each group's components
+   * correspond to the respective component in the other group.
+   *
+   * Since: 1.26
+   */
+  GST_ANALYTICS_REL_TYPE_N_TO_N = (1 << 4),
   GST_ANALYTICS_REL_TYPE_ANY = G_MAXINT
 } GstAnalyticsRelTypes;