cpw.maiku.media_refactor: 88f46629: Move pause functionality to the Fs2 medi...

maiku at pidgin.im maiku at pidgin.im
Tue Oct 27 20:28:02 EDT 2009


-----------------------------------------------------------------
Revision: 88f466299fba0e44f90683f5e90576e1192fb393
Ancestor: a5ded9ac4f8af04224b34c7710b6ccc6ddd627fd
Author: maiku at pidgin.im
Date: 2009-10-27T18:15:23
Branch: im.pidgin.cpw.maiku.media_refactor
URL: http://d.pidgin.im/viewmtn/revision/info/88f466299fba0e44f90683f5e90576e1192fb393

Modified files:
        libpurple/media/backend-fs2.c libpurple/media/media.c

ChangeLog: 

Move pause functionality to the Fs2 media backend.

-------------- next part --------------
============================================================
--- libpurple/media/backend-fs2.c	8e391c7f78766e99bed29e14264da1dd71a41d07
+++ libpurple/media/backend-fs2.c	c9f5d0e95ff8375132008940f63acd4ddfd50bd4
@@ -1053,6 +1053,21 @@ _stream_info_cb(PurpleMedia *media, Purp
 					err->message);
 			g_error_free(err);
 		}
+	} else if (local == TRUE && (type == PURPLE_MEDIA_INFO_PAUSE ||
+			type == PURPLE_MEDIA_INFO_UNPAUSE)) {
+		gboolean active = (type == PURPLE_MEDIA_INFO_PAUSE);
+		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_VIDEO) {
+				g_object_set(stream->stream, "direction",
+						_session_type_to_fs_stream_direction(
+						stream->session->type & ((active) ?
+						~PURPLE_MEDIA_SEND_VIDEO :
+						PURPLE_MEDIA_VIDEO)), NULL);
+			}
+		}
 	}
 }
 
============================================================
--- libpurple/media/media.c	0692588b8e77698cccf909f1c243a79c74439fac
+++ libpurple/media/media.c	f23d12b79180024af8760ada413c8fb15189bcca
@@ -933,21 +933,6 @@ purple_media_stream_info(PurpleMedia *me
 				g_object_set(volume, "mute", active, NULL);
 			}
 		}
-	} else if (local == TRUE && (type == PURPLE_MEDIA_INFO_PAUSE ||
-			type == PURPLE_MEDIA_INFO_UNPAUSE)) {
-		gboolean active = (type == PURPLE_MEDIA_INFO_PAUSE);
-		GList *streams = purple_media_get_streams(media,
-				session_id, participant);
-		for (; streams; streams = g_list_delete_link(streams, streams)) {
-			PurpleMediaStream *stream = streams->data;
-			if (stream->session->type & PURPLE_MEDIA_SEND_VIDEO) {
-				g_object_set(stream->stream, "direction",
-						purple_media_to_fs_stream_direction(
-						stream->session->type & ((active) ?
-						~PURPLE_MEDIA_SEND_VIDEO :
-						PURPLE_MEDIA_VIDEO)), NULL);
-			}
-		}
 	}
 
 	g_signal_emit(media, purple_media_signals[STREAM_INFO],


More information about the Commits mailing list