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

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

Issue 2066773002: Android: Add Size class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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/api/androidtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java
diff --git a/webrtc/api/androidtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java b/webrtc/api/androidtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java
index 30119e5a1f87d60142fc759395e6263c778beaa2..342a63e89f65f14f34f5f02298b8291276615c39 100644
--- a/webrtc/api/androidtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java
+++ b/webrtc/api/androidtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java
@@ -294,7 +294,7 @@ class CameraVideoCapturerTestFixtures {
final CameraEnumerationAndroid.CaptureFormat format =
instance.supportedFormats.get(formatIndex);
- instance.capturer.startCapture(format.width, format.height, format.framerate.max,
+ instance.capturer.startCapture(format.size.width, format.size.height, format.framerate.max,
instance.surfaceTextureHelper, testObjectFactory.getAppContext(), instance.observer);
instance.format = format;
}
@@ -484,16 +484,18 @@ class CameraVideoCapturerTestFixtures {
// Check the frame size. The actual width and height depend on how the capturer is mounted.
final boolean identicalResolution = (
- capturerInstance.observer.frameWidth() == capturerInstance.format.width
- && capturerInstance.observer.frameHeight() == capturerInstance.format.height);
+ capturerInstance.observer.frameWidth() == capturerInstance.format.size.width
+ && capturerInstance.observer.frameHeight() == capturerInstance.format.size.height);
final boolean flippedResolution = (
- capturerInstance.observer.frameWidth() == capturerInstance.format.height
- && capturerInstance.observer.frameHeight() == capturerInstance.format.width);
+ capturerInstance.observer.frameWidth() == capturerInstance.format.size.height
+ && capturerInstance.observer.frameHeight() == capturerInstance.format.size.width);
if (!identicalResolution && !flippedResolution) {
fail("Wrong resolution, got: "
+ capturerInstance.observer.frameWidth() + "x" + capturerInstance.observer.frameHeight()
- + " expected: "+ capturerInstance.format.width + "x" + capturerInstance.format.height
- + " or " + capturerInstance.format.height + "x" + capturerInstance.format.width);
+ + " expected: "
+ + capturerInstance.format.size.width + "x" + capturerInstance.format.size.height
+ + " or " + capturerInstance.format.size.height + "x"
+ + capturerInstance.format.size.width);
}
if (testObjectFactory.isCapturingToTexture()) {

Powered by Google App Engine
This is Rietveld 408576698