Mercurial > pidgin
diff libpurple/protocols/jabber/jingle/rtp.c @ 26384:bea334b214fa
Add purple_media_is_initiator.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Tue, 31 Mar 2009 01:38:50 +0000 |
parents | 12c7db418c3e |
children | f0de2405c2f1 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/rtp.c Mon Mar 30 23:50:44 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/rtp.c Tue Mar 31 01:38:50 2009 +0000 @@ -535,12 +535,14 @@ { JingleSession *session = jingle_content_get_session(content); PurpleMedia *media = jingle_rtp_get_media(session); + gchar *creator; gchar *media_type; gchar *remote_jid; gchar *senders; gchar *name; const gchar *transmitter; gboolean is_audio; + gboolean is_creator; PurpleMediaSessionType type; JingleTransport *transport; GParameter *params = NULL; @@ -582,8 +584,16 @@ params = jingle_get_params(jingle_session_get_js(session), &num_params); + + creator = jingle_content_get_creator(content); + if (!strcmp(creator, "initiator")) + is_creator = jingle_session_is_initiator(session); + else + is_creator = !jingle_session_is_initiator(session); + g_free(creator); + purple_media_add_stream(media, name, remote_jid, - type, transmitter, num_params, params); + type, is_creator, transmitter, num_params, params); g_free(name); g_free(media_type);