From d8236c1bb2dad2cd159e2f728b626540df1d7997 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 8 Jan 2014 19:40:16 +0000 Subject: [PATCH 2/8] Catch up with GLib deprecations --- configure.ac | 2 +- examples/call-handler.c | 1 - telepathy-farstream/call-content.c | 14 +++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 3d7fda7..b0fdfa6 100644 --- a/configure.ac +++ b/configure.ac @@ -84,7 +84,7 @@ CFLAGS="$CFLAGS" dnl Check for Glib PKG_CHECK_MODULES(GLIB, gobject-2.0 >= 2.32 glib-2.0 >= 2.32 gio-2.0) -AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_30, [Ignore post 2.30 deprecations]) +AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_32, [Ignore post 2.32 deprecations]) AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_32, [Prevent post 2.32 APIs]) AC_SUBST(GLIB_CFLAGS) diff --git a/examples/call-handler.c b/examples/call-handler.c index d907dd1..d26aea4 100644 --- a/examples/call-handler.c +++ b/examples/call-handler.c @@ -592,7 +592,6 @@ main (int argc, char **argv) TpBaseClient *client; TpAccountManager *am; - g_type_init (); gst_init (&argc, &argv); loop = g_main_loop_new (NULL, FALSE); diff --git a/telepathy-farstream/call-content.c b/telepathy-farstream/call-content.c index 530383e..dff173f 100644 --- a/telepathy-farstream/call-content.c +++ b/telepathy-farstream/call-content.c @@ -85,7 +85,7 @@ struct _TfCallContent { /* Streams for which we don't have a session yet*/ GList *outstanding_streams; - GMutex *mutex; + GMutex mutex; gboolean remote_codecs_set; @@ -127,8 +127,8 @@ G_DEFINE_TYPE_WITH_CODE (TfCallContent, tf_call_content, TF_TYPE_CONTENT, G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, call_content_async_initable_init)) -#define TF_CALL_CONTENT_LOCK(self) g_mutex_lock ((self)->mutex) -#define TF_CALL_CONTENT_UNLOCK(self) g_mutex_unlock ((self)->mutex) +#define TF_CALL_CONTENT_LOCK(self) g_mutex_lock (&(self)->mutex) +#define TF_CALL_CONTENT_UNLOCK(self) g_mutex_unlock (&(self)->mutex) enum @@ -330,7 +330,7 @@ tf_call_content_init (TfCallContent *self) self->fsstreams = g_ptr_array_new (); self->dtmf_sending_state = TP_SENDING_STATE_NONE; - self->mutex = g_mutex_new (); + g_mutex_init (&self->mutex); self->requested_input_volume = -1; self->requested_output_volume = -1; @@ -403,7 +403,7 @@ tf_call_content_finalize (GObject *object) fs_codec_list_destroy (self->last_sent_codecs); self->last_sent_codecs = NULL; - g_mutex_free (self->mutex); + g_mutex_clear (&self->mutex); if (G_OBJECT_CLASS (tf_call_content_parent_class)->finalize) G_OBJECT_CLASS (tf_call_content_parent_class)->finalize (object); @@ -784,7 +784,7 @@ process_media_description_try_codecs (TfCallContent *self, FsStream *fsstream, g_debug ("Rejecting Media Description"); tp_cli_call1_content_media_description_call_reject (media_description, -1, reason, NULL, NULL, NULL, NULL); - g_value_array_free (reason); + tp_value_array_free (reason); g_object_unref (media_description); } g_clear_error (&error); @@ -2492,7 +2492,7 @@ tf_call_content_iterate_src_pads (TfContent *content, guint *handles, iter = (struct StreamSrcPadIterator *) gst_iterator_new ( sizeof (struct StreamSrcPadIterator), GST_TYPE_PAD, - self->mutex, &self->fsstreams_cookie, + &self->mutex, &self->fsstreams_cookie, streams_src_pads_iter_copy, streams_src_pads_iter_next, streams_src_pads_iter_item, -- 1.8.5.2