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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy); | 1343 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy); |
1344 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config.servers); | 1344 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config.servers); |
1345 rtc_config.audio_jitter_buffer_max_packets = | 1345 rtc_config.audio_jitter_buffer_max_packets = |
1346 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id); | 1346 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id); |
1347 rtc_config.audio_jitter_buffer_fast_accelerate = GetBooleanField( | 1347 rtc_config.audio_jitter_buffer_fast_accelerate = GetBooleanField( |
1348 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id); | 1348 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id); |
1349 | 1349 |
1350 PCOJava* observer = reinterpret_cast<PCOJava*>(observer_p); | 1350 PCOJava* observer = reinterpret_cast<PCOJava*>(observer_p); |
1351 observer->SetConstraints(new ConstraintsWrapper(jni, j_constraints)); | 1351 observer->SetConstraints(new ConstraintsWrapper(jni, j_constraints)); |
1352 rtc::scoped_refptr<PeerConnectionInterface> pc(f->CreatePeerConnection( | 1352 rtc::scoped_refptr<PeerConnectionInterface> pc(f->CreatePeerConnection( |
1353 rtc_config, observer->constraints(), NULL, NULL, observer)); | 1353 rtc_config, observer->constraints(), NULL, NULL, rtc::KT_DEFAULT, |
| 1354 observer)); |
1354 return (jlong)pc.release(); | 1355 return (jlong)pc.release(); |
1355 } | 1356 } |
1356 | 1357 |
1357 static rtc::scoped_refptr<PeerConnectionInterface> ExtractNativePC( | 1358 static rtc::scoped_refptr<PeerConnectionInterface> ExtractNativePC( |
1358 JNIEnv* jni, jobject j_pc) { | 1359 JNIEnv* jni, jobject j_pc) { |
1359 jfieldID native_pc_id = GetFieldID(jni, | 1360 jfieldID native_pc_id = GetFieldID(jni, |
1360 GetObjectClass(jni, j_pc), "nativePeerConnection", "J"); | 1361 GetObjectClass(jni, j_pc), "nativePeerConnection", "J"); |
1361 jlong j_p = GetLongField(jni, j_pc, native_pc_id); | 1362 jlong j_p = GetLongField(jni, j_pc, native_pc_id); |
1362 return rtc::scoped_refptr<PeerConnectionInterface>( | 1363 return rtc::scoped_refptr<PeerConnectionInterface>( |
1363 reinterpret_cast<PeerConnectionInterface*>(j_p)); | 1364 reinterpret_cast<PeerConnectionInterface*>(j_p)); |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 } | 1677 } |
1677 | 1678 |
1678 JOW(void, VideoTrack_nativeRemoveRenderer)( | 1679 JOW(void, VideoTrack_nativeRemoveRenderer)( |
1679 JNIEnv* jni, jclass, | 1680 JNIEnv* jni, jclass, |
1680 jlong j_video_track_pointer, jlong j_renderer_pointer) { | 1681 jlong j_video_track_pointer, jlong j_renderer_pointer) { |
1681 reinterpret_cast<VideoTrackInterface*>(j_video_track_pointer)->RemoveRenderer( | 1682 reinterpret_cast<VideoTrackInterface*>(j_video_track_pointer)->RemoveRenderer( |
1682 reinterpret_cast<VideoRendererInterface*>(j_renderer_pointer)); | 1683 reinterpret_cast<VideoRendererInterface*>(j_renderer_pointer)); |
1683 } | 1684 } |
1684 | 1685 |
1685 } // namespace webrtc_jni | 1686 } // namespace webrtc_jni |
OLD | NEW |