Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: content/renderer/media/media_stream_audio_source.cc

Issue 2919793002: Detect AudioInputStream muting and propagate to MediaStreamAudioSource. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/media_stream_audio_source.h" 5 #include "content/renderer/media/media_stream_audio_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "content/renderer/media/media_stream_audio_track.h" 10 #include "content/renderer/media/media_stream_audio_track.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 141
142 void MediaStreamAudioSource::StopSourceOnError(const std::string& why) { 142 void MediaStreamAudioSource::StopSourceOnError(const std::string& why) {
143 VLOG(1) << why; 143 VLOG(1) << why;
144 144
145 // Stop source when error occurs. 145 // Stop source when error occurs.
146 task_runner_->PostTask( 146 task_runner_->PostTask(
147 FROM_HERE, base::Bind(&MediaStreamSource::StopSource, GetWeakPtr())); 147 FROM_HERE, base::Bind(&MediaStreamSource::StopSource, GetWeakPtr()));
148 } 148 }
149 149
150 void MediaStreamAudioSource::SetMutedState(bool muted_state) {
151 DVLOG(3) << "MediaStreamAudioSource::SetMutedState state=" << muted_state;
152 task_runner_->PostTask(
153 FROM_HERE, base::Bind(&MediaStreamSource::SetSourceMuted, GetWeakPtr(),
ossu-chromium 2017/06/01 15:56:59 I've put SetSourceMuted directly in MediaStreamSou
Max Morin 2017/06/02 09:56:04 I think someone with experience in this layer shou
ossu-chromium 2017/06/02 10:47:59 Sounds good. I'll add him!
154 muted_state));
155 }
156
150 } // namespace content 157 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698