summaryrefslogtreecommitdiffstats
path: root/content/public/common/media_stream_request.h
diff options
context:
space:
mode:
authorajm@chromium.org <ajm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 22:57:39 +0000
committerajm@chromium.org <ajm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 22:57:39 +0000
commit0cc26d2b07ae6b4a077bad3e4ae1853580215b59 (patch)
tree5e1c8239c86bee8c243cc4fbdbe262061a846fa1 /content/public/common/media_stream_request.h
parentd4da02f0b955dc09febde650e90b41b2bceb0b2e (diff)
downloadchromium_src-0cc26d2b07ae6b4a077bad3e4ae1853580215b59.zip
chromium_src-0cc26d2b07ae6b4a077bad3e4ae1853580215b59.tar.gz
chromium_src-0cc26d2b07ae6b4a077bad3e4ae1853580215b59.tar.bz2
Enable platform echo cancellation through the AudioRecord path.
Re-land https://codereview.chromium.org/99033003/ with a CrOS build fix. TBR=tommi Including the original CL description here: Add a platform effects mask member to AudioParameters. This allows the availability of platform effects (currently AEC) to be plumbed up to MediaStreamDependencyFactory, where they can be reconciled with the media constraints to determine if the effects should be enabled. When this is the case, the constraints will be modified to disable the corresponding software effect in PeerConnection. The availability is controlled by a whitelist of device models in AudioManagerAndroid, which for AEC, currently consists of Nexus 5 and Nexus 7. AudioManagerAndroid will use the AudioRecord path iff the platform AEC is enabled. TESTED=Using apprtc on a N5 and N7 (whitelisted): - The AudioRecord input path is used. - The platform AEC is enabled and the software AEC (in PeerConnection) is disabled. - Calls have good echo cancellation quality. Using apprtc with ?audio=googEchoCancellation=false on a N5 and N7: - The OpenSLES input path is used. - Both the platform and software AEC are disabled. Using apprtc on Nexus 4 (non-whitelisted): - The OpenSLES input path is used. - The platform AEC is disabled and the software AEC is enabled. Using apprtc on Galaxy S2 (running ICS): - The OpenSLES input path is used. audio_android_unittest.cc passes on N5, N7 and Galaxy S2 Review URL: https://codereview.chromium.org/115413002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/common/media_stream_request.h')
-rw-r--r--content/public/common/media_stream_request.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/content/public/common/media_stream_request.h b/content/public/common/media_stream_request.h
index 6e42920..c4c838f 100644
--- a/content/public/common/media_stream_request.h
+++ b/content/public/common/media_stream_request.h
@@ -106,14 +106,15 @@ struct CONTENT_EXPORT MediaStreamDevice {
// in media::AudioParameters.
struct AudioDeviceParameters {
AudioDeviceParameters()
- : sample_rate(), channel_layout(), frames_per_buffer() {
+ : sample_rate(), channel_layout(), frames_per_buffer(), effects() {
}
AudioDeviceParameters(int sample_rate, int channel_layout,
- int frames_per_buffer)
+ int frames_per_buffer)
: sample_rate(sample_rate),
channel_layout(channel_layout),
- frames_per_buffer(frames_per_buffer) {
+ frames_per_buffer(frames_per_buffer),
+ effects() {
}
// Preferred sample rate in samples per second for the device.
@@ -129,6 +130,9 @@ struct CONTENT_EXPORT MediaStreamDevice {
// expected browser side settings and avoid unnecessary buffering.
// See media::AudioParameters for more.
int frames_per_buffer;
+
+ // See media::AudioParameters::PlatformEffectsMask.
+ int effects;
};
// These below two member variables are valid only when the type of device is