OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1596 if (!certificate) { | 1596 if (!certificate) { |
1597 LOG(LS_ERROR) << "Failed to generate certificate. KeyType: " << key_type; | 1597 LOG(LS_ERROR) << "Failed to generate certificate. KeyType: " << key_type; |
1598 return 0; | 1598 return 0; |
1599 } | 1599 } |
1600 rtc_config.certificates.push_back(certificate); | 1600 rtc_config.certificates.push_back(certificate); |
1601 } | 1601 } |
1602 | 1602 |
1603 PCOJava* observer = reinterpret_cast<PCOJava*>(observer_p); | 1603 PCOJava* observer = reinterpret_cast<PCOJava*>(observer_p); |
1604 observer->SetConstraints(new ConstraintsWrapper(jni, j_constraints)); | 1604 observer->SetConstraints(new ConstraintsWrapper(jni, j_constraints)); |
1605 rtc::scoped_refptr<PeerConnectionInterface> pc(f->CreatePeerConnection( | 1605 rtc::scoped_refptr<PeerConnectionInterface> pc(f->CreatePeerConnection( |
1606 rtc_config, | 1606 rtc_config, observer->constraints(), NULL, NULL, observer)); |
1607 observer->constraints(), | |
1608 nullptr, | |
1609 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>(), | |
1610 observer)); | |
1611 return (jlong)pc.release(); | 1607 return (jlong)pc.release(); |
1612 } | 1608 } |
1613 | 1609 |
1614 static rtc::scoped_refptr<PeerConnectionInterface> ExtractNativePC( | 1610 static rtc::scoped_refptr<PeerConnectionInterface> ExtractNativePC( |
1615 JNIEnv* jni, jobject j_pc) { | 1611 JNIEnv* jni, jobject j_pc) { |
1616 jfieldID native_pc_id = GetFieldID(jni, | 1612 jfieldID native_pc_id = GetFieldID(jni, |
1617 GetObjectClass(jni, j_pc), "nativePeerConnection", "J"); | 1613 GetObjectClass(jni, j_pc), "nativePeerConnection", "J"); |
1618 jlong j_p = GetLongField(jni, j_pc, native_pc_id); | 1614 jlong j_p = GetLongField(jni, j_pc, native_pc_id); |
1619 return rtc::scoped_refptr<PeerConnectionInterface>( | 1615 return rtc::scoped_refptr<PeerConnectionInterface>( |
1620 reinterpret_cast<PeerConnectionInterface*>(j_p)); | 1616 reinterpret_cast<PeerConnectionInterface*>(j_p)); |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2251 return JavaStringFromStdString( | 2247 return JavaStringFromStdString( |
2252 jni, | 2248 jni, |
2253 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 2249 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); |
2254 } | 2250 } |
2255 | 2251 |
2256 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 2252 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { |
2257 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 2253 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); |
2258 } | 2254 } |
2259 | 2255 |
2260 } // namespace webrtc_jni | 2256 } // namespace webrtc_jni |
OLD | NEW |