telepathy-gabble: Fix for initiating a video call from an Android tablet.

Sjoerd Simons sjoerd at kemper.freedesktop.org
Sat Jun 2 04:23:08 PDT 2012


Module: telepathy-gabble
Branch: master
Commit: e1673f4fb2818a8c2906b056a0a62d28cdd54097
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=e1673f4fb2818a8c2906b056a0a62d28cdd54097

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 179c3f2..e343ef2 100644
--- a/src/jingle-media-rtp.c
+++ b/src/jingle-media-rtp.c
@@ -336,7 +336,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 588ad42..b66cdfb 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -1038,6 +1038,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