util: add GST_GROUP_ID_INVALID 05/199905/1 accepted/tizen/unified/20190218.163156 submit/tizen/20190218.050902
authorEunhae Choi <eunhae1.choi@samsung.com>
Fri, 15 Feb 2019 09:28:09 +0000 (18:28 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Fri, 15 Feb 2019 09:28:24 +0000 (18:28 +0900)
- get upstream patch to apply latest playback code

commit: e5c15f6b9605a1e682a60ea1bfadae831e651a41

Various plugins use special values (0 or G_MAXUINT32) as an
invalid/unset group_id, but nothing guarantees a groupid won't have
that value.
Instead define a value which group_id will never have and make
gst_group_id_next() always return a value different from that.

Change-Id: Ia77c491ff9a6389b769e3388efa826391211cb6b

gst/gstutils.h

index 414388d..bf859b1 100644 (file)
@@ -79,6 +79,18 @@ guint64         gst_util_uint64_scale_int_ceil  (guint64 val, gint num, gint den
 guint32         gst_util_seqnum_next            (void);
 gint32          gst_util_seqnum_compare         (guint32 s1, guint32 s2);
 
+/**
+ * GST_GROUP_ID_INVALID:
+ *
+ * A value which is guaranteed to never be returned by
+ * gst_util_group_id_next().
+ *
+ * Can be used as a default value in variables used to store group_id.
+ *
+ * Since: 1.14
+ */
+#define GST_GROUP_ID_INVALID (0)
+
 guint           gst_util_group_id_next          (void);
 
 /**