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

Unified Diff: content/renderer/media/media_stream_audio_processor.h

Issue 187913002: Support the Aec dump for the APM in chrome (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: minor fix to one comment. Created 6 years, 9 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 | « no previous file | content/renderer/media/media_stream_audio_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_audio_processor.h
diff --git a/content/renderer/media/media_stream_audio_processor.h b/content/renderer/media/media_stream_audio_processor.h
index 58e322bf99e8beec4f8ee64980ac491022ffba97..4364f3c9c9806d474e708e6850651d53cdee9188 100644
--- a/content/renderer/media/media_stream_audio_processor.h
+++ b/content/renderer/media/media_stream_audio_processor.h
@@ -6,6 +6,7 @@
#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
#include "base/atomicops.h"
+#include "base/platform_file.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
@@ -48,11 +49,17 @@ class CONTENT_EXPORT MediaStreamAudioProcessor :
// |playout_data_source| is used to register this class as a sink to the
// WebRtc playout data for processing AEC. If clients do not enable AEC,
// |playout_data_source| won't be used.
- MediaStreamAudioProcessor(const media::AudioParameters& source_params,
- const blink::WebMediaConstraints& constraints,
+ MediaStreamAudioProcessor(const blink::WebMediaConstraints& constraints,
int effects,
WebRtcPlayoutDataSource* playout_data_source);
+ // Called when format of the capture data has changed.
+ // Called on the main render thread. The caller is responsible for stopping
+ // the capture thread before calling this method.
+ // After this method, the capture thread will be changed to a new capture
+ // thread.
+ void OnCaptureFormatChanged(const media::AudioParameters& source_params);
+
// Pushes capture data in |audio_source| to the internal FIFO.
// Called on the capture audio thread.
void PushCaptureData(media::AudioBus* audio_source);
@@ -76,7 +83,6 @@ class CONTENT_EXPORT MediaStreamAudioProcessor :
int* new_volume,
int16** out);
-
// The audio format of the input to the processor.
const media::AudioParameters& InputFormat() const;
@@ -86,6 +92,12 @@ class CONTENT_EXPORT MediaStreamAudioProcessor :
// Accessor to check if the audio processing is enabled or not.
bool has_audio_processing() const { return audio_processing_ != NULL; }
+ // Starts/Stops the Aec dump on the |audio_processing_|.
+ // Called on the main render thread.
+ // This method takes the ownership of |aec_dump_file|.
+ void StartAecDump(const base::PlatformFile& aec_dump_file);
+ void StopAecDump();
+
protected:
friend class base::RefCountedThreadSafe<MediaStreamAudioProcessor>;
virtual ~MediaStreamAudioProcessor();
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698