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

Unified Diff: webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java

Issue 2015143004: CameraEnumerationAndroid: Remove Enumerator class (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « no previous file | webrtc/api/java/android/org/webrtc/Camera2Enumerator.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
diff --git a/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
index 7c9872d25fb1ff17d6bc07c0888c584a98ac2728..17bbd13305d8d0e6368ae97f9ab5ec8fb327a87c 100644
--- a/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
+++ b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
@@ -9,6 +9,7 @@
*/
package org.webrtc;
+import android.content.Context;
import android.test.ActivityTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
@@ -38,18 +39,17 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
if (!Camera2Enumerator.isSupported()) {
return;
}
- final CameraEnumerationAndroid.Enumerator camera1Enumerator = new CameraEnumerator();
- final CameraEnumerationAndroid.Enumerator camera2Enumerator =
- new Camera2Enumerator(getInstrumentation().getContext());
+ final Context context = getInstrumentation().getContext();
for (int i = 0; i < CameraEnumerationAndroid.getDeviceCount(); ++i) {
final Set<Size> resolutions1 = new HashSet<Size>();
- for (CaptureFormat format : camera1Enumerator.getSupportedFormats(i)) {
+ for (CaptureFormat format : CameraEnumerator.getSupportedFormats(i)) {
resolutions1.add(new Size(format.width, format.height));
}
final Set<Size> resolutions2 = new HashSet<Size>();
- for (CaptureFormat format : camera2Enumerator.getSupportedFormats(i)) {
- resolutions2.add(new Size(format.width, format.height));
+ for (CaptureFormat format :
+ Camera2Enumerator.getSupportedFormats(context, Integer.toString(i))) {
+ resolutions2.add(new Size(format.width, format.height));
}
for (Size size : resolutions1) {
if (size.getWidth() >= 320 && size.getHeight() >= 240
« no previous file with comments | « no previous file | webrtc/api/java/android/org/webrtc/Camera2Enumerator.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698