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) { |