aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-call.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-02-16 06:28:44 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-02-16 06:28:44 +0800
commitb68b95efe92023193c318d4dd0fb92544463adef (patch)
treea8299869c5f9203d294ebe2d0c7baaf4c1f96a91 /libempathy/empathy-tp-call.c
parentaec4141672783925d11bff56f9cd5019ef62c3c5 (diff)
downloadgsoc2013-empathy-b68b95efe92023193c318d4dd0fb92544463adef.tar
gsoc2013-empathy-b68b95efe92023193c318d4dd0fb92544463adef.tar.gz
gsoc2013-empathy-b68b95efe92023193c318d4dd0fb92544463adef.tar.bz2
gsoc2013-empathy-b68b95efe92023193c318d4dd0fb92544463adef.tar.lz
gsoc2013-empathy-b68b95efe92023193c318d4dd0fb92544463adef.tar.xz
gsoc2013-empathy-b68b95efe92023193c318d4dd0fb92544463adef.tar.zst
gsoc2013-empathy-b68b95efe92023193c318d4dd0fb92544463adef.zip
Merge commit 'sjoerd/master'
svn path=/trunk/; revision=637
Diffstat (limited to 'libempathy/empathy-tp-call.c')
-rw-r--r--libempathy/empathy-tp-call.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index b72e3877e..4ec4a97ff 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -326,6 +326,20 @@ tp_call_request_streams_for_capabilities (EmpathyTpCall *call,
}
static void
+tp_call_request_streams_capabilities_cb (EmpathyContact *contact,
+ GParamSpec *property, gpointer user_data)
+{
+ EmpathyTpCall *call = EMPATHY_TP_CALL (user_data);
+
+ g_signal_handlers_disconnect_by_func (contact,
+ tp_call_request_streams_capabilities_cb,
+ user_data);
+
+ tp_call_request_streams_for_capabilities (call,
+ empathy_contact_get_capabilities (contact));
+}
+
+static void
tp_call_request_streams (EmpathyTpCall *call)
{
EmpathyTpCallPriv *priv = GET_PRIV (call);
@@ -335,7 +349,6 @@ tp_call_request_streams (EmpathyTpCall *call)
empathy_debug (DEBUG_DOMAIN,
"Requesting appropriate audio/video streams from contact");
- capabilities = empathy_contact_get_capabilities (priv->contact);
/* FIXME: SIP don't have capabilities interface but we know it supports
* only audio and not video. */
@@ -345,6 +358,15 @@ tp_call_request_streams (EmpathyTpCall *call)
{
capabilities = EMPATHY_CAPABILITIES_AUDIO;
}
+ else
+ {
+ capabilities = empathy_contact_get_capabilities (priv->contact);
+ if (capabilities == EMPATHY_CAPABILITIES_UNKNOWN) {
+ g_signal_connect (G_OBJECT (priv->contact), "notify::capabilities",
+ G_CALLBACK (tp_call_request_streams_capabilities_cb), call);
+ return;
+ }
+ }
tp_call_request_streams_for_capabilities (call, capabilities);
}