Mercurial > pidgin
changeset 29237:f93ac891ff01
propagate from branch 'im.pidgin.pidgin' (head 94fef144531267b3eb00d02de32ce8a705df592c)
to branch 'im.pidgin.pidgin.next.minor' (head 569f734111cee1874f2b78f46fc82fc1f39d2820)
author | maiku@pidgin.im |
---|---|
date | Wed, 11 Nov 2009 02:47:50 +0000 |
parents | be31e811cb26 (current diff) 867438a30bdd (diff) |
children | e4884dbf0c02 |
files | ChangeLog libpurple/media.c pidgin/gtkcelllayout.c pidgin/gtkcelllayout.h pidgin/gtkcellrendererprogress.c pidgin/gtkcellrendererprogress.h pidgin/gtkcellview.c pidgin/gtkcellview.h pidgin/gtkcellviewmenuitem.c pidgin/gtkcellviewmenuitem.h pidgin/gtkexpander.c pidgin/gtkexpander.h pidgin/pidgincombobox.c pidgin/pidgincombobox.h |
diffstat | 3 files changed, 70 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Nov 09 00:14:29 2009 +0000 +++ b/ChangeLog Wed Nov 11 02:47:50 2009 +0000 @@ -19,6 +19,8 @@ version 2.6.4 (??/??/20??): libpurple: * Actually emit the hold signal for media calls. + * Added "MXit" protocol plugin, supported and maintained by the MXit folks + themselves (MXit Lifestyle (Pty) Ltd.) General: * New 'plugins' sub-command to 'debug' command (i.e. '/debug plugins')
--- a/libpurple/media.c Mon Nov 09 00:14:29 2009 +0000 +++ b/libpurple/media.c Wed Nov 11 02:47:50 2009 +0000 @@ -2315,7 +2315,8 @@ stream->session->type), NULL); stream->accepted = TRUE; - if (stream->remote_candidates != NULL) { + if (stream->remote_candidates != NULL && + stream->initiator == FALSE) { GError *err = NULL; fs_stream_set_remote_candidates(stream->stream, stream->remote_candidates, &err); @@ -2850,14 +2851,16 @@ } fsstream = fs_session_new_stream(session->session, - participant, type_direction & - FS_DIRECTION_RECV, transmitter, + participant, initiator == TRUE ? + type_direction : (type_direction & + FS_DIRECTION_RECV), transmitter, new_num_params, param, &err); g_free(param); } else { fsstream = fs_session_new_stream(session->session, - participant, type_direction & - FS_DIRECTION_RECV, transmitter, + participant, initiator == TRUE ? + type_direction : (type_direction & + FS_DIRECTION_RECV), transmitter, num_params, params, &err); } @@ -2986,7 +2989,7 @@ stream->remote_candidates = g_list_concat(stream->remote_candidates, purple_media_candidate_list_to_fs(remote_candidates)); - if (stream->accepted == TRUE) { + if (stream->initiator == TRUE || stream->accepted == TRUE) { fs_stream_set_remote_candidates(stream->stream, stream->remote_candidates, &err);
--- a/libpurple/protocols/jabber/jingle/rtp.c Mon Nov 09 00:14:29 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/rtp.c Wed Nov 11 02:47:50 2009 +0000 @@ -823,6 +823,65 @@ g_object_unref(session); break; } + case JINGLE_DESCRIPTION_INFO: { + JingleSession *session = + jingle_content_get_session(content); + xmlnode *description = xmlnode_get_child( + xmlcontent, "description"); + GList *codecs, *iter, *iter2, *remote_codecs = + jingle_rtp_parse_codecs(description); + gchar *name = jingle_content_get_name(content); + gchar *remote_jid = + jingle_session_get_remote_jid(session); + PurpleMedia *media; + + media = jingle_rtp_get_media(session); + + /* + * This may have problems if description-info is + * received without the optional parameters for a + * codec with configuration info (such as THEORA + * or H264). The local configuration info may be + * set for the remote codec. + * + * As of 2.6.3 there's no API to support getting + * the remote codecs specifically, just the + * intersection. Another option may be to cache + * the remote codecs received in initiate/accept. + */ + codecs = purple_media_get_codecs(media, name); + + for (iter = codecs; iter; iter = g_list_next(iter)) { + guint id; + + id = purple_media_codec_get_id(iter->data); + iter2 = remote_codecs; + + for (; iter2; iter2 = g_list_next(iter2)) { + if (purple_media_codec_get_id( + iter2->data) != id) + continue; + + g_object_unref(iter->data); + iter->data = iter2->data; + remote_codecs = g_list_delete_link( + remote_codecs, iter2); + break; + } + } + + codecs = g_list_concat(codecs, remote_codecs); + g_list_free (remote_codecs); + + purple_media_set_remote_codecs(media, + name, remote_jid, codecs); + + purple_media_codec_list_free (codecs); + g_free(remote_jid); + g_free(name); + g_object_unref(session); + break; + } default: break; }