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

Unified Diff: talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java

Issue 1396013004: Android: Replace EGL14 with EGL10 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add comments for hardcoded EGL constants Created 5 years, 2 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: talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java b/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
index d14b5cd35901d2d0b48bf56cab4468527de12ff2..dbbe5963cd6ba5e67aa0c871179154c6e83be7cb 100644
--- a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
+++ b/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
@@ -26,8 +26,6 @@
*/
package org.webrtc;
-import android.opengl.EGL14;
-import android.os.Build;
import android.test.ActivityTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.SmallTest;
@@ -39,6 +37,8 @@ import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
import java.util.HashSet;
import java.util.Set;
+import javax.microedition.khronos.egl.EGL10;
+
@SuppressWarnings("deprecation")
public class VideoCapturerAndroidTest extends ActivityTestCase {
static final String TAG = "VideoCapturerAndroidTest";
@@ -87,12 +87,8 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
@SmallTest
public void testCreateAndReleaseUsingTextures() {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Log.i(TAG, "Capturing to textures is not supported, requires EGL14.");
- return;
- }
VideoCapturerAndroidTestFixtures.release(
- VideoCapturerAndroid.create("", null, EGL14.EGL_NO_CONTEXT));
+ VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT));
}
@SmallTest
@@ -115,12 +111,8 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
// TODO(perkj): Enable once VideoCapture to texture support has landed in C++.
@SmallTest
public void DISABLED_testStartVideoCapturerUsingTextures() throws InterruptedException {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Log.i(TAG, "Capturing to textures is not supported, requires EGL14.");
- return;
- }
VideoCapturerAndroid capturer =
- VideoCapturerAndroid.create("", null, EGL14.EGL_NO_CONTEXT);
+ VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT);
VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer);
}
@@ -162,11 +154,7 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
// TODO(perkj): Enable once VideoCapture to texture support has landed in C++.
@SmallTest
public void DISABLED_testSwitchVideoCapturerUsingTextures() throws InterruptedException {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Log.i(TAG, "Capturing to textures is not supported, requires EGL14.");
- return;
- }
- VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL14.EGL_NO_CONTEXT);
+ VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT);
VideoCapturerAndroidTestFixtures.switchCamera(capturer);
}
@@ -191,13 +179,9 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
@MediumTest
public void testCameraCallsAfterStopUsingTextures() throws InterruptedException {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Log.i(TAG, "Capturing to textures is not supported, requires EGL14.");
- return;
- }
final String deviceName = CameraEnumerationAndroid.getDeviceName(0);
final VideoCapturerAndroid capturer = VideoCapturerAndroid.create(deviceName, null,
- EGL14.EGL_NO_CONTEXT);
+ EGL10.EGL_NO_CONTEXT);
VideoCapturerAndroidTestFixtures.cameraCallsAfterStop(capturer,
getInstrumentation().getContext());
@@ -214,11 +198,7 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
// TODO(perkj): Enable once VideoCapture to texture support has landed in C++.
@SmallTest
public void DISABLED_testStopRestartVideoSourceUsingTextures() throws InterruptedException {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Log.i(TAG, "Capturing to textures is not supported, requires EGL14.");
- return;
- }
- VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL14.EGL_NO_CONTEXT);
+ VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT);
VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer);
}
@@ -235,13 +215,9 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
@SmallTest
public void testStartStopWithDifferentResolutionsUsingTextures() throws InterruptedException {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Log.i(TAG, "Capturing to textures is not supported, requires EGL14.");
- return;
- }
String deviceName = CameraEnumerationAndroid.getDeviceName(0);
VideoCapturerAndroid capturer =
- VideoCapturerAndroid.create(deviceName, null, EGL14.EGL_NO_CONTEXT);
+ VideoCapturerAndroid.create(deviceName, null, EGL10.EGL_NO_CONTEXT);
VideoCapturerAndroidTestFixtures.startStopWithDifferentResolutions(capturer,
getInstrumentation().getContext());
}
@@ -259,13 +235,9 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
@SmallTest
public void testReturnBufferLateUsingTextures() throws InterruptedException {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Log.i(TAG, "Capturing to textures is not supported, requires EGL14.");
- return;
- }
String deviceName = CameraEnumerationAndroid.getDeviceName(0);
VideoCapturerAndroid capturer =
- VideoCapturerAndroid.create(deviceName, null, EGL14.EGL_NO_CONTEXT);
+ VideoCapturerAndroid.create(deviceName, null, EGL10.EGL_NO_CONTEXT);
VideoCapturerAndroidTestFixtures.returnBufferLate(capturer,
getInstrumentation().getContext());
}
@@ -282,12 +254,8 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
// TODO(perkj): Enable once VideoCapture to texture support has landed in C++.
@MediumTest
public void DISABLED_testReturnBufferLateEndToEndUsingTextures() throws InterruptedException {
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Log.i(TAG, "Capturing to textures is not supported, requires EGL14.");
- return;
- }
final VideoCapturerAndroid capturer =
- VideoCapturerAndroid.create("", null, EGL14.EGL_NO_CONTEXT);
+ VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT);
VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer);
}
}

Powered by Google App Engine
This is Rietveld 408576698