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

Side by Side Diff: media/audio/audio_manager.h

Issue 2885173002: Make AudioDebugFileWriter create its own file worker thread. (Closed)
Patch Set: Make AudioDebugFileWriter create its own file thread. Created 3 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 protected: 194 protected:
195 FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording); 195 FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording);
196 friend class AudioDeviceInfoAccessorForTests; 196 friend class AudioDeviceInfoAccessorForTests;
197 197
198 explicit AudioManager(std::unique_ptr<AudioThread> audio_thread); 198 explicit AudioManager(std::unique_ptr<AudioThread> audio_thread);
199 199
200 virtual void ShutdownOnAudioThread() = 0; 200 virtual void ShutdownOnAudioThread() = 0;
201 201
202 // Initializes output debug recording. Can be called on any thread; will post 202 // Initializes output debug recording. Can be called on any thread; will post
203 // to the audio thread if not called on it. 203 // to the audio thread if not called on it.
204 virtual void InitializeOutputDebugRecording( 204 virtual void InitializeOutputDebugRecording() = 0;
205 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) = 0;
206 205
207 // Returns true if the OS reports existence of audio devices. This does not 206 // Returns true if the OS reports existence of audio devices. This does not
208 // guarantee that the existing devices support all formats and sample rates. 207 // guarantee that the existing devices support all formats and sample rates.
209 virtual bool HasAudioOutputDevices() = 0; 208 virtual bool HasAudioOutputDevices() = 0;
210 209
211 // Returns true if the OS reports existence of audio recording devices. This 210 // Returns true if the OS reports existence of audio recording devices. This
212 // does not guarantee that the existing devices support all formats and 211 // does not guarantee that the existing devices support all formats and
213 // sample rates. 212 // sample rates.
214 virtual bool HasAudioInputDevices() = 0; 213 virtual bool HasAudioInputDevices() = 0;
215 214
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 std::unique_ptr<AudioThread> audio_thread_; 273 std::unique_ptr<AudioThread> audio_thread_;
275 bool shutdown_ = false; // True after |this| has been shutdown. 274 bool shutdown_ = false; // True after |this| has been shutdown.
276 275
277 THREAD_CHECKER(thread_checker_); 276 THREAD_CHECKER(thread_checker_);
278 DISALLOW_COPY_AND_ASSIGN(AudioManager); 277 DISALLOW_COPY_AND_ASSIGN(AudioManager);
279 }; 278 };
280 279
281 } // namespace media 280 } // namespace media
282 281
283 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 282 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698