| Index: media/audio/audio_manager.h
|
| diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
|
| index 613df4d2ee6c70ccfad1241c23b6a0d0bf7a752d..cd91b399d6d4595ce60faf0131baa65f9cfd8bca 100644
|
| --- a/media/audio/audio_manager.h
|
| +++ b/media/audio/audio_manager.h
|
| @@ -9,6 +9,7 @@
|
| #include <string>
|
|
|
| #include "base/callback_forward.h"
|
| +#include "base/gtest_prod_util.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/sequenced_task_runner_helpers.h"
|
| @@ -19,6 +20,7 @@
|
| #include "media/base/audio_parameters.h"
|
|
|
| namespace base {
|
| +class FilePath;
|
| class SingleThreadTaskRunner;
|
| }
|
|
|
| @@ -58,9 +60,13 @@ class MEDIA_EXPORT AudioManager {
|
| // The manager will use |worker_task_runner| for heavyweight tasks.
|
| // The |worker_task_runner| may be the same as |task_runner|. This same
|
| // task runner is returned by GetWorkerTaskRunner.
|
| + //
|
| + // |file_task_runner| is used for audio debug recordings and is the task
|
| + // runner to do file output operations on.
|
| static ScopedAudioManagerPtr Create(
|
| scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
|
| + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
|
| AudioLogFactory* audio_log_factory);
|
|
|
| // A convenience wrapper of AudioManager::Create for testing.
|
| @@ -239,6 +245,15 @@ class MEDIA_EXPORT AudioManager {
|
| virtual std::unique_ptr<AudioLog> CreateAudioLog(
|
| AudioLogFactory::AudioComponent component) = 0;
|
|
|
| + // Enable output debug recording. InitializeOutputDebugRecording() must be
|
| + // called before this function.
|
| + // TODO(grunell): Control input debug recording via these functions too.
|
| + virtual void EnableOutputDebugRecording(
|
| + const base::FilePath& base_file_name) = 0;
|
| +
|
| + // Disable output debug recording.
|
| + virtual void DisableOutputDebugRecording() = 0;
|
| +
|
| // Gets the name of the audio manager (e.g., Windows, Mac, PulseAudio).
|
| virtual const char* GetName() = 0;
|
|
|
| @@ -246,10 +261,17 @@ class MEDIA_EXPORT AudioManager {
|
| virtual void SetMaxStreamCountForTesting(int max_input, int max_output);
|
|
|
| protected:
|
| + FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording);
|
| +
|
| AudioManager(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner);
|
| virtual ~AudioManager();
|
|
|
| + // Initializes output debug recording. Can be called on any thread; will post
|
| + // to the audio thread if not called on it.
|
| + virtual void InitializeOutputDebugRecording(
|
| + scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) = 0;
|
| +
|
| private:
|
| friend class base::DeleteHelper<AudioManager>;
|
| friend class AudioManagerDeleter;
|
|
|