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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
7 7
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/platform_file.h"
9 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
10 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 #include "content/renderer/media/webrtc_audio_device_impl.h" 14 #include "content/renderer/media/webrtc_audio_device_impl.h"
14 #include "media/base/audio_converter.h" 15 #include "media/base/audio_converter.h"
15 #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h " 16 #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h "
16 #include "third_party/webrtc/modules/interface/module_common_types.h" 17 #include "third_party/webrtc/modules/interface/module_common_types.h"
17 18
18 namespace blink { 19 namespace blink {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // otherwise false. 67 // otherwise false.
67 // |capture_delay|, |volume| and |key_pressed| will be passed to 68 // |capture_delay|, |volume| and |key_pressed| will be passed to
68 // webrtc::AudioProcessing to help processing the data. 69 // webrtc::AudioProcessing to help processing the data.
69 // Called on the capture audio thread. 70 // Called on the capture audio thread.
70 bool ProcessAndConsumeData(base::TimeDelta capture_delay, 71 bool ProcessAndConsumeData(base::TimeDelta capture_delay,
71 int volume, 72 int volume,
72 bool key_pressed, 73 bool key_pressed,
73 int* new_volume, 74 int* new_volume,
74 int16** out); 75 int16** out);
75 76
76
77 // The audio format of the input to the processor. 77 // The audio format of the input to the processor.
78 const media::AudioParameters& InputFormat() const; 78 const media::AudioParameters& InputFormat() const;
79 79
80 // The audio format of the output from the processor. 80 // The audio format of the output from the processor.
81 const media::AudioParameters& OutputFormat() const; 81 const media::AudioParameters& OutputFormat() const;
82 82
83 // Accessor to check if the audio processing is enabled or not. 83 // Accessor to check if the audio processing is enabled or not.
84 bool has_audio_processing() const { return audio_processing_ != NULL; } 84 bool has_audio_processing() const { return audio_processing_ != NULL; }
85 85
86 // Starts/Stops the Aec dump on the |audio_processing_|.
87 // Called on the main render thread.
Henrik Grunell 2014/03/06 10:12:20 Comment that it takes ownership of |aec_dump_file|
no longer working on chromium 2014/03/06 18:57:21 Done.
88 void StartAecDump(const base::PlatformFile& aec_dump_file);
89 void StopAecDump();
90
86 protected: 91 protected:
87 friend class base::RefCountedThreadSafe<MediaStreamAudioProcessor>; 92 friend class base::RefCountedThreadSafe<MediaStreamAudioProcessor>;
88 virtual ~MediaStreamAudioProcessor(); 93 virtual ~MediaStreamAudioProcessor();
89 94
90 private: 95 private:
91 friend class MediaStreamAudioProcessorTest; 96 friend class MediaStreamAudioProcessorTest;
92 97
93 class MediaStreamAudioConverter; 98 class MediaStreamAudioConverter;
94 99
95 // WebRtcPlayoutDataSource::Sink implementation. 100 // WebRtcPlayoutDataSource::Sink implementation.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Used by the typing detection. 168 // Used by the typing detection.
164 scoped_ptr<webrtc::TypingDetection> typing_detector_; 169 scoped_ptr<webrtc::TypingDetection> typing_detector_;
165 170
166 // Result from the typing detection. 171 // Result from the typing detection.
167 bool typing_detected_; 172 bool typing_detected_;
168 }; 173 };
169 174
170 } // namespace content 175 } // namespace content
171 176
172 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 177 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698