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

Side by Side Diff: talk/app/webrtc/objc/RTCPeerConnectionInterface.mm

Issue 1455033004: Ping backup connection at a slower rate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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 2015 Google Inc. 3 * Copyright 2015 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 21 matching lines...) Expand all
32 32
33 @implementation RTCConfiguration 33 @implementation RTCConfiguration
34 34
35 @synthesize iceTransportsType = _iceTransportsType; 35 @synthesize iceTransportsType = _iceTransportsType;
36 @synthesize iceServers = _iceServers; 36 @synthesize iceServers = _iceServers;
37 @synthesize bundlePolicy = _bundlePolicy; 37 @synthesize bundlePolicy = _bundlePolicy;
38 @synthesize rtcpMuxPolicy = _rtcpMuxPolicy; 38 @synthesize rtcpMuxPolicy = _rtcpMuxPolicy;
39 @synthesize tcpCandidatePolicy = _tcpCandidatePolicy; 39 @synthesize tcpCandidatePolicy = _tcpCandidatePolicy;
40 @synthesize audioJitterBufferMaxPackets = _audioJitterBufferMaxPackets; 40 @synthesize audioJitterBufferMaxPackets = _audioJitterBufferMaxPackets;
41 @synthesize iceConnectionReceivingTimeout = _iceConnectionReceivingTimeout; 41 @synthesize iceConnectionReceivingTimeout = _iceConnectionReceivingTimeout;
42 @synthesize iceBackupCandidatePairPingInterval = _iceBackupCandidatePairPingInte rval;
42 43
43 - (instancetype)init { 44 - (instancetype)init {
44 if (self = [super init]) { 45 if (self = [super init]) {
45 // Copy defaults. 46 // Copy defaults.
46 webrtc::PeerConnectionInterface::RTCConfiguration config; 47 webrtc::PeerConnectionInterface::RTCConfiguration config;
47 _iceTransportsType = [RTCEnumConverter iceTransportsTypeForNativeEnum:config .type]; 48 _iceTransportsType = [RTCEnumConverter iceTransportsTypeForNativeEnum:config .type];
48 _bundlePolicy = [RTCEnumConverter bundlePolicyForNativeEnum:config.bundle_po licy]; 49 _bundlePolicy = [RTCEnumConverter bundlePolicyForNativeEnum:config.bundle_po licy];
49 _rtcpMuxPolicy = [RTCEnumConverter rtcpMuxPolicyForNativeEnum:config.rtcp_mu x_policy]; 50 _rtcpMuxPolicy = [RTCEnumConverter rtcpMuxPolicyForNativeEnum:config.rtcp_mu x_policy];
50 _tcpCandidatePolicy = 51 _tcpCandidatePolicy =
51 [RTCEnumConverter tcpCandidatePolicyForNativeEnum:config.tcp_candidate_p olicy]; 52 [RTCEnumConverter tcpCandidatePolicyForNativeEnum:config.tcp_candidate_p olicy];
52 _audioJitterBufferMaxPackets = config.audio_jitter_buffer_max_packets; 53 _audioJitterBufferMaxPackets = config.audio_jitter_buffer_max_packets;
53 _iceConnectionReceivingTimeout = config.ice_connection_receiving_timeout; 54 _iceConnectionReceivingTimeout = config.ice_connection_receiving_timeout;
55 _iceBackupCandidatePairPingInterval = config.ice_backup_candidate_pair_ping_ interval;
54 } 56 }
55 return self; 57 return self;
56 } 58 }
57 59
58 - (instancetype)initWithIceTransportsType:(RTCIceTransportsType)iceTransportsTyp e 60 - (instancetype)initWithIceTransportsType:(RTCIceTransportsType)iceTransportsTyp e
59 bundlePolicy:(RTCBundlePolicy)bundlePolicy 61 bundlePolicy:(RTCBundlePolicy)bundlePolicy
60 rtcpMuxPolicy:(RTCRtcpMuxPolicy)rtcpMuxPolicy 62 rtcpMuxPolicy:(RTCRtcpMuxPolicy)rtcpMuxPolicy
61 tcpCandidatePolicy:(RTCTcpCandidatePolicy)tcpCandidatePol icy 63 tcpCandidatePolicy:(RTCTcpCandidatePolicy)tcpCandidatePol icy
62 audioJitterBufferMaxPackets:(int)audioJitterBufferMaxPackets 64 audioJitterBufferMaxPackets:(int)audioJitterBufferMaxPackets
63 iceConnectionReceivingTimeout:(int)iceConnectionReceivingTimeout { 65 iceConnectionReceivingTimeout:(int)iceConnectionReceivingTimeout
66 iceBackupCandidatePairPingInterval:(int)iceBackupCandidatePairPingInterva l {
64 if (self = [super init]) { 67 if (self = [super init]) {
65 _iceTransportsType = iceTransportsType; 68 _iceTransportsType = iceTransportsType;
66 _bundlePolicy = bundlePolicy; 69 _bundlePolicy = bundlePolicy;
67 _rtcpMuxPolicy = rtcpMuxPolicy; 70 _rtcpMuxPolicy = rtcpMuxPolicy;
68 _tcpCandidatePolicy = tcpCandidatePolicy; 71 _tcpCandidatePolicy = tcpCandidatePolicy;
69 _audioJitterBufferMaxPackets = audioJitterBufferMaxPackets; 72 _audioJitterBufferMaxPackets = audioJitterBufferMaxPackets;
70 _iceConnectionReceivingTimeout = iceConnectionReceivingTimeout; 73 _iceConnectionReceivingTimeout = iceConnectionReceivingTimeout;
74 _iceBackupCandidatePairPingInterval = iceBackupCandidatePairPingInterval;
71 } 75 }
72 return self; 76 return self;
73 } 77 }
74 78
75 #pragma mark - Private 79 #pragma mark - Private
76 80
77 - (webrtc::PeerConnectionInterface::RTCConfiguration)nativeConfiguration { 81 - (webrtc::PeerConnectionInterface::RTCConfiguration)nativeConfiguration {
78 webrtc::PeerConnectionInterface::RTCConfiguration nativeConfig; 82 webrtc::PeerConnectionInterface::RTCConfiguration nativeConfig;
79 nativeConfig.type = [RTCEnumConverter nativeEnumForIceTransportsType:_iceTrans portsType]; 83 nativeConfig.type = [RTCEnumConverter nativeEnumForIceTransportsType:_iceTrans portsType];
80 for (RTCICEServer *iceServer : _iceServers) { 84 for (RTCICEServer *iceServer : _iceServers) {
81 nativeConfig.servers.push_back(iceServer.iceServer); 85 nativeConfig.servers.push_back(iceServer.iceServer);
82 } 86 }
83 nativeConfig.bundle_policy = [RTCEnumConverter nativeEnumForBundlePolicy:_bund lePolicy]; 87 nativeConfig.bundle_policy = [RTCEnumConverter nativeEnumForBundlePolicy:_bund lePolicy];
84 nativeConfig.rtcp_mux_policy = [RTCEnumConverter nativeEnumForRtcpMuxPolicy:_r tcpMuxPolicy]; 88 nativeConfig.rtcp_mux_policy = [RTCEnumConverter nativeEnumForRtcpMuxPolicy:_r tcpMuxPolicy];
85 nativeConfig.tcp_candidate_policy = 89 nativeConfig.tcp_candidate_policy =
86 [RTCEnumConverter nativeEnumForTcpCandidatePolicy:_tcpCandidatePolicy]; 90 [RTCEnumConverter nativeEnumForTcpCandidatePolicy:_tcpCandidatePolicy];
87 nativeConfig.audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets; 91 nativeConfig.audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets;
88 nativeConfig.ice_connection_receiving_timeout = 92 nativeConfig.ice_connection_receiving_timeout = _iceConnectionReceivingTimeout ;
89 _iceConnectionReceivingTimeout; 93 nativeConfig.ice_backup_candidate_pair_ping_interval = _iceBackupCandidatePair PingInterval;
90 return nativeConfig; 94 return nativeConfig;
91 } 95 }
92 96
93 @end 97 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698