Mercurial > pidgin
diff libpurple/media/backend-fs2.c @ 29184:dfc724880907
Move pause functionality to the Fs2 media backend.
author | maiku@pidgin.im |
---|---|
date | Tue, 27 Oct 2009 18:15:23 +0000 |
parents | 3bab2237724d |
children | f65689100cfe |
line wrap: on
line diff
--- a/libpurple/media/backend-fs2.c Tue Oct 27 17:48:26 2009 +0000 +++ b/libpurple/media/backend-fs2.c Tue Oct 27 18:15:23 2009 +0000 @@ -1053,6 +1053,21 @@ 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); + } + } } }