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

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

Issue 2071803002: Move Camera1 specific methods to Camera1Enumerator and create CameraEnumerator interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@size_master
Patch Set: Rebase. 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/VideoCapturerAndroid.java
diff --git a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
index 5e9a5a6f2f45812f5e57b4b93a86b206b6886975..7e9d019825de4b1a1932be74a6fd4a3235c95308 100644
--- a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
+++ b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
@@ -208,7 +208,7 @@ public class VideoCapturerAndroid implements
@Override
public List<CaptureFormat> getSupportedFormats() {
- return CameraEnumerator.getSupportedFormats(getCurrentCameraId());
+ return Camera1Enumerator.getSupportedFormats(getCurrentCameraId());
}
// Returns true if this VideoCapturer is setup to capture video frames to a SurfaceTexture.
@@ -224,7 +224,7 @@ public class VideoCapturerAndroid implements
if (cameraName == null || cameraName.equals("")) {
this.id = 0;
} else {
- this.id = CameraEnumerationAndroid.getCameraIndex(cameraName);
+ this.id = Camera1Enumerator.getCameraIndex(cameraName);
}
this.eventsHandler = eventsHandler;
isCapturingToTexture = captureToTexture;
@@ -391,14 +391,14 @@ public class VideoCapturerAndroid implements
// Find closest supported format for |width| x |height| @ |framerate|.
final android.hardware.Camera.Parameters parameters = camera.getParameters();
final List<CaptureFormat.FramerateRange> supportedFramerates =
- CameraEnumerator.convertFramerates(parameters.getSupportedPreviewFpsRange());
+ Camera1Enumerator.convertFramerates(parameters.getSupportedPreviewFpsRange());
Logging.d(TAG, "Available fps ranges: " + supportedFramerates);
final CaptureFormat.FramerateRange fpsRange =
CameraEnumerationAndroid.getClosestSupportedFramerateRange(supportedFramerates, framerate);
final Size previewSize = CameraEnumerationAndroid.getClosestSupportedSize(
- CameraEnumerator.convertSizes(parameters.getSupportedPreviewSizes()), width, height);
+ Camera1Enumerator.convertSizes(parameters.getSupportedPreviewSizes()), width, height);
final CaptureFormat captureFormat =
new CaptureFormat(previewSize.width, previewSize.height, fpsRange);
@@ -427,7 +427,7 @@ public class VideoCapturerAndroid implements
// Picture size is for taking pictures and not for preview/video, but we need to set it anyway
// as a workaround for an aspect ratio problem on Nexus 7.
final Size pictureSize = CameraEnumerationAndroid.getClosestSupportedSize(
- CameraEnumerator.convertSizes(parameters.getSupportedPictureSizes()), width, height);
+ Camera1Enumerator.convertSizes(parameters.getSupportedPictureSizes()), width, height);
parameters.setPictureSize(pictureSize.width, pictureSize.height);
// Temporarily stop preview if it's already running.
« no previous file with comments | « webrtc/api/java/android/org/webrtc/CameraEnumerator.java ('k') | webrtc/api/java/jni/classreferenceholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698