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 1a6c1bc6337aa0e8ded2026a4b15442cc15f0d87..c99313fb9f8f2db136b70226f6f4a2d36df8bea1 100644 |
--- a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java |
+++ b/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java |
@@ -36,8 +36,6 @@ 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"; |
@@ -86,8 +84,10 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
@SmallTest |
public void testCreateAndReleaseUsingTextures() { |
+ Egl eglBase = Egl.create(); |
VideoCapturerAndroidTestFixtures.release( |
- VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT)); |
+ VideoCapturerAndroid.create("", null, eglBase.getEglContext())); |
+ eglBase.release(); |
} |
@SmallTest |
@@ -110,7 +110,7 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
@SmallTest |
public void testStartVideoCapturerUsingTextures() throws InterruptedException { |
VideoCapturerAndroid capturer = |
- VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); |
+ VideoCapturerAndroid.create("", null, null); |
VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer); |
} |
@@ -151,8 +151,10 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
@SmallTest |
public void testSwitchVideoCapturerUsingTextures() throws InterruptedException { |
- VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); |
+ Egl eglBase = Egl.create(); |
+ VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, eglBase.getEglContext()); |
VideoCapturerAndroidTestFixtures.switchCamera(capturer); |
+ eglBase.release(); |
} |
@MediumTest |
@@ -176,12 +178,14 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
@MediumTest |
public void testCameraCallsAfterStopUsingTextures() throws InterruptedException { |
+ Egl eglBase = Egl.create(); |
final String deviceName = CameraEnumerationAndroid.getDeviceName(0); |
final VideoCapturerAndroid capturer = VideoCapturerAndroid.create(deviceName, null, |
- EGL10.EGL_NO_CONTEXT); |
+ eglBase.getEglContext()); |
VideoCapturerAndroidTestFixtures.cameraCallsAfterStop(capturer, |
getInstrumentation().getContext()); |
+ eglBase.release(); |
} |
@SmallTest |
@@ -194,8 +198,10 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
@SmallTest |
public void testStopRestartVideoSourceUsingTextures() throws InterruptedException { |
- VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); |
+ Egl eglBase = Egl.create(); |
+ VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, eglBase.getEglContext()); |
VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer); |
+ eglBase.release(); |
} |
@SmallTest |
@@ -211,11 +217,13 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
@SmallTest |
public void testStartStopWithDifferentResolutionsUsingTextures() throws InterruptedException { |
+ Egl eglBase = Egl.create(); |
String deviceName = CameraEnumerationAndroid.getDeviceName(0); |
VideoCapturerAndroid capturer = |
- VideoCapturerAndroid.create(deviceName, null, EGL10.EGL_NO_CONTEXT); |
+ VideoCapturerAndroid.create(deviceName, null, eglBase.getEglContext()); |
VideoCapturerAndroidTestFixtures.startStopWithDifferentResolutions(capturer, |
getInstrumentation().getContext()); |
+ eglBase.release(); |
} |
@SmallTest |
@@ -266,11 +274,13 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
@SmallTest |
public void testReturnBufferLateUsingTextures() throws InterruptedException { |
+ Egl eglBase = Egl.create(); |
String deviceName = CameraEnumerationAndroid.getDeviceName(0); |
VideoCapturerAndroid capturer = |
- VideoCapturerAndroid.create(deviceName, null, EGL10.EGL_NO_CONTEXT); |
+ VideoCapturerAndroid.create(deviceName, null, eglBase.getEglContext()); |
VideoCapturerAndroidTestFixtures.returnBufferLate(capturer, |
getInstrumentation().getContext()); |
+ eglBase.release(); |
} |
@MediumTest |
@@ -284,9 +294,11 @@ public class VideoCapturerAndroidTest extends ActivityTestCase { |
@MediumTest |
public void testReturnBufferLateEndToEndUsingTextures() throws InterruptedException { |
+ Egl eglBase = Egl.create(); |
final VideoCapturerAndroid capturer = |
- VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); |
+ VideoCapturerAndroid.create("", null, eglBase.getEglContext()); |
VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); |
+ eglBase.release(); |
} |
@MediumTest |