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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 } else { | 330 } else { |
331 Log.d(TAG, "Allow OpenSL ES audio if device supports it"); | 331 Log.d(TAG, "Allow OpenSL ES audio if device supports it"); |
332 WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(false); | 332 WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(false); |
333 } | 333 } |
334 | 334 |
335 // Create peer connection factory. | 335 // Create peer connection factory. |
336 if (!PeerConnectionFactory.initializeAndroidGlobals(context, true, true, | 336 if (!PeerConnectionFactory.initializeAndroidGlobals(context, true, true, |
337 peerConnectionParameters.videoCodecHwAcceleration)) { | 337 peerConnectionParameters.videoCodecHwAcceleration)) { |
338 events.onPeerConnectionError("Failed to initializeAndroidGlobals"); | 338 events.onPeerConnectionError("Failed to initializeAndroidGlobals"); |
339 } | 339 } |
340 factory = new PeerConnectionFactory(); | |
341 if (options != null) { | 340 if (options != null) { |
342 Log.d(TAG, "Factory networkIgnoreMask option: " + options.networkIgnoreMas
k); | 341 Log.d(TAG, "Factory networkIgnoreMask option: " + options.networkIgnoreMas
k); |
343 factory.setOptions(options); | |
344 } | 342 } |
| 343 factory = new PeerConnectionFactory(options); |
345 Log.d(TAG, "Peer connection factory created."); | 344 Log.d(TAG, "Peer connection factory created."); |
346 } | 345 } |
347 | 346 |
348 private void createMediaConstraintsInternal() { | 347 private void createMediaConstraintsInternal() { |
349 // Create peer connection constraints. | 348 // Create peer connection constraints. |
350 pcConstraints = new MediaConstraints(); | 349 pcConstraints = new MediaConstraints(); |
351 // Enable DTLS for normal calls and disable for loopback calls. | 350 // Enable DTLS for normal calls and disable for loopback calls. |
352 if (peerConnectionParameters.loopback) { | 351 if (peerConnectionParameters.loopback) { |
353 pcConstraints.optional.add( | 352 pcConstraints.optional.add( |
354 new MediaConstraints.KeyValuePair(DTLS_SRTP_KEY_AGREEMENT_CONSTRAINT,
"false")); | 353 new MediaConstraints.KeyValuePair(DTLS_SRTP_KEY_AGREEMENT_CONSTRAINT,
"false")); |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 public void onCreateFailure(final String error) { | 1076 public void onCreateFailure(final String error) { |
1078 reportError("createSDP error: " + error); | 1077 reportError("createSDP error: " + error); |
1079 } | 1078 } |
1080 | 1079 |
1081 @Override | 1080 @Override |
1082 public void onSetFailure(final String error) { | 1081 public void onSetFailure(final String error) { |
1083 reportError("setSDP error: " + error); | 1082 reportError("setSDP error: " + error); |
1084 } | 1083 } |
1085 } | 1084 } |
1086 } | 1085 } |
OLD | NEW |