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

Side by Side Diff: webrtc/p2p/base/port.cc

Issue 1803063004: Reset the BWE when the network changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Removed changes in call dir and leave that in a separate CL. Created 4 years, 8 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/p2p/base/port.h ('k') | webrtc/p2p/base/transportchannel.h » ('j') | 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 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 806 }
807 807
808 Connection::~Connection() { 808 Connection::~Connection() {
809 } 809 }
810 810
811 const Candidate& Connection::local_candidate() const { 811 const Candidate& Connection::local_candidate() const {
812 ASSERT(local_candidate_index_ < port_->Candidates().size()); 812 ASSERT(local_candidate_index_ < port_->Candidates().size());
813 return port_->Candidates()[local_candidate_index_]; 813 return port_->Candidates()[local_candidate_index_];
814 } 814 }
815 815
816 const Candidate& Connection::remote_candidate() const {
817 return remote_candidate_;
818 }
819
816 uint64_t Connection::priority() const { 820 uint64_t Connection::priority() const {
817 uint64_t priority = 0; 821 uint64_t priority = 0;
818 // RFC 5245 - 5.7.2. Computing Pair Priority and Ordering Pairs 822 // RFC 5245 - 5.7.2. Computing Pair Priority and Ordering Pairs
819 // Let G be the priority for the candidate provided by the controlling 823 // Let G be the priority for the candidate provided by the controlling
820 // agent. Let D be the priority for the candidate provided by the 824 // agent. Let D be the priority for the candidate provided by the
821 // controlled agent. 825 // controlled agent.
822 // pair priority = 2^32*MIN(G,D) + 2*MAX(G,D) + (G>D?1:0) 826 // pair priority = 2^32*MIN(G,D) + 2*MAX(G,D) + (G>D?1:0)
823 IceRole role = port_->GetIceRole(); 827 IceRole role = port_->GetIceRole();
824 if (role != ICEROLE_UNKNOWN) { 828 if (role != ICEROLE_UNKNOWN) {
825 uint32_t g = 0; 829 uint32_t g = 0;
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 ASSERT(sent < 0); 1440 ASSERT(sent < 0);
1437 error_ = port_->GetError(); 1441 error_ = port_->GetError();
1438 sent_packets_discarded_++; 1442 sent_packets_discarded_++;
1439 } else { 1443 } else {
1440 send_rate_tracker_.AddSamples(sent); 1444 send_rate_tracker_.AddSamples(sent);
1441 } 1445 }
1442 return sent; 1446 return sent;
1443 } 1447 }
1444 1448
1445 } // namespace cricket 1449 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port.h ('k') | webrtc/p2p/base/transportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698