OLD | NEW |
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 242 |
243 void RTPSenderVideo::GetUlpfecConfig(int* red_payload_type, | 243 void RTPSenderVideo::GetUlpfecConfig(int* red_payload_type, |
244 int* ulpfec_payload_type) const { | 244 int* ulpfec_payload_type) const { |
245 rtc::CritScope cs(&crit_); | 245 rtc::CritScope cs(&crit_); |
246 *red_payload_type = red_payload_type_; | 246 *red_payload_type = red_payload_type_; |
247 *ulpfec_payload_type = ulpfec_payload_type_; | 247 *ulpfec_payload_type = ulpfec_payload_type_; |
248 } | 248 } |
249 | 249 |
250 size_t RTPSenderVideo::CalculateFecPacketOverhead() const { | 250 size_t RTPSenderVideo::CalculateFecPacketOverhead() const { |
251 if (flexfec_enabled()) | 251 if (flexfec_enabled()) |
252 return flexfec_sender_->MaxPacketOverhead(); | 252 return flexfec_sender_->MaxPacketOverhead(RTPSender::FecExtensionSizes()); |
253 | 253 |
254 size_t overhead = 0; | 254 size_t overhead = 0; |
255 if (red_enabled()) { | 255 if (red_enabled()) { |
256 // The RED overhead is due to a small header. | 256 // The RED overhead is due to a small header. |
257 overhead += kRedForFecHeaderLength; | 257 overhead += kRedForFecHeaderLength; |
258 } | 258 } |
259 if (ulpfec_enabled()) { | 259 if (ulpfec_enabled()) { |
260 // For ULPFEC, the overhead is the FEC headers plus RED for FEC header | 260 // For ULPFEC, the overhead is the FEC headers plus RED for FEC header |
261 // (see above) plus anything in RTP header beyond the 12 bytes base header | 261 // (see above) plus anything in RTP header beyond the 12 bytes base header |
262 // (CSRC list, extensions...) | 262 // (CSRC list, extensions...) |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 rtc::CritScope cs(&crit_); | 423 rtc::CritScope cs(&crit_); |
424 return retransmission_settings_; | 424 return retransmission_settings_; |
425 } | 425 } |
426 | 426 |
427 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { | 427 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { |
428 rtc::CritScope cs(&crit_); | 428 rtc::CritScope cs(&crit_); |
429 retransmission_settings_ = settings; | 429 retransmission_settings_ = settings; |
430 } | 430 } |
431 | 431 |
432 } // namespace webrtc | 432 } // namespace webrtc |
OLD | NEW |