diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-15 19:26:00 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-15 19:26:00 +0800 |
commit | 30abba7499230b0a5bf2606317f28dc7dd350d6a (patch) | |
tree | 689375054a0e8515db0887d8a7d31ee733b8baa8 | |
parent | 5dc17e094fb35e462516b2fae78db04e3a7f356d (diff) | |
download | gsoc2013-empathy-30abba7499230b0a5bf2606317f28dc7dd350d6a.tar gsoc2013-empathy-30abba7499230b0a5bf2606317f28dc7dd350d6a.tar.gz gsoc2013-empathy-30abba7499230b0a5bf2606317f28dc7dd350d6a.tar.bz2 gsoc2013-empathy-30abba7499230b0a5bf2606317f28dc7dd350d6a.tar.lz gsoc2013-empathy-30abba7499230b0a5bf2606317f28dc7dd350d6a.tar.xz gsoc2013-empathy-30abba7499230b0a5bf2606317f28dc7dd350d6a.tar.zst gsoc2013-empathy-30abba7499230b0a5bf2606317f28dc7dd350d6a.zip |
Request audio and video streams if capabilities are unknown.
svn path=/trunk/; revision=944
-rw-r--r-- | libempathy/empathy-tp-call.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c index ae5f83f1c..1d7ec2c4e 100644 --- a/libempathy/empathy-tp-call.c +++ b/libempathy/empathy-tp-call.c @@ -242,6 +242,9 @@ tp_call_request_streams_for_capabilities (EmpathyTpCall *call, guint handle; guint stream_type; + if (capabilities == EMPATHY_CAPABILITIES_UNKNOWN) + capabilities = EMPATHY_CAPABILITIES_AUDIO | EMPATHY_CAPABILITIES_VIDEO; + empathy_debug (DEBUG_DOMAIN, "Requesting new stream for capabilities %d", capabilities); @@ -270,23 +273,9 @@ static void tp_call_request_streams (EmpathyTpCall *call) { EmpathyTpCallPriv *priv = GET_PRIV (call); - EmpathyCapabilities capabilities; - TpConnection *connection; - empathy_debug (DEBUG_DOMAIN, - "Requesting appropriate audio/video streams from contact"); - - /* FIXME: SIP don't have capabilities interface but we know it supports - * only audio and not video. */ - g_object_get (priv->channel, "connection", &connection, NULL); - if (!tp_proxy_has_interface_by_id (connection, - TP_IFACE_QUARK_CONNECTION_INTERFACE_CAPABILITIES)) - capabilities = EMPATHY_CAPABILITIES_AUDIO; - else - capabilities = empathy_contact_get_capabilities (priv->contact); - - tp_call_request_streams_for_capabilities (call, capabilities); - g_object_unref (connection); + tp_call_request_streams_for_capabilities (call, + empathy_contact_get_capabilities (priv->contact)); } static void @@ -696,7 +685,9 @@ empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call, if (!priv->video->exists) { - tp_call_request_streams_for_capabilities (call, EMPATHY_CAPABILITIES_VIDEO); + if (is_sending) + tp_call_request_streams_for_capabilities (call, + EMPATHY_CAPABILITIES_VIDEO); return; } |