Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: webrtc/sdk/android/src/jni/peerconnection_jni.cc

Issue 2731813002: Add the option to disable IPv6 ICE candidates on WiFi (Closed)
Patch Set: Fix the rtc_unittests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/PeerConnection.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 jni, j_rtc_config_class, "presumeWritableWhenFullyRelayed", "Z"); 1789 jni, j_rtc_config_class, "presumeWritableWhenFullyRelayed", "Z");
1790 1790
1791 jfieldID j_prune_turn_ports_id = 1791 jfieldID j_prune_turn_ports_id =
1792 GetFieldID(jni, j_rtc_config_class, "pruneTurnPorts", "Z"); 1792 GetFieldID(jni, j_rtc_config_class, "pruneTurnPorts", "Z");
1793 1793
1794 jfieldID j_ice_check_min_interval_id = GetFieldID( 1794 jfieldID j_ice_check_min_interval_id = GetFieldID(
1795 jni, j_rtc_config_class, "iceCheckMinInterval", "Ljava/lang/Integer;"); 1795 jni, j_rtc_config_class, "iceCheckMinInterval", "Ljava/lang/Integer;");
1796 jclass j_integer_class = jni->FindClass("java/lang/Integer"); 1796 jclass j_integer_class = jni->FindClass("java/lang/Integer");
1797 jmethodID int_value_id = GetMethodID(jni, j_integer_class, "intValue", "()I"); 1797 jmethodID int_value_id = GetMethodID(jni, j_integer_class, "intValue", "()I");
1798 1798
1799 jfieldID j_disable_ipv6_on_wifi_id =
1800 GetFieldID(jni, j_rtc_config_class, "disableIPv6OnWifi", "Z");
1801
1799 rtc_config->type = 1802 rtc_config->type =
1800 JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type); 1803 JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type);
1801 rtc_config->bundle_policy = 1804 rtc_config->bundle_policy =
1802 JavaBundlePolicyToNativeType(jni, j_bundle_policy); 1805 JavaBundlePolicyToNativeType(jni, j_bundle_policy);
1803 rtc_config->rtcp_mux_policy = 1806 rtc_config->rtcp_mux_policy =
1804 JavaRtcpMuxPolicyToNativeType(jni, j_rtcp_mux_policy); 1807 JavaRtcpMuxPolicyToNativeType(jni, j_rtcp_mux_policy);
1805 rtc_config->tcp_candidate_policy = 1808 rtc_config->tcp_candidate_policy =
1806 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy); 1809 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy);
1807 rtc_config->candidate_network_policy = 1810 rtc_config->candidate_network_policy =
1808 JavaCandidateNetworkPolicyToNativeType(jni, j_candidate_network_policy); 1811 JavaCandidateNetworkPolicyToNativeType(jni, j_candidate_network_policy);
(...skipping 16 matching lines...) Expand all
1825 rtc_config->presume_writable_when_fully_relayed = GetBooleanField( 1828 rtc_config->presume_writable_when_fully_relayed = GetBooleanField(
1826 jni, j_rtc_config, j_presume_writable_when_fully_relayed_id); 1829 jni, j_rtc_config, j_presume_writable_when_fully_relayed_id);
1827 jobject j_ice_check_min_interval = 1830 jobject j_ice_check_min_interval =
1828 GetNullableObjectField(jni, j_rtc_config, j_ice_check_min_interval_id); 1831 GetNullableObjectField(jni, j_rtc_config, j_ice_check_min_interval_id);
1829 if (!IsNull(jni, j_ice_check_min_interval)) { 1832 if (!IsNull(jni, j_ice_check_min_interval)) {
1830 int ice_check_min_interval_value = 1833 int ice_check_min_interval_value =
1831 jni->CallIntMethod(j_ice_check_min_interval, int_value_id); 1834 jni->CallIntMethod(j_ice_check_min_interval, int_value_id);
1832 rtc_config->ice_check_min_interval = 1835 rtc_config->ice_check_min_interval =
1833 rtc::Optional<int>(ice_check_min_interval_value); 1836 rtc::Optional<int>(ice_check_min_interval_value);
1834 } 1837 }
1838 rtc_config->disable_ipv6_on_wifi =
1839 GetBooleanField(jni, j_rtc_config, j_disable_ipv6_on_wifi_id);
1835 } 1840 }
1836 1841
1837 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)( 1842 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)(
1838 JNIEnv *jni, jclass, jlong factory, jobject j_rtc_config, 1843 JNIEnv *jni, jclass, jlong factory, jobject j_rtc_config,
1839 jobject j_constraints, jlong observer_p) { 1844 jobject j_constraints, jlong observer_p) {
1840 rtc::scoped_refptr<PeerConnectionFactoryInterface> f( 1845 rtc::scoped_refptr<PeerConnectionFactoryInterface> f(
1841 reinterpret_cast<PeerConnectionFactoryInterface*>( 1846 reinterpret_cast<PeerConnectionFactoryInterface*>(
1842 factoryFromJava(factory))); 1847 factoryFromJava(factory)));
1843 1848
1844 PeerConnectionInterface::RTCConfiguration rtc_config( 1849 PeerConnectionInterface::RTCConfiguration rtc_config(
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) 2734 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)
2730 ->inter_tone_gap(); 2735 ->inter_tone_gap();
2731 } 2736 }
2732 2737
2733 JOW(void, DtmfSender_free) 2738 JOW(void, DtmfSender_free)
2734 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { 2739 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) {
2735 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); 2740 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release();
2736 } 2741 }
2737 2742
2738 } // namespace webrtc_jni 2743 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/PeerConnection.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698