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

Unified Diff: media/audio/audio_input_device.cc

Issue 2919793002: Detect AudioInputStream muting and propagate to MediaStreamAudioSource. (Closed)
Patch Set: Reworked test again, to make tsan2 happy. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_input_device.h ('k') | media/audio/audio_input_device_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_device.cc
diff --git a/media/audio/audio_input_device.cc b/media/audio/audio_input_device.cc
index 66966381cdcc46ab9f264d3ac2db7ad854bf4d90..eb31a5723ff53594e1210cbecfa4e74274a38e26 100644
--- a/media/audio/audio_input_device.cc
+++ b/media/audio/audio_input_device.cc
@@ -225,6 +225,14 @@ void AudioInputDevice::OnError() {
}
}
+void AudioInputDevice::OnMuted(bool is_muted) {
+ DCHECK(task_runner()->BelongsToCurrentThread());
+ // Do nothing if the stream has been closed.
+ if (state_ < CREATING_STREAM)
+ return;
+ callback_->OnCaptureMuted(is_muted);
+}
+
void AudioInputDevice::OnIPCClosed() {
DCHECK(task_runner()->BelongsToCurrentThread());
state_ = IPC_CLOSED;
« no previous file with comments | « media/audio/audio_input_device.h ('k') | media/audio/audio_input_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698