| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 List<PeerConnection.IceServer> iceServers = | 229 List<PeerConnection.IceServer> iceServers = |
| 230 new LinkedList<PeerConnection.IceServer>(); | 230 new LinkedList<PeerConnection.IceServer>(); |
| 231 SignalingParameters signalingParameters = new SignalingParameters( | 231 SignalingParameters signalingParameters = new SignalingParameters( |
| 232 iceServers, true, // iceServers, initiator. | 232 iceServers, true, // iceServers, initiator. |
| 233 null, null, null, // clientId, wssUrl, wssPostUrl. | 233 null, null, null, // clientId, wssUrl, wssPostUrl. |
| 234 null, null); // offerSdp, iceCandidates. | 234 null, null); // offerSdp, iceCandidates. |
| 235 | 235 |
| 236 PeerConnectionClient client = PeerConnectionClient.getInstance(); | 236 PeerConnectionClient client = PeerConnectionClient.getInstance(); |
| 237 PeerConnectionFactory.Options options = new PeerConnectionFactory.Options(); | 237 PeerConnectionFactory.Options options = new PeerConnectionFactory.Options(); |
| 238 options.networkIgnoreMask = 0; | 238 options.networkIgnoreMask = 0; |
| 239 options.disableNetworkMonitor = true; |
| 239 client.setPeerConnectionFactoryOptions(options); | 240 client.setPeerConnectionFactoryOptions(options); |
| 240 client.createPeerConnectionFactory( | 241 client.createPeerConnectionFactory( |
| 241 getInstrumentation().getContext(), peerConnectionParameters, this); | 242 getInstrumentation().getContext(), peerConnectionParameters, this); |
| 242 client.createPeerConnection(decodeToTexture ? eglBase.getContext() : null, | 243 client.createPeerConnection(decodeToTexture ? eglBase.getContext() : null, |
| 243 localRenderer, remoteRenderer, signalingParameters); | 244 localRenderer, remoteRenderer, signalingParameters); |
| 244 client.createOffer(); | 245 client.createOffer(); |
| 245 return client; | 246 return client; |
| 246 } | 247 } |
| 247 | 248 |
| 248 private PeerConnectionParameters createParameters(boolean enableVideo, | 249 private PeerConnectionParameters createParameters(boolean enableVideo, |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 466 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
| 466 assertTrue("Remote video frames were not rendered after video restart.", | 467 assertTrue("Remote video frames were not rendered after video restart.", |
| 467 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 468 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
| 468 } | 469 } |
| 469 pcClient.close(); | 470 pcClient.close(); |
| 470 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); | 471 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); |
| 471 Log.d(TAG, "testVideoSourceRestart done."); | 472 Log.d(TAG, "testVideoSourceRestart done."); |
| 472 } | 473 } |
| 473 | 474 |
| 474 } | 475 } |
| OLD | NEW |