| Index: media/audio/audio_manager_base.h
|
| diff --git a/media/audio/audio_manager_base.h b/media/audio/audio_manager_base.h
|
| index b3100cf6c507bb6cb6af2086806356cc3c6de15a..1986ce1b052a9e59cf54a4e483f9d4aa3ecaa239 100644
|
| --- a/media/audio/audio_manager_base.h
|
| +++ b/media/audio/audio_manager_base.h
|
| @@ -11,6 +11,7 @@
|
| #include <utility>
|
|
|
| #include "base/compiler_specific.h"
|
| +#include "base/files/file_path.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "base/observer_list.h"
|
| @@ -67,6 +68,11 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
|
| const std::string& input_device_id) override;
|
| std::unique_ptr<AudioLog> CreateAudioLog(
|
| AudioLogFactory::AudioComponent component) override;
|
| + std::unique_ptr<AudioFileWriter> CreateAudioFileWriter(
|
| + const AudioParameters& params) override;
|
| + void EnableOutputDebugRecording(
|
| + const base::FilePath& base_file_name) override;
|
| + void DisableOutputDebugRecording() override;
|
|
|
| void SetMaxStreamCountForTesting(int max_input, int max_output) final;
|
|
|
| @@ -105,13 +111,16 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
|
| int input_stream_count() const {
|
| return static_cast<int>(input_streams_.size());
|
| }
|
| - int output_stream_count() const { return num_output_streams_; }
|
| + int output_stream_count() const {
|
| + return static_cast<int>(output_streams_.size());
|
| + }
|
|
|
| protected:
|
| AudioManagerBase(
|
| scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
|
| - AudioLogFactory* audio_log_factory);
|
| + AudioLogFactory* audio_log_factory,
|
| + CreateAudioFileWriterCallback create_audio_file_writer_callback);
|
|
|
| // Releases all the audio output dispatchers.
|
| // All audio streams should be closed before Shutdown() is called.
|
| @@ -166,6 +175,9 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
|
| std::string GetGroupIDOutput(const std::string& output_device_id);
|
| std::string GetGroupIDInput(const std::string& input_device_id);
|
|
|
| + base::FilePath GetDebugRecordingFileNameWithExtensions(
|
| + const base::FilePath& file_name);
|
| +
|
| // Max number of open output streams, modified by
|
| // SetMaxOutputStreamsAllowed().
|
| int max_num_output_streams_;
|
| @@ -173,12 +185,12 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
|
| // Max number of open input streams.
|
| int max_num_input_streams_;
|
|
|
| - // Number of currently open output streams.
|
| - int num_output_streams_;
|
| -
|
| // Track output state change listeners.
|
| base::ObserverList<AudioDeviceListener> output_listeners_;
|
|
|
| + // Contains currently open output streams.
|
| + std::unordered_set<AudioOutputStream*> output_streams_;
|
| +
|
| // Contains currently open input streams.
|
| std::unordered_set<AudioInputStream*> input_streams_;
|
|
|
| @@ -189,6 +201,16 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
|
| // Proxy for creating AudioLog objects.
|
| AudioLogFactory* const audio_log_factory_;
|
|
|
| + // Callback for creating AudioFileWriter objects.
|
| + CreateAudioFileWriterCallback create_audio_file_writer_callback_;
|
| +
|
| + // The base file name for debug recording files. If this is non-empty, debug
|
| + // recording is enabled, otherwise disabled.
|
| + base::FilePath debug_recording_base_file_name_;
|
| +
|
| + // Running id to append to the base filename.
|
| + int next_filename_id_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
|
| };
|
|
|
|
|