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

Side by Side Diff: content/browser/media/capture/web_contents_audio_muter.cc

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Control through AudioManager. Compiles on Linux, works with PulseAudio. Created 3 years, 11 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/browser/media/capture/web_contents_audio_muter.h" 5 #include "content/browser/media/capture/web_contents_audio_muter.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 30 matching lines...) Expand all
41 // AudioOutputStream implementation. 41 // AudioOutputStream implementation.
42 bool Open() override { return true; } 42 bool Open() override { return true; }
43 void Start(AudioSourceCallback* callback) override { 43 void Start(AudioSourceCallback* callback) override {
44 worker_.Start(base::Bind(&AudioDiscarder::FetchAudioData, 44 worker_.Start(base::Bind(&AudioDiscarder::FetchAudioData,
45 base::Unretained(this), 45 base::Unretained(this),
46 callback)); 46 callback));
47 } 47 }
48 void Stop() override { worker_.Stop(); } 48 void Stop() override { worker_.Stop(); }
49 void SetVolume(double volume) override {} 49 void SetVolume(double volume) override {}
50 void GetVolume(double* volume) override { *volume = 0; } 50 void GetVolume(double* volume) override { *volume = 0; }
51 void EnableDebugRecording(const base::FilePath& file_name) override {}
52 void DisableDebugRecording() override {}
51 void Close() override { delete this; } 53 void Close() override { delete this; }
52 54
53 private: 55 private:
54 ~AudioDiscarder() override {} 56 ~AudioDiscarder() override {}
55 57
56 void FetchAudioData(AudioSourceCallback* callback) { 58 void FetchAudioData(AudioSourceCallback* callback) {
57 callback->OnMoreData(base::TimeDelta(), base::TimeTicks::Now(), 0, 59 callback->OnMoreData(base::TimeDelta(), base::TimeTicks::Now(), 0,
58 audio_bus_.get()); 60 audio_bus_.get());
59 } 61 }
60 62
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return; 158 return;
157 is_muting_ = false; 159 is_muting_ = false;
158 BrowserThread::PostTask( 160 BrowserThread::PostTask(
159 BrowserThread::IO, FROM_HERE, 161 BrowserThread::IO, FROM_HERE,
160 base::Bind(&AudioMirroringManager::StopMirroring, 162 base::Bind(&AudioMirroringManager::StopMirroring,
161 base::Unretained(AudioMirroringManager::GetInstance()), 163 base::Unretained(AudioMirroringManager::GetInstance()),
162 base::RetainedRef(destination_))); 164 base::RetainedRef(destination_)));
163 } 165 }
164 166
165 } // namespace content 167 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698