| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 getInstrumentation().getContext(), peerConnectionParameters, this); | 242 getInstrumentation().getContext(), peerConnectionParameters, this); |
| 243 client.createPeerConnection(useTexures ? eglBase.getContext() : null, | 243 client.createPeerConnection(useTexures ? eglBase.getContext() : null, |
| 244 localRenderer, remoteRenderer, signalingParameters); | 244 localRenderer, remoteRenderer, signalingParameters); |
| 245 client.createOffer(); | 245 client.createOffer(); |
| 246 return client; | 246 return client; |
| 247 } | 247 } |
| 248 | 248 |
| 249 private PeerConnectionParameters createParametersForAudioCall() { | 249 private PeerConnectionParameters createParametersForAudioCall() { |
| 250 PeerConnectionParameters peerConnectionParameters = | 250 PeerConnectionParameters peerConnectionParameters = |
| 251 new PeerConnectionParameters( | 251 new PeerConnectionParameters( |
| 252 false, true, // videoCallEnabled, loopback. | 252 false, true, false, // videoCallEnabled, loopback, tracing. |
| 253 0, 0, 0, 0, "", true, false, // video codec parameters. | 253 0, 0, 0, 0, "", true, false, // video codec parameters. |
| 254 0, "OPUS", false, false); // audio codec parameters. | 254 0, "OPUS", false, false); // audio codec parameters. |
| 255 return peerConnectionParameters; | 255 return peerConnectionParameters; |
| 256 } | 256 } |
| 257 | 257 |
| 258 private PeerConnectionParameters createParametersForVideoCall( | 258 private PeerConnectionParameters createParametersForVideoCall( |
| 259 String videoCodec, boolean captureToTexture) { | 259 String videoCodec, boolean captureToTexture) { |
| 260 PeerConnectionParameters peerConnectionParameters = | 260 PeerConnectionParameters peerConnectionParameters = |
| 261 new PeerConnectionParameters( | 261 new PeerConnectionParameters( |
| 262 true, true, // videoCallEnabled, loopback. | 262 true, true, false, // videoCallEnabled, loopback, tracing. |
| 263 0, 0, 0, 0, videoCodec, true, captureToTexture, // video codec param
eters. | 263 0, 0, 0, 0, videoCodec, true, captureToTexture, // video codec param
eters. |
| 264 0, "OPUS", false, false); // audio codec parameters. | 264 0, "OPUS", false, false); // audio codec parameters. |
| 265 return peerConnectionParameters; | 265 return peerConnectionParameters; |
| 266 } | 266 } |
| 267 | 267 |
| 268 @Override | 268 @Override |
| 269 public void setUp() { | 269 public void setUp() { |
| 270 signalingExecutor = new LooperExecutor(); | 270 signalingExecutor = new LooperExecutor(); |
| 271 signalingExecutor.requestStart(); | 271 signalingExecutor.requestStart(); |
| 272 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { | 272 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 504 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
| 505 assertTrue("Remote video frames were not rendered after video restart.", | 505 assertTrue("Remote video frames were not rendered after video restart.", |
| 506 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 506 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
| 507 } | 507 } |
| 508 pcClient.close(); | 508 pcClient.close(); |
| 509 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); | 509 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); |
| 510 Log.d(TAG, "testVideoSourceRestart done."); | 510 Log.d(TAG, "testVideoSourceRestart done."); |
| 511 } | 511 } |
| 512 | 512 |
| 513 } | 513 } |
| OLD | NEW |