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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 new PeerConnectionParameters( | 231 new PeerConnectionParameters( |
232 enableVideo, true, // videoCallEnabled, loopback. | 232 enableVideo, true, // videoCallEnabled, loopback. |
233 0, 0, 0, 0, videoCodec, true, // video codec parameters. | 233 0, 0, 0, 0, videoCodec, true, // video codec parameters. |
234 0, "OPUS", false, true); // audio codec parameters. | 234 0, "OPUS", false, true); // audio codec parameters. |
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 client.setPeerConnectionFactoryOptions(options); | 239 client.setPeerConnectionFactoryOptions(options); |
240 client.createPeerConnectionFactory( | 240 client.createPeerConnectionFactory( |
241 getInstrumentation().getContext(), null, | 241 getInstrumentation().getContext(), peerConnectionParameters, this); |
242 peerConnectionParameters, this); | |
243 client.createPeerConnection( | 242 client.createPeerConnection( |
244 localRenderer, remoteRenderer, signalingParameters); | 243 null, localRenderer, remoteRenderer, signalingParameters); |
245 client.createOffer(); | 244 client.createOffer(); |
246 return client; | 245 return client; |
247 } | 246 } |
248 | 247 |
249 @Override | 248 @Override |
250 public void setUp() { | 249 public void setUp() { |
251 signalingExecutor = new LooperExecutor(); | 250 signalingExecutor = new LooperExecutor(); |
252 signalingExecutor.requestStart(); | 251 signalingExecutor.requestStart(); |
253 } | 252 } |
254 | 253 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 424 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
426 assertTrue("Remote video frames were not rendered after video restart.", | 425 assertTrue("Remote video frames were not rendered after video restart.", |
427 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 426 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
428 } | 427 } |
429 pcClient.close(); | 428 pcClient.close(); |
430 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); | 429 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); |
431 Log.d(TAG, "testVideoSourceRestart done."); | 430 Log.d(TAG, "testVideoSourceRestart done."); |
432 } | 431 } |
433 | 432 |
434 } | 433 } |
OLD | NEW |