| 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 c139e2f3038d4923812f7c3d8b39f3be2e7a3b66..1dea3bfdbc5109b2483bda254290a9b233960a63 100644
|
| --- a/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
|
| +++ b/talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java
|
| @@ -27,17 +27,22 @@
|
| 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;
|
| +import android.util.Log;
|
| import android.util.Size;
|
|
|
| import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
|
| +
|
| import java.util.HashSet;
|
| import java.util.Set;
|
|
|
| @SuppressWarnings("deprecation")
|
| public class VideoCapturerAndroidTest extends ActivityTestCase {
|
| + static final String TAG = "VideoCapturerAndroidTest";
|
| +
|
| @Override
|
| protected void setUp() {
|
| assertTrue(PeerConnectionFactory.initializeAndroidGlobals(
|
| @@ -82,6 +87,10 @@ 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));
|
| }
|
| @@ -105,6 +114,10 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
|
|
|
| @SmallTest
|
| public void 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);
|
| VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer);
|
| @@ -147,6 +160,10 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
|
|
|
| @SmallTest
|
| public void 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);
|
| VideoCapturerAndroidTestFixtures.switchCamera(capturer);
|
| }
|
| @@ -163,6 +180,10 @@ 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);
|
| @@ -181,6 +202,10 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
|
|
|
| @SmallTest
|
| public void 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);
|
| VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer);
|
| }
|
| @@ -198,6 +223,10 @@ 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);
|
| @@ -218,6 +247,10 @@ 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);
|
| @@ -236,6 +269,10 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
|
|
|
| @MediumTest
|
| public void 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);
|
| VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer);
|
|
|