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

Unified Diff: webrtc/api/java/android/org/webrtc/CameraEnumerator.java

Issue 2066773002: Android: Add Size class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove getArea function since it is no longer used. 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/java/android/org/webrtc/CameraEnumerator.java
diff --git a/webrtc/api/java/android/org/webrtc/CameraEnumerator.java b/webrtc/api/java/android/org/webrtc/CameraEnumerator.java
index 90d9487ba3ccfa91facc8ccb7880d19d5b2f4a5d..203c1954b744de4ff88bd5942fec1dca6274b7fc 100644
--- a/webrtc/api/java/android/org/webrtc/CameraEnumerator.java
+++ b/webrtc/api/java/android/org/webrtc/CameraEnumerator.java
@@ -79,6 +79,16 @@ public class CameraEnumerator {
return formatList;
}
+ // Convert from android.hardware.Camera.Size to Size.
+ public static List<Size> convertSizes(
+ List<android.hardware.Camera.Size> cameraSizes) {
+ final List<Size> sizes = new ArrayList<Size>();
+ for (android.hardware.Camera.Size size : cameraSizes) {
+ sizes.add(new Size(size.width, size.height));
+ }
+ return sizes;
+ }
+
// Convert from int[2] to CaptureFormat.FramerateRange.
public static List<CaptureFormat.FramerateRange> convertFramerates(
List<int[]> arrayRanges) {

Powered by Google App Engine
This is Rietveld 408576698