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

Unified Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java

Issue 2002093002: Add an option to disable built-in AEC to AppRTC Android Demo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove empty line Created 4 years, 7 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: webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
index 14f43a96796e3bf7dbe72f8c94bef859a8022296..6de1cb279431f8b577d86da451adf38812cdc6d7 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/PeerConnectionClient.java
@@ -38,6 +38,7 @@ import org.webrtc.VideoRenderer;
import org.webrtc.VideoSource;
import org.webrtc.VideoTrack;
import org.webrtc.voiceengine.WebRtcAudioManager;
+import org.webrtc.voiceengine.WebRtcAudioUtils;
import java.io.File;
import java.io.IOException;
@@ -148,13 +149,15 @@ public class PeerConnectionClient {
public final boolean noAudioProcessing;
public final boolean aecDump;
public final boolean useOpenSLES;
+ public final boolean disableBuiltInAEC;
public PeerConnectionParameters(
boolean videoCallEnabled, boolean loopback, boolean tracing,
int videoWidth, int videoHeight, int videoFps, int videoStartBitrate,
String videoCodec, boolean videoCodecHwAcceleration, boolean captureToTexture,
int audioStartBitrate, String audioCodec,
- boolean noAudioProcessing, boolean aecDump, boolean useOpenSLES) {
+ boolean noAudioProcessing, boolean aecDump, boolean useOpenSLES,
+ boolean disableBuiltInAEC) {
this.videoCallEnabled = videoCallEnabled;
this.loopback = loopback;
this.tracing = tracing;
@@ -170,6 +173,7 @@ public class PeerConnectionClient {
this.noAudioProcessing = noAudioProcessing;
this.aecDump = aecDump;
this.useOpenSLES = useOpenSLES;
+ this.disableBuiltInAEC = disableBuiltInAEC;
}
}
@@ -339,6 +343,14 @@ public class PeerConnectionClient {
WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(false);
}
+ if (peerConnectionParameters.disableBuiltInAEC) {
+ Log.d(TAG, "Disable built-in AEC even if device supports it");
+ WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);
+ } else {
+ Log.d(TAG, "Allow built-in AEC if device supports it");
henrika_webrtc 2016/05/24 11:14:00 Comment is a bit vague. Is it enabled or disabled?
+ WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(false);
+ }
+
// Create peer connection factory.
if (!PeerConnectionFactory.initializeAndroidGlobals(context, true, true,
peerConnectionParameters.videoCodecHwAcceleration)) {

Powered by Google App Engine
This is Rietveld 408576698