camerabin2: replace deprecated g_atomic_int_exchange_and_add
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Wed, 14 Sep 2011 14:20:09 +0000 (15:20 +0100)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Fri, 16 Sep 2011 03:52:53 +0000 (00:52 -0300)
It was replaced by g_atomic_int_add, which now returns the
old value.

https://bugzilla.gnome.org/show_bug.cgi?id=659061

gst/camerabin2/gstcamerabin2.c

index aac9cc3..812f1bf 100644 (file)
 #include <gst/gst-i18n-plugin.h>
 #include <gst/pbutils/pbutils.h>
 
+#if GLIB_CHECK_VERSION(2,29,6)
+#define gst_camerabin2_atomic_int_add g_atomic_int_add
+#else
+#define gst_camerabin2_atomic_int_add g_atomic_int_exchange_and_add
+#endif
+
 #define GST_CAMERA_BIN2_PROCESSING_INC(c)                                \
 {                                                                       \
-  gint bef = g_atomic_int_exchange_and_add (&c->processing_counter, 1); \
+  gint bef = gst_camerabin2_atomic_int_add (&c->processing_counter, 1); \
   if (bef == 0)                                                         \
     g_object_notify (G_OBJECT (c), "idle");                             \
   GST_DEBUG_OBJECT ((c), "Processing counter incremented to: %d",       \