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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 2181383002: Add NACK rate throttling for audio channels. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 4 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
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 sequence_number_forced_(false), 120 sequence_number_forced_(false),
121 ssrc_forced_(false), 121 ssrc_forced_(false),
122 timestamp_(0), 122 timestamp_(0),
123 capture_time_ms_(0), 123 capture_time_ms_(0),
124 last_timestamp_time_ms_(0), 124 last_timestamp_time_ms_(0),
125 media_has_been_sent_(false), 125 media_has_been_sent_(false),
126 last_packet_marker_bit_(false), 126 last_packet_marker_bit_(false),
127 csrcs_(), 127 csrcs_(),
128 rtx_(kRtxOff), 128 rtx_(kRtxOff),
129 retransmission_rate_limiter_(retransmission_rate_limiter) { 129 retransmission_rate_limiter_(retransmission_rate_limiter) {
130 RTC_DCHECK(retransmission_rate_limiter_ != nullptr);
131
130 // We need to seed the random generator for BuildPaddingPacket() below. 132 // We need to seed the random generator for BuildPaddingPacket() below.
131 // TODO(holmer,tommi): Note that TimeInMilliseconds might return 0 on Mac 133 // TODO(holmer,tommi): Note that TimeInMilliseconds might return 0 on Mac
132 // early on in the process. 134 // early on in the process.
133 srand(static_cast<uint32_t>(clock_->TimeInMilliseconds())); 135 srand(static_cast<uint32_t>(clock_->TimeInMilliseconds()));
134 ssrc_ = ssrc_db_->CreateSSRC(); 136 ssrc_ = ssrc_db_->CreateSSRC();
135 RTC_DCHECK(ssrc_ != 0); 137 RTC_DCHECK(ssrc_ != 0);
136 ssrc_rtx_ = ssrc_db_->CreateSSRC(); 138 ssrc_rtx_ = ssrc_db_->CreateSSRC();
137 RTC_DCHECK(ssrc_rtx_ != 0); 139 RTC_DCHECK(ssrc_rtx_ != 0);
138 140
139 // Random start, 16 bits. Can't be 0. 141 // Random start, 16 bits. Can't be 0.
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 rtc::CritScope lock(&send_critsect_); 1889 rtc::CritScope lock(&send_critsect_);
1888 1890
1889 RtpState state; 1891 RtpState state;
1890 state.sequence_number = sequence_number_rtx_; 1892 state.sequence_number = sequence_number_rtx_;
1891 state.start_timestamp = start_timestamp_; 1893 state.start_timestamp = start_timestamp_;
1892 1894
1893 return state; 1895 return state;
1894 } 1896 }
1895 1897
1896 } // namespace webrtc 1898 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698