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

Unified Diff: media/audio/audio_output_resampler.h

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Code review (pfeldman@/dalecurtis@) and a fix. Rebase. 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
Index: media/audio/audio_output_resampler.h
diff --git a/media/audio/audio_output_resampler.h b/media/audio/audio_output_resampler.h
index da512e09ebc345934a326a8c367678f639678067..8a3e50749cb81f54c70575b5ab3d3fffca6c22d4 100644
--- a/media/audio/audio_output_resampler.h
+++ b/media/audio/audio_output_resampler.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
+#include "media/audio/audio_debug_recording_helper.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager.h"
#include "media/audio/audio_output_dispatcher_impl.h"
@@ -31,11 +32,18 @@ class OnMoreDataConverter;
// parameters. If opening still fails, it will fallback to AUDIO_FAKE.
class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher {
public:
+ // Callback type to register an AudioDebugRecorder.
+ using RegisterDebugRecordingSourceCallback =
+ base::RepeatingCallback<std::unique_ptr<AudioDebugRecorder>(
+ const AudioParameters&)>;
+
AudioOutputResampler(AudioManager* audio_manager,
const AudioParameters& input_params,
const AudioParameters& output_params,
const std::string& output_device_id,
- const base::TimeDelta& close_delay);
+ base::TimeDelta close_delay,
+ const RegisterDebugRecordingSourceCallback&
+ register_debug_recording_source_callback);
~AudioOutputResampler() override;
// AudioOutputDispatcher interface.
@@ -90,6 +98,10 @@ class MEDIA_EXPORT AudioOutputResampler : public AudioOutputDispatcher {
// to a fake stream indefinitely for transient errors.
base::Timer reinitialize_timer_;
+ // Callback for registering a debug recording source.
+ RegisterDebugRecordingSourceCallback
+ register_debug_recording_source_callback_;
+
base::WeakPtrFactory<AudioOutputResampler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler);
};

Powered by Google App Engine
This is Rietveld 408576698