| Index: talk/session/media/channel.cc
|
| diff --git a/talk/session/media/channel.cc b/talk/session/media/channel.cc
|
| index f65579f98b221b2caac5e0feea8a0d3a395bc0f0..37ace7e619a5f4e0b9b875ba8eedfed9db493bb3 100644
|
| --- a/talk/session/media/channel.cc
|
| +++ b/talk/session/media/channel.cc
|
| @@ -323,14 +323,6 @@ bool BaseChannel::Enable(bool enable) {
|
| return true;
|
| }
|
|
|
| -bool BaseChannel::MuteStream(uint32 ssrc, bool mute) {
|
| - return InvokeOnWorker(Bind(&BaseChannel::MuteStream_w, this, ssrc, mute));
|
| -}
|
| -
|
| -bool BaseChannel::IsStreamMuted(uint32 ssrc) {
|
| - return InvokeOnWorker(Bind(&BaseChannel::IsStreamMuted_w, this, ssrc));
|
| -}
|
| -
|
| bool BaseChannel::AddRecvStream(const StreamParams& sp) {
|
| return InvokeOnWorker(Bind(&BaseChannel::AddRecvStream_w, this, sp));
|
| }
|
| @@ -724,23 +716,6 @@ void BaseChannel::DisableMedia_w() {
|
| ChangeState();
|
| }
|
|
|
| -bool BaseChannel::MuteStream_w(uint32 ssrc, bool mute) {
|
| - ASSERT(worker_thread_ == rtc::Thread::Current());
|
| - bool ret = media_channel()->MuteStream(ssrc, mute);
|
| - if (ret) {
|
| - if (mute)
|
| - muted_streams_.insert(ssrc);
|
| - else
|
| - muted_streams_.erase(ssrc);
|
| - }
|
| - return ret;
|
| -}
|
| -
|
| -bool BaseChannel::IsStreamMuted_w(uint32 ssrc) {
|
| - ASSERT(worker_thread_ == rtc::Thread::Current());
|
| - return muted_streams_.find(ssrc) != muted_streams_.end();
|
| -}
|
| -
|
| void BaseChannel::ChannelWritable_w() {
|
| ASSERT(worker_thread_ == rtc::Thread::Current());
|
| if (writable_)
|
| @@ -1295,6 +1270,16 @@ bool VoiceChannel::SetLocalRenderer(uint32 ssrc, AudioRenderer* renderer) {
|
| media_channel(), ssrc, renderer));
|
| }
|
|
|
| +bool VoiceChannel::MuteStream(uint32 ssrc, bool mute,
|
| + const AudioOptions* options) {
|
| + return InvokeOnWorker(
|
| + Bind(&VoiceChannel::MuteStream_w, this, ssrc, mute, options));
|
| +}
|
| +
|
| +bool VoiceChannel::IsStreamMuted(uint32 ssrc) {
|
| + return InvokeOnWorker(Bind(&VoiceChannel::IsStreamMuted_w, this, ssrc));
|
| +}
|
| +
|
| bool VoiceChannel::SetRingbackTone(const void* buf, int len) {
|
| return InvokeOnWorker(Bind(&VoiceChannel::SetRingbackTone_w, this, buf, len));
|
| }
|
| @@ -1397,13 +1382,27 @@ bool VoiceChannel::IsTypingMonitorRunning() const {
|
| return typing_monitor_;
|
| }
|
|
|
| -bool VoiceChannel::MuteStream_w(uint32 ssrc, bool mute) {
|
| - bool ret = BaseChannel::MuteStream_w(ssrc, mute);
|
| - if (typing_monitor_ && mute)
|
| +bool VoiceChannel::MuteStream_w(uint32 ssrc, bool mute,
|
| + const AudioOptions* options) {
|
| + ASSERT(worker_thread()->IsCurrent());
|
| + bool ret = media_channel()->MuteStream(ssrc, mute, options);
|
| + if (ret) {
|
| + if (mute)
|
| + muted_streams_.insert(ssrc);
|
| + else
|
| + muted_streams_.erase(ssrc);
|
| + }
|
| + if (typing_monitor_ && mute) {
|
| typing_monitor_->OnChannelMuted();
|
| + }
|
| return ret;
|
| }
|
|
|
| +bool VoiceChannel::IsStreamMuted_w(uint32 ssrc) {
|
| + ASSERT(worker_thread()->IsCurrent());
|
| + return muted_streams_.find(ssrc) != muted_streams_.end();
|
| +}
|
| +
|
| int VoiceChannel::GetInputLevel_w() {
|
| return media_engine_->GetInputLevel();
|
| }
|
| @@ -1581,11 +1580,6 @@ bool VoiceChannel::InsertDtmf_w(uint32 ssrc, int event, int duration,
|
| return media_channel()->InsertDtmf(ssrc, event, duration, flags);
|
| }
|
|
|
| -bool VoiceChannel::SetChannelOptions(const AudioOptions& options) {
|
| - return InvokeOnWorker(Bind(&VoiceMediaChannel::SetOptions,
|
| - media_channel(), options));
|
| -}
|
| -
|
| void VoiceChannel::OnMessage(rtc::Message *pmsg) {
|
| switch (pmsg->message_id) {
|
| case MSG_EARLYMEDIATIMEOUT:
|
| @@ -1756,6 +1750,12 @@ bool VideoChannel::RequestIntraFrame() {
|
| return true;
|
| }
|
|
|
| +bool VideoChannel::MuteStream(uint32 ssrc, bool mute,
|
| + const VideoOptions* options) {
|
| + return InvokeOnWorker(
|
| + Bind(&VideoChannel::MuteStream_w, this, ssrc, mute, options));
|
| +}
|
| +
|
| void VideoChannel::ChangeState() {
|
| // Render incoming data if we're the active call, and we have the local
|
| // content. We receive data on the default channel and multiplexed streams.
|
| @@ -1973,11 +1973,6 @@ void VideoChannel::OnScreencastWindowEvent_s(uint32 ssrc,
|
| SignalScreencastWindowEvent(ssrc, we);
|
| }
|
|
|
| -bool VideoChannel::SetChannelOptions(const VideoOptions &options) {
|
| - return InvokeOnWorker(Bind(&VideoMediaChannel::SetOptions,
|
| - media_channel(), options));
|
| -}
|
| -
|
| void VideoChannel::OnMessage(rtc::Message *pmsg) {
|
| switch (pmsg->message_id) {
|
| case MSG_SCREENCASTWINDOWEVENT: {
|
| @@ -2087,11 +2082,16 @@ void VideoChannel::OnSrtpError(uint32 ssrc, SrtpFilter::Mode mode,
|
| }
|
| }
|
|
|
| -
|
| void VideoChannel::GetSrtpCiphers(std::vector<std::string>* ciphers) const {
|
| GetSupportedVideoCryptoSuites(ciphers);
|
| }
|
|
|
| +bool VideoChannel::MuteStream_w(uint32 ssrc, bool mute,
|
| + const VideoOptions* options) {
|
| + ASSERT(worker_thread()->IsCurrent());
|
| + return media_channel()->MuteStream(ssrc, mute, options);
|
| +}
|
| +
|
| DataChannel::DataChannel(rtc::Thread* thread,
|
| DataMediaChannel* media_channel,
|
| BaseSession* session,
|
|
|