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

Side by Side Diff: webrtc/modules/congestion_controller/congestion_controller.cc

Issue 2589743002: Make OverheadObserver::OnOverheadChanged count RTP headers only (Closed)
Patch Set: Add explicit cast. Created 3 years, 11 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 | « no previous file | webrtc/modules/congestion_controller/include/congestion_controller.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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 pacer_->Pause(); 299 pacer_->Pause();
300 } 300 }
301 { 301 {
302 rtc::CritScope cs(&critsect_); 302 rtc::CritScope cs(&critsect_);
303 network_state_ = state; 303 network_state_ = state;
304 } 304 }
305 probe_controller_->OnNetworkStateChanged(state); 305 probe_controller_->OnNetworkStateChanged(state);
306 MaybeTriggerOnNetworkChanged(); 306 MaybeTriggerOnNetworkChanged();
307 } 307 }
308 308
309 void CongestionController::SetTransportOverhead(
310 size_t transport_overhead_bytes_per_packet) {
311 transport_feedback_adapter_.SetTransportOverhead(
312 transport_overhead_bytes_per_packet);
313 }
314
309 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) { 315 void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) {
310 // We're not interested in packets without an id, which may be stun packets, 316 // We're not interested in packets without an id, which may be stun packets,
311 // etc, sent on the same transport. 317 // etc, sent on the same transport.
312 if (sent_packet.packet_id == -1) 318 if (sent_packet.packet_id == -1)
313 return; 319 return;
314 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id, 320 transport_feedback_adapter_.OnSentPacket(sent_packet.packet_id,
315 sent_packet.send_time_ms); 321 sent_packet.send_time_ms);
316 } 322 }
317 323
318 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { 324 void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 bool CongestionController::IsSendQueueFull() const { 387 bool CongestionController::IsSendQueueFull() const {
382 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; 388 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs;
383 } 389 }
384 390
385 bool CongestionController::IsNetworkDown() const { 391 bool CongestionController::IsNetworkDown() const {
386 rtc::CritScope cs(&critsect_); 392 rtc::CritScope cs(&critsect_);
387 return network_state_ == kNetworkDown; 393 return network_state_ == kNetworkDown;
388 } 394 }
389 395
390 } // namespace webrtc 396 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/include/congestion_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698