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

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

Issue 2275443002: Minor fixes in FEC and RtpSender{,Video}. (pt. 2) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@header_reader_writer-pt1-move_copy_column
Patch Set: Created 4 years, 3 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.
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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 rtc::CritScope lock(&send_critsect_); 1714 rtc::CritScope lock(&send_critsect_);
1715 1715
1716 RtpState state; 1716 RtpState state;
1717 state.sequence_number = sequence_number_rtx_; 1717 state.sequence_number = sequence_number_rtx_;
1718 state.start_timestamp = timestamp_offset_; 1718 state.start_timestamp = timestamp_offset_;
1719 1719
1720 return state; 1720 return state;
1721 } 1721 }
1722 1722
1723 } // namespace webrtc 1723 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698