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

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

Issue 2260803002: Generalize FEC header formatting. (pt. 4) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 << "Invalid max payload length: " << max_payload_length; 335 << "Invalid max payload length: " << max_payload_length;
336 rtc::CritScope lock(&send_critsect_); 336 rtc::CritScope lock(&send_critsect_);
337 max_payload_length_ = max_payload_length; 337 max_payload_length_ = max_payload_length;
338 } 338 }
339 339
340 size_t RTPSender::MaxDataPayloadLength() const { 340 size_t RTPSender::MaxDataPayloadLength() const {
341 if (audio_configured_) { 341 if (audio_configured_) {
342 return max_payload_length_ - RtpHeaderLength(); 342 return max_payload_length_ - RtpHeaderLength();
343 } else { 343 } else {
344 return max_payload_length_ - RtpHeaderLength() // RTP overhead. 344 return max_payload_length_ - RtpHeaderLength() // RTP overhead.
345 - video_->FECPacketOverhead() // FEC/ULP/RED overhead. 345 - video_->FecPacketOverhead() // FEC/ULP/RED overhead.
danilchap 2016/08/22 13:00:41 Non-functional renames, adding/removing empty line
brandtr 2016/08/23 08:19:11 Done, see https://codereview.webrtc.org/2275443002
346 - (RtxStatus() ? kRtxHeaderSize : 0); // RTX overhead. 346 - (RtxStatus() ? kRtxHeaderSize : 0); // RTX overhead.
347 } 347 }
348 } 348 }
349 349
350 size_t RTPSender::MaxPayloadLength() const { 350 size_t RTPSender::MaxPayloadLength() const {
351 return max_payload_length_; 351 return max_payload_length_;
352 } 352 }
353 353
354 void RTPSender::SetRtxStatus(int mode) { 354 void RTPSender::SetRtxStatus(int mode) {
355 rtc::CritScope lock(&send_critsect_); 355 rtc::CritScope lock(&send_critsect_);
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 rtc::CritScope lock(&send_critsect_); 1722 rtc::CritScope lock(&send_critsect_);
1723 1723
1724 RtpState state; 1724 RtpState state;
1725 state.sequence_number = sequence_number_rtx_; 1725 state.sequence_number = sequence_number_rtx_;
1726 state.start_timestamp = timestamp_offset_; 1726 state.start_timestamp = timestamp_offset_;
1727 1727
1728 return state; 1728 return state;
1729 } 1729 }
1730 1730
1731 } // namespace webrtc 1731 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698