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

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

Issue 2013433003: WIP: Android Camera2 capture implementation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix CaptureFormat jni parsing 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/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.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..8bff1e1d302acb095bf8487d9d38cc933c259afc 100644
--- a/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
+++ b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
@@ -12,7 +12,6 @@ package org.webrtc;
import android.test.ActivityTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
-import android.util.Size;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
@@ -38,22 +37,22 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
if (!Camera2Enumerator.isSupported()) {
return;
}
- final CameraEnumerationAndroid.Enumerator camera1Enumerator = new CameraEnumerator();
+ final CameraEnumerationAndroid.Enumerator camera1Enumerator = new Camera1Enumerator();
final CameraEnumerationAndroid.Enumerator camera2Enumerator =
new Camera2Enumerator(getInstrumentation().getContext());
for (int i = 0; i < CameraEnumerationAndroid.getDeviceCount(); ++i) {
- final Set<Size> resolutions1 = new HashSet<Size>();
+ final Set<CaptureFormat.Size> resolutions1 = new HashSet<CaptureFormat.Size>();
for (CaptureFormat format : camera1Enumerator.getSupportedFormats(i)) {
- resolutions1.add(new Size(format.width, format.height));
+ resolutions1.add(format.size);
}
- final Set<Size> resolutions2 = new HashSet<Size>();
+ final Set<CaptureFormat.Size> resolutions2 = new HashSet<CaptureFormat.Size>();
for (CaptureFormat format : camera2Enumerator.getSupportedFormats(i)) {
- resolutions2.add(new Size(format.width, format.height));
+ resolutions2.add(format.size);
}
- for (Size size : resolutions1) {
- if (size.getWidth() >= 320 && size.getHeight() >= 240
- && size.getWidth() <= 1280 && size.getHeight() <= 720) {
+ for (CaptureFormat.Size size : resolutions1) {
+ if (size.width >= 320 && size.height >= 240
+ && size.width <= 1280 && size.height <= 720) {
assertTrue(resolutions2.contains(size));
}
}
« no previous file with comments | « no previous file | webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698