telepathy-gabble: Fix for initiating a video call from an Android tablet.
Simon McVittie
smcv at kemper.freedesktop.org
Tue Sep 11 04:26:44 PDT 2012
Module: telepathy-gabble
Branch: master
Commit: 287fb2d9fabd2703c17020c4fd9493e8531c0a03
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=287fb2d9fabd2703c17020c4fd9493e8531c0a03
Author: Marcus Lundblad <ml at update.uu.se>
Date: Fri May 18 13:29:12 2012 +0200
Fix for initiating a video call from an Android tablet.
Reviewed-by: Sjoerd Simons <sjoerd at greynoise.nl>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36998
---
gabble/capabilities.h | 2 ++
src/jingle-media-rtp.c | 4 +++-
src/presence-cache.c | 12 ++++++++++++
3 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/gabble/capabilities.h b/gabble/capabilities.h
index 2e31755..81c8c25 100644
--- a/gabble/capabilities.h
+++ b/gabble/capabilities.h
@@ -33,6 +33,8 @@
#define QUIRK_OMITS_CONTENT_CREATORS "\x07omits-content-creators"
/* The Google Webmail client doesn't support some features */
#define QUIRK_GOOGLE_WEBMAIL_CLIENT "\x07google-webmail-client"
+/* The Android GTalk client needs a quirk for component names */
+#define QUIRK_ANDROID_GTALK_CLIENT "\x07android-gtalk-client"
/* Some useful capability sets for Jingle etc. */
const GabbleCapabilitySet *gabble_capabilities_get_legacy (void);
diff --git a/src/jingle-media-rtp.c b/src/jingle-media-rtp.c
index 9a12007..45a1419 100644
--- a/src/jingle-media-rtp.c
+++ b/src/jingle-media-rtp.c
@@ -337,7 +337,9 @@ static void transport_created (GabbleJingleContent *content,
if (priv->media_type == JINGLE_MEDIA_TYPE_VIDEO &&
(JINGLE_IS_GOOGLE_DIALECT (dialect) ||
gabble_jingle_session_peer_has_cap (content->session,
- QUIRK_GOOGLE_WEBMAIL_CLIENT)))
+ QUIRK_GOOGLE_WEBMAIL_CLIENT) ||
+ gabble_jingle_session_peer_has_cap (content->session,
+ QUIRK_ANDROID_GTALK_CLIENT)))
{
jingle_transport_google_set_component_name (gtrans, "video_rtp", 1);
jingle_transport_google_set_component_name (gtrans, "video_rtcp", 2);
diff --git a/src/presence-cache.c b/src/presence-cache.c
index b5a0dab..31a3012 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -1042,6 +1042,18 @@ _parse_node (GabblePresence *presence,
gabble_presence_set_capabilities (presence, resource, cap_set, NULL, serial);
gabble_capability_set_free (cap_set);
}
+
+ if (!tp_strdiff (node, "http://www.android.com/gtalk/client/caps") ||
+ !tp_strdiff (node, "http://www.android.com/gtalk/client/caps2"))
+ {
+ GabbleCapabilitySet *cap_set = gabble_capability_set_new ();
+
+ DEBUG ("Client is Android GTalk Client");
+
+ gabble_capability_set_add (cap_set, QUIRK_ANDROID_GTALK_CLIENT);
+ gabble_presence_set_capabilities (presence, resource, cap_set, NULL, serial);
+ gabble_capability_set_free (cap_set);
+ }
}
More information about the telepathy-commits
mailing list