maiku.vv: 56b72201: Combine get_*_codecs functions to mirror...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Thu Nov 13 00:35:22 EST 2008


-----------------------------------------------------------------
Revision: 56b722019acec382844da07247d210ca6df8ead8
Ancestor: b8dd01811111576c48cce1dbe5299f7422af4c2c
Author: maiku at soc.pidgin.im
Date: 2008-11-13T03:46:28
Branch: im.pidgin.maiku.vv
URL: http://d.pidgin.im/viewmtn/revision/info/56b722019acec382844da07247d210ca6df8ead8

Modified files:
        libpurple/media.c libpurple/media.h
        libpurple/protocols/jabber/google.c
        libpurple/protocols/jabber/jingle/rtp.c

ChangeLog: 

Combine get_*_codecs functions to mirror Farsight 2.

-------------- next part --------------
============================================================
--- libpurple/media.c	34d6715ff0352e75b4535c5406cd3179356e943c
+++ libpurple/media.c	5f80c23145ceafaab4c05c9a06350ff1a615b884
@@ -1249,7 +1249,7 @@ GList *
 }
 /* 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 @@ purple_media_get_local_candidates(Purple
 	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,
============================================================
--- libpurple/media.h	a2b8ef361aaf020ebfca4cc94215e9ba2ee9b8af
+++ libpurple/media.h	b154067811eda005edd16e70fa4d817577163d4c
@@ -375,26 +375,16 @@ PurpleMediaSessionType purple_media_get_
 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);
+GList *purple_media_get_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);
-
-/**
  * Adds remote candidates to the stream.
  *
  * @param media The media object to find the session in.
============================================================
--- libpurple/protocols/jabber/google.c	f78315a466d618f85fb75886d97310f66e5a6274
+++ libpurple/protocols/jabber/google.c	49199cb30facbaaf4e0453f959af4c25b74fbac8
@@ -102,7 +102,7 @@ google_session_send_accept(GoogleSession
 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);
============================================================
--- libpurple/protocols/jabber/jingle/rtp.c	0bc9661a54836f1529024c821dd5de69913c1c25
+++ libpurple/protocols/jabber/jingle/rtp.c	8997af327be1605dcbe13f6e0ea4f4cd52b11d60
@@ -523,7 +523,7 @@ jingle_rtp_to_xml_internal(JingleContent
 		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);
 


More information about the Commits mailing list