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

Unified Diff: webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.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/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java
diff --git a/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java b/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java
index 27b54dbe3eeaa2d1462ffdb63d270cca4f579a87..614105cd5df6fbc4392a96106b547f2d52568a7e 100644
--- a/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java
+++ b/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java
@@ -22,34 +22,10 @@ public class Camera1CapturerUsingTextureTest extends InstrumentationTestCase {
static final String TAG = "Camera1CapturerUsingTextureTest";
private class TestObjectFactory
- implements CameraVideoCapturerTestFixtures.TestObjectFactory {
+ extends CameraVideoCapturerTestFixtures.TestObjectFactory {
@Override
- public CameraVideoCapturer createCapturer(
- String name,
- CameraVideoCapturer.CameraEventsHandler eventsHandler) {
- return new VideoCapturerAndroid(name, eventsHandler, isCapturingToTexture());
- }
-
- @Override
- public String getNameOfFrontFacingDevice() {
- return CameraEnumerationAndroid.getNameOfFrontFacingDevice();
- }
-
- @Override
- public String getNameOfBackFacingDevice() {
- return CameraEnumerationAndroid.getNameOfBackFacingDevice();
- }
-
- // Return true if the device under test have at least two cameras.
- @SuppressWarnings("deprecation")
- @Override
- public boolean haveTwoCameras() {
- return (android.hardware.Camera.getNumberOfCameras() >= 2);
- }
-
- @Override
- public boolean isCapturingToTexture() {
- return true;
+ public CameraEnumerator getCameraEnumerator() {
+ return new Camera1Enumerator();
}
@Override
@@ -60,7 +36,7 @@ public class Camera1CapturerUsingTextureTest extends InstrumentationTestCase {
@SuppressWarnings("deprecation")
@Override
public Object rawOpenCamera(String cameraName) {
- return android.hardware.Camera.open(CameraEnumerationAndroid.getCameraIndex(cameraName));
+ return android.hardware.Camera.open(Camera1Enumerator.getCameraIndex(cameraName));
}
@SuppressWarnings("deprecation")

Powered by Google App Engine
This is Rietveld 408576698