Mercurial > pidgin
changeset 24960:a5f1804fcb4b
Combine get_*_codecs functions to mirror Farsight 2.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Thu, 13 Nov 2008 03:46:28 +0000 |
parents | e5da7110bec9 |
children | 403453f8b643 |
files | libpurple/media.c libpurple/media.h libpurple/protocols/jabber/google.c libpurple/protocols/jabber/jingle/rtp.c |
diffstat | 4 files changed, 6 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/media.c Sun Nov 09 20:55:10 2008 +0000 +++ b/libpurple/media.c Thu Nov 13 03:46:28 2008 +0000 @@ -1249,7 +1249,7 @@ } /* XXX: Should wait until codecs-ready is TRUE before using this function */ GList * -purple_media_get_local_codecs(PurpleMedia *media, const gchar *sess_id) +purple_media_get_codecs(PurpleMedia *media, const gchar *sess_id) { GList *codecs; g_object_get(G_OBJECT(purple_media_get_session(media, sess_id)->session), @@ -1264,15 +1264,6 @@ return fs_candidate_list_copy( purple_media_session_get_local_candidates(session, name)); } -/* XXX: Should wait until codecs-ready is TRUE before using this function */ -GList * -purple_media_get_negotiated_codecs(PurpleMedia *media, const gchar *sess_id) -{ - PurpleMediaSession *session = purple_media_get_session(media, sess_id); - GList *codec_intersection; - g_object_get(session->session, "codecs", &codec_intersection, NULL); - return codec_intersection; -} void purple_media_add_remote_candidates(PurpleMedia *media, const gchar *sess_id,
--- a/libpurple/media.h Sun Nov 09 20:55:10 2008 +0000 +++ b/libpurple/media.h Thu Nov 13 03:46:28 2008 +0000 @@ -375,24 +375,14 @@ PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id); /** - * Gets the negotiated codecs from a session. + * Gets the codecs from a session. * * @param media The media object to find the session in. - * @param sess_id The session id of the session to get the negotiated codecs from. + * @param sess_id The session id of the session to get the codecs from. * * @return The retreieved codecs. */ -GList *purple_media_get_negotiated_codecs(PurpleMedia *media, const gchar *sess_id); - -/** - * Gets the local codecs from a session. - * - * @param media The media object to find the session in. - * @param sess_id The session id of the session to get the local codecs from. - * - * @return The retreieved codecs. - */ -GList *purple_media_get_local_codecs(PurpleMedia *media, const gchar *sess_id); +GList *purple_media_get_codecs(PurpleMedia *media, const gchar *sess_id); /** * Adds remote candidates to the stream.
--- a/libpurple/protocols/jabber/google.c Sun Nov 09 20:55:10 2008 +0000 +++ b/libpurple/protocols/jabber/google.c Thu Nov 13 03:46:28 2008 +0000 @@ -102,7 +102,7 @@ google_session_send_accept(GoogleSession *session) { xmlnode *sess, *desc, *payload; - GList *codecs = purple_media_get_negotiated_codecs(session->media, "google-voice"); + GList *codecs = purple_media_get_codecs(session->media, "google-voice"); JabberIq *iq = jabber_iq_new(session->js, JABBER_IQ_SET); xmlnode_set_attrib(iq->node, "to", session->remote_jid);
--- a/libpurple/protocols/jabber/jingle/rtp.c Sun Nov 09 20:55:10 2008 +0000 +++ b/libpurple/protocols/jabber/jingle/rtp.c Thu Nov 13 03:46:28 2008 +0000 @@ -523,7 +523,7 @@ PurpleMedia *media = jingle_rtp_get_media(session); gchar *media_type = jingle_rtp_get_media_type(rtp); gchar *name = jingle_content_get_name(rtp); - GList *codecs = purple_media_get_local_codecs(media, name); + GList *codecs = purple_media_get_codecs(media, name); xmlnode_set_attrib(description, "media", media_type);