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

Unified Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.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/ConnectActivity.java
diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java
index 6002395be9a27efbddca5e0cb3aca6059847e22f..178f60048d975274218934dd02ceba33cb65b2b5 100644
--- a/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java
+++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java
@@ -55,6 +55,7 @@ public class ConnectActivity extends Activity {
private ListView roomListView;
private SharedPreferences sharedPref;
private String keyprefVideoCallEnabled;
+ private String keyprefCamera2;
private String keyprefResolution;
private String keyprefFps;
private String keyprefCaptureQualitySlider;
@@ -86,6 +87,7 @@ public class ConnectActivity extends Activity {
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
keyprefVideoCallEnabled = getString(R.string.pref_videocall_key);
+ keyprefCamera2 = getString(R.string.pref_camera2_key);
keyprefResolution = getString(R.string.pref_resolution_key);
keyprefFps = getString(R.string.pref_fps_key);
keyprefCaptureQualitySlider = getString(R.string.pref_capturequalityslider_key);
@@ -259,6 +261,10 @@ public class ConnectActivity extends Activity {
boolean videoCallEnabled = sharedPref.getBoolean(keyprefVideoCallEnabled,
Boolean.valueOf(getString(R.string.pref_videocall_default)));
+ // Use Camera2 option.
+ boolean useCamera2 = sharedPref.getBoolean(keyprefCamera2,
+ Boolean.valueOf(getString(R.string.pref_camera2_default)));
+
// Get default codecs.
String videoCodec = sharedPref.getString(keyprefVideoCodec,
getString(R.string.pref_videocodec_default));
@@ -364,6 +370,7 @@ public class ConnectActivity extends Activity {
intent.putExtra(CallActivity.EXTRA_ROOMID, roomId);
intent.putExtra(CallActivity.EXTRA_LOOPBACK, loopback);
intent.putExtra(CallActivity.EXTRA_VIDEO_CALL, videoCallEnabled);
+ intent.putExtra(CallActivity.EXTRA_CAMERA2, useCamera2);
intent.putExtra(CallActivity.EXTRA_VIDEO_WIDTH, videoWidth);
intent.putExtra(CallActivity.EXTRA_VIDEO_HEIGHT, videoHeight);
intent.putExtra(CallActivity.EXTRA_VIDEO_FPS, cameraFps);

Powered by Google App Engine
This is Rietveld 408576698