pidgin: a1debeea: Stop sending audio when placing a call o...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Tue Dec 28 06:10:32 EST 2010


----------------------------------------------------------------------
Revision: a1debeea512ab90391be1034e483aaa5523f4e63
Parent:   f40ccfa5565db8b93956da1dd01b849a45794bd0
Author:   jakub.adam at ktknet.cz
Date:     12/28/10 06:03:37
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a1debeea512ab90391be1034e483aaa5523f4e63

Changelog: 

Stop sending audio when placing a call on hold.  Fixes #13032.

Changes against parent f40ccfa5565db8b93956da1dd01b849a45794bd0

  patched  ChangeLog
  patched  libpurple/media/backend-fs2.c

-------------- next part --------------
============================================================
--- ChangeLog	e6a216a88721cf7e84d7ed94a00ccea83eb53608
+++ ChangeLog	e3b276eebe971152d32d78f811ed793acaafebf7
@@ -1,6 +1,9 @@ version 2.7.10 (??/??/????):
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
 version 2.7.10 (??/??/????):
+	libpurple:
+	* Stop sending audio when placing a call on hold (Jakub Adam) (#13032)
+
 	Pidgin:
 	* Support using the Page Up and Page Down keys on the numeric keypad in
 	  the conversation window.  (Ryan Flegel) (#13127)
============================================================
--- libpurple/media/backend-fs2.c	c187c13aca0371ce75655a9b829abc0e3eeb0ca7
+++ libpurple/media/backend-fs2.c	013ab205756cba7220f01f269f525cd7f3bad80c
@@ -1129,6 +1129,21 @@ stream_info_cb(PurpleMedia *media, Purpl
 				g_object_set(volume, "mute", active, NULL);
 			}
 		}
+	} else if (local == TRUE && (type == PURPLE_MEDIA_INFO_HOLD ||
+			type == PURPLE_MEDIA_INFO_UNHOLD)) {
+		gboolean active = (type == PURPLE_MEDIA_INFO_HOLD);
+		GList *streams = get_streams(self, sid, name);
+		for (; streams; streams =
+				g_list_delete_link(streams, streams)) {
+			PurpleMediaBackendFs2Stream *stream = streams->data;
+			if (stream->session->type & PURPLE_MEDIA_SEND_AUDIO) {
+				g_object_set(stream->stream, "direction",
+						session_type_to_fs_stream_direction(
+						stream->session->type & ((active) ?
+						~PURPLE_MEDIA_SEND_AUDIO :
+						PURPLE_MEDIA_AUDIO)), NULL);
+			}
+		}
 	} else if (local == TRUE && (type == PURPLE_MEDIA_INFO_PAUSE ||
 			type == PURPLE_MEDIA_INFO_UNPAUSE)) {
 		gboolean active = (type == PURPLE_MEDIA_INFO_PAUSE);


More information about the Commits mailing list