OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1334 rtc_config.rtcp_mux_policy = | 1334 rtc_config.rtcp_mux_policy = |
1335 JavaRtcpMuxPolicyToNativeType(jni, j_rtcp_mux_policy); | 1335 JavaRtcpMuxPolicyToNativeType(jni, j_rtcp_mux_policy); |
1336 rtc_config.tcp_candidate_policy = | 1336 rtc_config.tcp_candidate_policy = |
1337 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy); | 1337 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy); |
1338 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config.servers); | 1338 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config.servers); |
1339 rtc_config.audio_jitter_buffer_max_packets = | 1339 rtc_config.audio_jitter_buffer_max_packets = |
1340 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id); | 1340 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id); |
1341 rtc_config.audio_jitter_buffer_fast_accelerate = GetBooleanField( | 1341 rtc_config.audio_jitter_buffer_fast_accelerate = GetBooleanField( |
1342 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id); | 1342 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id); |
1343 | 1343 |
1344 // Create ECSDA certificate. | |
1345 scoped_ptr<rtc::SSLIdentity> ssl_identity( | |
1346 rtc::SSLIdentity::Generate(std::string(), rtc::KT_ECDSA)); | |
jiayl2
2015/08/26 00:12:23
Reuse string https://code.google.com/p/chromium/co
AlexG
2015/08/26 00:37:03
Done.
| |
1347 if (ssl_identity.get()) { | |
1348 rtc_config.certificates.push_back( | |
1349 rtc::RTCCertificate::Create(ssl_identity.Pass())); | |
1350 LOG(LS_INFO) << "ECDSA certificate created."; | |
1351 } else { | |
1352 LOG(LS_WARNING) << "Failed to generate SSLIdentity."; | |
1353 } | |
1354 | |
1344 PCOJava* observer = reinterpret_cast<PCOJava*>(observer_p); | 1355 PCOJava* observer = reinterpret_cast<PCOJava*>(observer_p); |
1345 observer->SetConstraints(new ConstraintsWrapper(jni, j_constraints)); | 1356 observer->SetConstraints(new ConstraintsWrapper(jni, j_constraints)); |
1346 rtc::scoped_refptr<PeerConnectionInterface> pc(f->CreatePeerConnection( | 1357 rtc::scoped_refptr<PeerConnectionInterface> pc(f->CreatePeerConnection( |
1347 rtc_config, observer->constraints(), NULL, NULL, observer)); | 1358 rtc_config, observer->constraints(), NULL, NULL, observer)); |
1348 return (jlong)pc.release(); | 1359 return (jlong)pc.release(); |
1349 } | 1360 } |
1350 | 1361 |
1351 static rtc::scoped_refptr<PeerConnectionInterface> ExtractNativePC( | 1362 static rtc::scoped_refptr<PeerConnectionInterface> ExtractNativePC( |
1352 JNIEnv* jni, jobject j_pc) { | 1363 JNIEnv* jni, jobject j_pc) { |
1353 jfieldID native_pc_id = GetFieldID(jni, | 1364 jfieldID native_pc_id = GetFieldID(jni, |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1677 } | 1688 } |
1678 | 1689 |
1679 JOW(void, VideoTrack_nativeRemoveRenderer)( | 1690 JOW(void, VideoTrack_nativeRemoveRenderer)( |
1680 JNIEnv* jni, jclass, | 1691 JNIEnv* jni, jclass, |
1681 jlong j_video_track_pointer, jlong j_renderer_pointer) { | 1692 jlong j_video_track_pointer, jlong j_renderer_pointer) { |
1682 reinterpret_cast<VideoTrackInterface*>(j_video_track_pointer)->RemoveRenderer( | 1693 reinterpret_cast<VideoTrackInterface*>(j_video_track_pointer)->RemoveRenderer( |
1683 reinterpret_cast<VideoRendererInterface*>(j_renderer_pointer)); | 1694 reinterpret_cast<VideoRendererInterface*>(j_renderer_pointer)); |
1684 } | 1695 } |
1685 | 1696 |
1686 } // namespace webrtc_jni | 1697 } // namespace webrtc_jni |
OLD | NEW |