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

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

Issue 2077663003: Camera2 in AppRTC Android Demo. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@camera2_only
Patch Set: Create peer connection factory with the target context in the test Created 4 years, 5 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/CallActivity.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
index b2537806825fe2d0fff6babb10636e6543e61c48..d880b66f5be95cb4b1634e04f65e166bc4d93d63 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallActivity.java
@@ -10,6 +10,11 @@
package org.appspot.apprtc;
+import org.appspot.apprtc.AppRTCClient.RoomConnectionParameters;
+import org.appspot.apprtc.AppRTCClient.SignalingParameters;
+import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters;
+import org.appspot.apprtc.util.LooperExecutor;
+
import android.app.Activity;
import android.app.AlertDialog;
import android.app.FragmentTransaction;
@@ -25,10 +30,7 @@ import android.view.Window;
import android.view.WindowManager.LayoutParams;
import android.widget.Toast;
-import org.appspot.apprtc.AppRTCClient.RoomConnectionParameters;
-import org.appspot.apprtc.AppRTCClient.SignalingParameters;
-import org.appspot.apprtc.PeerConnectionClient.PeerConnectionParameters;
-import org.appspot.apprtc.util.LooperExecutor;
+import org.webrtc.Camera2Enumerator;
import org.webrtc.EglBase;
import org.webrtc.IceCandidate;
import org.webrtc.PeerConnectionFactory;
@@ -52,6 +54,8 @@ public class CallActivity extends Activity
"org.appspot.apprtc.LOOPBACK";
public static final String EXTRA_VIDEO_CALL =
"org.appspot.apprtc.VIDEO_CALL";
+ public static final String EXTRA_CAMERA2 =
+ "org.appspot.apprtc.CAMERA2";
public static final String EXTRA_VIDEO_WIDTH =
"org.appspot.apprtc.VIDEO_WIDTH";
public static final String EXTRA_VIDEO_HEIGHT =
@@ -219,12 +223,18 @@ public class CallActivity extends Activity
finish();
return;
}
+
boolean loopback = intent.getBooleanExtra(EXTRA_LOOPBACK, false);
boolean tracing = intent.getBooleanExtra(EXTRA_TRACING, false);
+
+ boolean useCamera2 = Camera2Enumerator.isSupported()
+ && intent.getBooleanExtra(EXTRA_CAMERA2, true);
+
peerConnectionParameters = new PeerConnectionParameters(
intent.getBooleanExtra(EXTRA_VIDEO_CALL, true),
loopback,
tracing,
+ useCamera2,
intent.getIntExtra(EXTRA_VIDEO_WIDTH, 0),
intent.getIntExtra(EXTRA_VIDEO_HEIGHT, 0),
intent.getIntExtra(EXTRA_VIDEO_FPS, 0),

Powered by Google App Engine
This is Rietveld 408576698