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 08:39:34 +0000
committerajm@chromium.org <ajm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 08:39:34 +0000
commit0eddc22125d3d2eef9690ba87e3bad4899b4d17c (patch)
treef61d5f6fee8fc4529ba9d327af091689ddc377af /content/public/common/media_stream_request.h
parentbc92bc970efc1620e162efabedfee8592afcac06 (diff)
downloadchromium_src-0eddc22125d3d2eef9690ba87e3bad4899b4d17c.zip
chromium_src-0eddc22125d3d2eef9690ba87e3bad4899b4d17c.tar.gz
chromium_src-0eddc22125d3d2eef9690ba87e3bad4899b4d17c.tar.bz2
Enable platform echo cancellation through the AudioRecord path.
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 TBR=jschuh Review URL: https://codereview.chromium.org/99033003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240548 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 e6870e1..a117931 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