pidgin.vv: 853735ce: Very basic receive only GTalk audio sess...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Sun Nov 16 01:25:25 EST 2008


-----------------------------------------------------------------
Revision: 853735cedeb2087f31f7857b5aed394b8eed525e
Ancestor: e5c33a67242135d543b181caf8c3309a79402cb3
Author: maiku at soc.pidgin.im
Date: 2008-11-16T06:21:31
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/853735cedeb2087f31f7857b5aed394b8eed525e

Modified files:
        libpurple/protocols/jabber/google.c

ChangeLog: 

Very basic receive only GTalk audio sessions.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/google.c	49199cb30facbaaf4e0453f959af4c25b74fbac8
+++ libpurple/protocols/jabber/google.c	8009b843222ef42054b47c51b021355b100eabb9
@@ -157,7 +157,8 @@ static void 
 
 
 static void 
-google_session_candidates_prepared (PurpleMedia *media, GoogleSession *session)
+google_session_candidates_prepared (PurpleMedia *media, gchar *session_id,
+		gchar *participant, GoogleSession *session)
 {
 	JabberIq *iq = jabber_iq_new(session->js, JABBER_IQ_SET);
 	GList *candidates = purple_media_get_local_candidates(session->media, "google-voice",
@@ -208,6 +209,7 @@ google_session_handle_initiate(JabberStr
 	xmlnode *desc_element, *codec_element;
 	FsCodec *codec;
 	const char *id, *encoding_name,  *clock_rate;
+	GParameter param;
 		
 	if (session->state != UNINIT) {
 		purple_debug_error("jabber", "Received initiate for active session.\n");
@@ -217,10 +219,14 @@ google_session_handle_initiate(JabberStr
 	session->media = purple_media_manager_create_media(purple_media_manager_get(), js->gc,
 							   "fsrtpconference", session->remote_jid);
 
-	/* "rawudp" will need to be changed to "nice" when libnice is finished */
-	/* GTalk will require the NICE_COMPATIBILITY_GOOGLE param */
+	/* GTalk requires the NICE_COMPATIBILITY_GOOGLE param */
+	param.name = "compatibility-mode";
+	memset(&param.value, 0, sizeof(GValue));
+	g_value_init(&param.value, G_TYPE_UINT);
+	g_value_set_uint(&param.value, 1); /* NICE_COMPATIBILITY_GOOGLE */
+
 	purple_media_add_stream(session->media, "google-voice", session->remote_jid, 
-				PURPLE_MEDIA_AUDIO, "rawudp", 0, NULL);
+				PURPLE_MEDIA_AUDIO, "nice", 1, &param);
 
 	desc_element = xmlnode_get_child(sess, "description");
 	


More information about the Commits mailing list