OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 false /* useOpenSLES */, | 284 false /* useOpenSLES */, |
285 false /* disableBuiltInAEC */, | 285 false /* disableBuiltInAEC */, |
286 false /* disableBuiltInAGC */, | 286 false /* disableBuiltInAGC */, |
287 false /* disableBuiltInNS */, | 287 false /* disableBuiltInNS */, |
288 false /* enableLevelControl */); | 288 false /* enableLevelControl */); |
289 return peerConnectionParameters; | 289 return peerConnectionParameters; |
290 } | 290 } |
291 | 291 |
292 private PeerConnectionParameters createParametersForVideoCall( | 292 private PeerConnectionParameters createParametersForVideoCall( |
293 String videoCodec, boolean captureToTexture) { | 293 String videoCodec, boolean captureToTexture) { |
294 final boolean useCamera2 = captureToTexture && Camera2Enumerator.isSupported
(); | 294 final boolean useCamera2 = captureToTexture |
| 295 && Camera2Enumerator.isSupported(getInstrumentation().getTargetContext()
); |
295 | 296 |
296 PeerConnectionParameters peerConnectionParameters = | 297 PeerConnectionParameters peerConnectionParameters = |
297 new PeerConnectionParameters( | 298 new PeerConnectionParameters( |
298 true, /* videoCallEnabled */ | 299 true, /* videoCallEnabled */ |
299 true, /* loopback */ | 300 true, /* loopback */ |
300 false, /* tracing */ | 301 false, /* tracing */ |
301 // Video codec parameters. | 302 // Video codec parameters. |
302 useCamera2, /* useCamera2 */ | 303 useCamera2, /* useCamera2 */ |
303 0, /* videoWidth */ | 304 0, /* videoWidth */ |
304 0, /* videoHeight */ | 305 0, /* videoHeight */ |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 assertTrue("Remote video frames were not rendered after capture format cha
nge.", | 666 assertTrue("Remote video frames were not rendered after capture format cha
nge.", |
666 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 667 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
667 } | 668 } |
668 | 669 |
669 pcClient.close(); | 670 pcClient.close(); |
670 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); | 671 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); |
671 Log.d(TAG, "testCaptureFormatChange done."); | 672 Log.d(TAG, "testCaptureFormatChange done."); |
672 } | 673 } |
673 | 674 |
674 } | 675 } |
OLD | NEW |