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

Unified Diff: media/audio/audio_manager_base.h

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Code review. Created 3 years, 10 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_manager.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a80f63c1aef6b8b5150aadb7a7b077907f37bf4c 100644
--- a/media/audio/audio_manager_base.h
+++ b/media/audio/audio_manager_base.h
@@ -16,6 +16,7 @@
#include "base/observer_list.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
+#include "media/audio/audio_debug_recording_manager.h"
#include "media/audio/audio_device_name.h"
#include "media/audio/audio_manager.h"
#include "media/audio/audio_output_dispatcher.h"
@@ -67,6 +68,8 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
const std::string& input_device_id) override;
std::unique_ptr<AudioLog> CreateAudioLog(
AudioLogFactory::AudioComponent component) override;
+ void EnableOutputDebugRecording(const base::FilePath& base_file_name) final;
+ void DisableOutputDebugRecording() final;
void SetMaxStreamCountForTesting(int max_input, int max_output) final;
@@ -153,12 +156,23 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
// Implementations that don't yet support this should return an empty string.
virtual std::string GetDefaultOutputDeviceID();
+ virtual std::unique_ptr<AudioDebugRecordingManager>
+ CreateAudioDebugRecordingManager(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
+
private:
+ FRIEND_TEST_ALL_PREFIXES(AudioManagerTest, AudioDebugRecording);
+
struct DispatcherParams;
typedef ScopedVector<DispatcherParams> AudioOutputDispatchers;
class CompareByParams;
+ // AudioManager:
+ void InitializeOutputDebugRecording(
+ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) final;
+
// These functions assign group ids to devices based on their device ids.
// The default implementation is an attempt to do this based on
// GetAssociatedOutputDeviceID. Must be called on the audio worker thread
@@ -189,6 +203,9 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
// Proxy for creating AudioLog objects.
AudioLogFactory* const audio_log_factory_;
+ // Debug recording manager.
+ std::unique_ptr<AudioDebugRecordingManager> debug_recording_manager_;
+
DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
};
« no previous file with comments | « media/audio/audio_manager.cc ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698