Mercurial > pidgin
changeset 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 |
files | libpurple/media/backend-fs2.c libpurple/media/media.c |
diffstat | 2 files changed, 15 insertions(+), 15 deletions(-) [+] |
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); + } + } } }
--- a/libpurple/media/media.c Tue Oct 27 17:48:26 2009 +0000 +++ b/libpurple/media/media.c Tue Oct 27 18:15:23 2009 +0000 @@ -933,21 +933,6 @@ 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],