aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-28 20:05:43 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-02 00:19:40 +0800
commit57a7b1ba43133f3f3097d00b89a8d8f7f246ccdb (patch)
treed56fd559d83d857238b7c66a94254b3aeacc70fe /libempathy-gtk
parent758b4250e767d9e952b8c0ea4db7d93df192a0c0 (diff)
downloadgsoc2013-empathy-57a7b1ba43133f3f3097d00b89a8d8f7f246ccdb.tar
gsoc2013-empathy-57a7b1ba43133f3f3097d00b89a8d8f7f246ccdb.tar.gz
gsoc2013-empathy-57a7b1ba43133f3f3097d00b89a8d8f7f246ccdb.tar.bz2
gsoc2013-empathy-57a7b1ba43133f3f3097d00b89a8d8f7f246ccdb.tar.lz
gsoc2013-empathy-57a7b1ba43133f3f3097d00b89a8d8f7f246ccdb.tar.xz
gsoc2013-empathy-57a7b1ba43133f3f3097d00b89a8d8f7f246ccdb.tar.zst
gsoc2013-empathy-57a7b1ba43133f3f3097d00b89a8d8f7f246ccdb.zip
Allow to build with empathy-av
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-call-utils.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/libempathy-gtk/empathy-call-utils.c b/libempathy-gtk/empathy-call-utils.c
index 1dca38645..545ec7ce8 100644
--- a/libempathy-gtk/empathy-call-utils.c
+++ b/libempathy-gtk/empathy-call-utils.c
@@ -143,24 +143,24 @@ create_call_channel_cb (GObject *source,
if (tp_account_channel_request_create_channel_finish (
TP_ACCOUNT_CHANNEL_REQUEST (source), result, &error))
{
- g_object_unref (streamed_media_req);
+ g_clear_object (&streamed_media_req);
return;
}
DEBUG ("Failed to create Call channel: %s", error->message);
- if (error->code != TP_ERROR_NOT_IMPLEMENTED)
+ if (streamed_media_req != NULL)
{
- show_call_error (error);
+ DEBUG ("Let's try with an StreamedMedia channel");
+ g_error_free (error);
+ tp_account_channel_request_create_channel_async (streamed_media_req,
+ EMPATHY_AV_BUS_NAME, NULL,
+ create_streamed_media_channel_cb,
+ NULL);
return;
}
- DEBUG ("Let's try with an StreamedMedia channel");
- g_error_free (error);
- tp_account_channel_request_create_channel_async (streamed_media_req,
- EMPATHY_AV_BUS_NAME, NULL,
- create_streamed_media_channel_cb,
- NULL);
+ show_call_error (error);
}
/* Try to request a Call channel and fallback to StreamedMedia if that fails */
@@ -171,8 +171,11 @@ call_new_with_streams (const gchar *contact,
gboolean initial_video,
gint64 timestamp)
{
- GHashTable *call_request, *streamed_media_request;
- TpAccountChannelRequest *call_req, *streamed_media_req;
+ GHashTable *call_request;
+ TpAccountChannelRequest *call_req, *streamed_media_req = NULL;
+#ifdef HAVE_EMPATHY_AV
+ GHashTable *streamed_media_request;
+#endif
/* Call */
call_request = empathy_call_create_call_request (contact,
@@ -183,6 +186,7 @@ call_new_with_streams (const gchar *contact,
g_hash_table_unref (call_request);
+#ifdef HAVE_EMPATHY_AV
/* StreamedMedia */
streamed_media_request = empathy_call_create_streamed_media_request (
contact, initial_audio, initial_video);
@@ -192,11 +196,10 @@ call_new_with_streams (const gchar *contact,
timestamp);
g_hash_table_unref (streamed_media_request);
+#endif
tp_account_channel_request_create_channel_async (call_req,
- EMPATHY_CALL_BUS_NAME, NULL,
- create_call_channel_cb,
- streamed_media_req);
+ EMPATHY_CALL_BUS_NAME, NULL, create_call_channel_cb, streamed_media_req);
g_object_unref (call_req);
}