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

Unified Diff: webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.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
« no previous file with comments | « no previous file | webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java
diff --git a/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java b/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java
index c6d23cd26a4f9a6c61105acda5d41f93a4f7fa1b..9fe1ba3dc878cca5267e317a8e30c17e13f7909c 100644
--- a/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java
+++ b/webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java
@@ -22,7 +22,7 @@ public class Camera1CapturerUsingByteBufferTest extends InstrumentationTestCase
static final String TAG = "Camera1CapturerUsingByteBufferTest";
private class TestObjectFactory
- implements CameraVideoCapturerTestFixtures.TestObjectFactory {
+ extends CameraVideoCapturerTestFixtures.TestObjectFactory {
@Override
public CameraVideoCapturer createCapturer(
String name,
@@ -31,25 +31,13 @@ public class Camera1CapturerUsingByteBufferTest extends InstrumentationTestCase
}
@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);
+ public boolean isCapturingToTexture() {
+ return false;
}
@Override
- public boolean isCapturingToTexture() {
- return false;
+ public CameraEnumerator getCameraEnumerator() {
+ return new Camera1Enumerator();
}
@Override
@@ -60,7 +48,7 @@ public class Camera1CapturerUsingByteBufferTest 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")
« no previous file with comments | « no previous file | webrtc/api/androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698