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

Side by Side Diff: talk/app/webrtc/java/jni/peerconnection_jni.cc

Issue 1455033004: Ping backup connection at a slower rate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge with head, address comments Created 5 years 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
OLDNEW
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 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 jobject j_ice_servers = GetObjectField(jni, j_rtc_config, j_ice_servers_id); 1545 jobject j_ice_servers = GetObjectField(jni, j_rtc_config, j_ice_servers_id);
1546 1546
1547 jfieldID j_audio_jitter_buffer_max_packets_id = 1547 jfieldID j_audio_jitter_buffer_max_packets_id =
1548 GetFieldID(jni, j_rtc_config_class, "audioJitterBufferMaxPackets", "I"); 1548 GetFieldID(jni, j_rtc_config_class, "audioJitterBufferMaxPackets", "I");
1549 jfieldID j_audio_jitter_buffer_fast_accelerate_id = GetFieldID( 1549 jfieldID j_audio_jitter_buffer_fast_accelerate_id = GetFieldID(
1550 jni, j_rtc_config_class, "audioJitterBufferFastAccelerate", "Z"); 1550 jni, j_rtc_config_class, "audioJitterBufferFastAccelerate", "Z");
1551 1551
1552 jfieldID j_ice_connection_receiving_timeout_id = 1552 jfieldID j_ice_connection_receiving_timeout_id =
1553 GetFieldID(jni, j_rtc_config_class, "iceConnectionReceivingTimeout", "I"); 1553 GetFieldID(jni, j_rtc_config_class, "iceConnectionReceivingTimeout", "I");
1554 1554
1555 jfieldID j_ice_backup_connection_ping_interval_id = GetFieldID(
1556 jni, j_rtc_config_class, "iceBackupConnectionPingInterval", "I");
pthatcher1 2015/12/01 19:40:25 We should start using "candidate pair" instead of
honghaiz3 2015/12/01 23:43:08 Done. Also changed the one ice_backup_connection t
1557
1555 jfieldID j_continual_gathering_policy_id = 1558 jfieldID j_continual_gathering_policy_id =
1556 GetFieldID(jni, j_rtc_config_class, "continualGatheringPolicy", 1559 GetFieldID(jni, j_rtc_config_class, "continualGatheringPolicy",
1557 "Lorg/webrtc/PeerConnection$ContinualGatheringPolicy;"); 1560 "Lorg/webrtc/PeerConnection$ContinualGatheringPolicy;");
1558 jobject j_continual_gathering_policy = 1561 jobject j_continual_gathering_policy =
1559 GetObjectField(jni, j_rtc_config, j_continual_gathering_policy_id); 1562 GetObjectField(jni, j_rtc_config, j_continual_gathering_policy_id);
1560 1563
1561 rtc_config->type = 1564 rtc_config->type =
1562 JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type); 1565 JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type);
1563 rtc_config->bundle_policy = 1566 rtc_config->bundle_policy =
1564 JavaBundlePolicyToNativeType(jni, j_bundle_policy); 1567 JavaBundlePolicyToNativeType(jni, j_bundle_policy);
1565 rtc_config->rtcp_mux_policy = 1568 rtc_config->rtcp_mux_policy =
1566 JavaRtcpMuxPolicyToNativeType(jni, j_rtcp_mux_policy); 1569 JavaRtcpMuxPolicyToNativeType(jni, j_rtcp_mux_policy);
1567 rtc_config->tcp_candidate_policy = 1570 rtc_config->tcp_candidate_policy =
1568 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy); 1571 JavaTcpCandidatePolicyToNativeType(jni, j_tcp_candidate_policy);
1569 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config->servers); 1572 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config->servers);
1570 rtc_config->audio_jitter_buffer_max_packets = 1573 rtc_config->audio_jitter_buffer_max_packets =
1571 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id); 1574 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id);
1572 rtc_config->audio_jitter_buffer_fast_accelerate = GetBooleanField( 1575 rtc_config->audio_jitter_buffer_fast_accelerate = GetBooleanField(
1573 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id); 1576 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id);
1574 rtc_config->ice_connection_receiving_timeout = 1577 rtc_config->ice_connection_receiving_timeout =
1575 GetIntField(jni, j_rtc_config, j_ice_connection_receiving_timeout_id); 1578 GetIntField(jni, j_rtc_config, j_ice_connection_receiving_timeout_id);
1579 rtc_config->ice_backup_connection_ping_interval =
1580 GetIntField(jni, j_rtc_config, j_ice_backup_connection_ping_interval_id);
1576 rtc_config->continual_gathering_policy = 1581 rtc_config->continual_gathering_policy =
1577 JavaContinualGatheringPolicyToNativeType( 1582 JavaContinualGatheringPolicyToNativeType(
1578 jni, j_continual_gathering_policy); 1583 jni, j_continual_gathering_policy);
1579 } 1584 }
1580 1585
1581 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)( 1586 JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)(
1582 JNIEnv *jni, jclass, jlong factory, jobject j_rtc_config, 1587 JNIEnv *jni, jclass, jlong factory, jobject j_rtc_config,
1583 jobject j_constraints, jlong observer_p) { 1588 jobject j_constraints, jlong observer_p) {
1584 rtc::scoped_refptr<PeerConnectionFactoryInterface> f( 1589 rtc::scoped_refptr<PeerConnectionFactoryInterface> f(
1585 reinterpret_cast<PeerConnectionFactoryInterface*>( 1590 reinterpret_cast<PeerConnectionFactoryInterface*>(
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 return JavaStringFromStdString( 2100 return JavaStringFromStdString(
2096 jni, 2101 jni,
2097 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); 2102 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id());
2098 } 2103 }
2099 2104
2100 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { 2105 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) {
2101 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); 2106 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release();
2102 } 2107 }
2103 2108
2104 } // namespace webrtc_jni 2109 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/java/src/org/webrtc/PeerConnection.java » ('j') | webrtc/p2p/base/p2ptransportchannel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698