| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 List<PeerConnection.IceServer> iceServers = | 245 List<PeerConnection.IceServer> iceServers = |
| 246 new LinkedList<PeerConnection.IceServer>(); | 246 new LinkedList<PeerConnection.IceServer>(); |
| 247 SignalingParameters signalingParameters = new SignalingParameters( | 247 SignalingParameters signalingParameters = new SignalingParameters( |
| 248 iceServers, true, // iceServers, initiator. | 248 iceServers, true, // iceServers, initiator. |
| 249 null, null, null, // clientId, wssUrl, wssPostUrl. | 249 null, null, null, // clientId, wssUrl, wssPostUrl. |
| 250 null, null); // offerSdp, iceCandidates. | 250 null, null); // offerSdp, iceCandidates. |
| 251 PeerConnectionParameters peerConnectionParameters = | 251 PeerConnectionParameters peerConnectionParameters = |
| 252 new PeerConnectionParameters( | 252 new PeerConnectionParameters( |
| 253 enableVideo, true, // videoCallEnabled, loopback. | 253 enableVideo, true, // videoCallEnabled, loopback. |
| 254 0, 0, 0, 0, videoCodec, true, // video codec parameters. | 254 0, 0, 0, 0, videoCodec, true, // video codec parameters. |
| 255 0, "OPUS", true); // audio codec parameters. | 255 0, "OPUS", false, true); // audio codec parameters. |
| 256 | 256 |
| 257 PeerConnectionClient client = PeerConnectionClient.getInstance(); | 257 PeerConnectionClient client = PeerConnectionClient.getInstance(); |
| 258 PeerConnectionFactory.Options options = new PeerConnectionFactory.Options(); | 258 PeerConnectionFactory.Options options = new PeerConnectionFactory.Options(); |
| 259 options.networkIgnoreMask = 0; | 259 options.networkIgnoreMask = 0; |
| 260 client.setPeerConnectionFactoryOptions(options); | 260 client.setPeerConnectionFactoryOptions(options); |
| 261 client.createPeerConnectionFactory( | 261 client.createPeerConnectionFactory( |
| 262 getInstrumentation().getContext(), null, | 262 getInstrumentation().getContext(), null, |
| 263 peerConnectionParameters, this); | 263 peerConnectionParameters, this); |
| 264 client.createPeerConnection( | 264 client.createPeerConnection( |
| 265 localRenderer, remoteRenderer, signalingParameters); | 265 localRenderer, remoteRenderer, signalingParameters); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 446 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
| 447 assertTrue("Remote video frames were not rendered after video restart.", | 447 assertTrue("Remote video frames were not rendered after video restart.", |
| 448 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 448 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
| 449 } | 449 } |
| 450 pcClient.close(); | 450 pcClient.close(); |
| 451 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); | 451 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); |
| 452 Log.d(TAG, "testVideoSourceRestart done."); | 452 Log.d(TAG, "testVideoSourceRestart done."); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } | 455 } |
| OLD | NEW |