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 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 jobject j_ice_servers = GetObjectField(jni, j_rtc_config, j_ice_servers_id); | 1496 jobject j_ice_servers = GetObjectField(jni, j_rtc_config, j_ice_servers_id); |
1497 | 1497 |
1498 jfieldID j_audio_jitter_buffer_max_packets_id = | 1498 jfieldID j_audio_jitter_buffer_max_packets_id = |
1499 GetFieldID(jni, j_rtc_config_class, "audioJitterBufferMaxPackets", "I"); | 1499 GetFieldID(jni, j_rtc_config_class, "audioJitterBufferMaxPackets", "I"); |
1500 jfieldID j_audio_jitter_buffer_fast_accelerate_id = GetFieldID( | 1500 jfieldID j_audio_jitter_buffer_fast_accelerate_id = GetFieldID( |
1501 jni, j_rtc_config_class, "audioJitterBufferFastAccelerate", "Z"); | 1501 jni, j_rtc_config_class, "audioJitterBufferFastAccelerate", "Z"); |
1502 | 1502 |
1503 jfieldID j_ice_connection_receiving_timeout_id = | 1503 jfieldID j_ice_connection_receiving_timeout_id = |
1504 GetFieldID(jni, j_rtc_config_class, "iceConnectionReceivingTimeout", "I"); | 1504 GetFieldID(jni, j_rtc_config_class, "iceConnectionReceivingTimeout", "I"); |
1505 | 1505 |
| 1506 jfieldID j_ice_backup_connection_ping_interval_id = GetFieldID( |
| 1507 jni, j_rtc_config_class, "iceBackupConnectionPingInterval", "I"); |
| 1508 |
1506 jfieldID j_continual_gathering_policy_id = | 1509 jfieldID j_continual_gathering_policy_id = |
1507 GetFieldID(jni, j_rtc_config_class, "continualGatheringPolicy", | 1510 GetFieldID(jni, j_rtc_config_class, "continualGatheringPolicy", |
1508 "Lorg/webrtc/PeerConnection$ContinualGatheringPolicy;"); | 1511 "Lorg/webrtc/PeerConnection$ContinualGatheringPolicy;"); |
1509 jobject j_continual_gathering_policy = | 1512 jobject j_continual_gathering_policy = |
1510 GetObjectField(jni, j_rtc_config, j_continual_gathering_policy_id); | 1513 GetObjectField(jni, j_rtc_config, j_continual_gathering_policy_id); |
1511 | 1514 |
1512 rtc_config->type = | 1515 rtc_config->type = |
1513 JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type); | 1516 JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type); |
1514 rtc_config->bundle_policy = | 1517 rtc_config->bundle_policy = |
1515 JavaBundlePolicyToNativeType(jni, j_bundle_policy); | 1518 JavaBundlePolicyToNativeType(jni, j_bundle_policy); |
1516 rtc_config->rtcp_mux_policy = | 1519 rtc_config->rtcp_mux_policy = |
1517 JavaRtcpMuxPolicyToNativeType(jni, j_rtcp_mux_policy); | 1520 JavaRtcpMuxPolicyToNativeType(jni, j_rtcp_mux_policy); |
1518 rtc_config->tcp_candidate_policy = | 1521 rtc_config->tcp_candidate_policy = |
1519 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy); | 1522 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy); |
1520 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config->servers); | 1523 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config->servers); |
1521 rtc_config->audio_jitter_buffer_max_packets = | 1524 rtc_config->audio_jitter_buffer_max_packets = |
1522 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id); | 1525 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id); |
1523 rtc_config->audio_jitter_buffer_fast_accelerate = GetBooleanField( | 1526 rtc_config->audio_jitter_buffer_fast_accelerate = GetBooleanField( |
1524 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id); | 1527 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id); |
1525 rtc_config->ice_connection_receiving_timeout = | 1528 rtc_config->ice_connection_receiving_timeout = |
1526 GetIntField(jni, j_rtc_config, j_ice_connection_receiving_timeout_id); | 1529 GetIntField(jni, j_rtc_config, j_ice_connection_receiving_timeout_id); |
| 1530 rtc_config->ice_backup_connection_ping_interval = |
| 1531 GetIntField(jni, j_rtc_config, j_ice_backup_connection_ping_interval_id); |
1527 rtc_config->continual_gathering_policy = | 1532 rtc_config->continual_gathering_policy = |
1528 JavaContinualGatheringPolicyToNativeType( | 1533 JavaContinualGatheringPolicyToNativeType( |
1529 jni, j_continual_gathering_policy); | 1534 jni, j_continual_gathering_policy); |
1530 } | 1535 } |
1531 | 1536 |
1532 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)( | 1537 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)( |
1533 JNIEnv *jni, jclass, jlong factory, jobject j_rtc_config, | 1538 JNIEnv *jni, jclass, jlong factory, jobject j_rtc_config, |
1534 jobject j_constraints, jlong observer_p) { | 1539 jobject j_constraints, jlong observer_p) { |
1535 rtc::scoped_refptr<PeerConnectionFactoryInterface> f( | 1540 rtc::scoped_refptr<PeerConnectionFactoryInterface> f( |
1536 reinterpret_cast<PeerConnectionFactoryInterface*>( | 1541 reinterpret_cast<PeerConnectionFactoryInterface*>( |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2046 return JavaStringFromStdString( | 2051 return JavaStringFromStdString( |
2047 jni, | 2052 jni, |
2048 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 2053 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); |
2049 } | 2054 } |
2050 | 2055 |
2051 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 2056 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { |
2052 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 2057 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); |
2053 } | 2058 } |
2054 | 2059 |
2055 } // namespace webrtc_jni | 2060 } // namespace webrtc_jni |
OLD | NEW |