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

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

Issue 2490523002: Wire up FlexfecSender in RTPSenderVideo. (Closed)
Patch Set: Feedback response 2. Created 4 years, 1 month 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 extension.id); 76 extension.id);
77 } else if (extension.uri == RtpExtension::kTimestampOffsetUri) { 77 } else if (extension.uri == RtpExtension::kTimestampOffsetUri) {
78 rtp_header_extension_map_.Register(kRtpExtensionTransmissionTimeOffset, 78 rtp_header_extension_map_.Register(kRtpExtensionTransmissionTimeOffset,
79 extension.id); 79 extension.id);
80 } else { 80 } else {
81 LOG(LS_WARNING) << "RTP header extension with id: " << extension.id 81 LOG(LS_WARNING) << "RTP header extension with id: " << extension.id
82 << ", uri: " << extension.uri 82 << ", uri: " << extension.uri
83 << ", is unsupported by FlexfecSender."; 83 << ", is unsupported by FlexfecSender.";
84 } 84 }
85 } 85 }
86
87 // Calculate RTP header length.
88 RtpPacketToSend rtp_header(&rtp_header_extension_map_);
89 rtp_header.ReserveExtension<AbsoluteSendTime>();
90 rtp_header.ReserveExtension<TransmissionOffset>();
91 rtp_header.ReserveExtension<TransportSequenceNumber>();
92 rtp_header_length_ = rtp_header.headers_size();
danilchap 2016/11/09 15:58:46 that should be simpler: rtp_extra_header_length_ =
brandtr 2016/11/10 09:32:01 Nice, done.
86 } 93 }
87 94
88 FlexfecSender::~FlexfecSender() = default; 95 FlexfecSender::~FlexfecSender() = default;
89 96
90 // We are reusing the implementation from UlpfecGenerator for SetFecParameters, 97 // We are reusing the implementation from UlpfecGenerator for SetFecParameters,
91 // AddRtpPacketAndGenerateFec, and FecAvailable. 98 // AddRtpPacketAndGenerateFec, and FecAvailable.
92 void FlexfecSender::SetFecParameters(const FecProtectionParams& params) { 99 void FlexfecSender::SetFecParameters(const FecProtectionParams& params) {
93 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); 100 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
94 ulpfec_generator_.SetFecParameters(params); 101 ulpfec_generator_.SetFecParameters(params);
95 } 102 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 163 }
157 164
158 return fec_packets_to_send; 165 return fec_packets_to_send;
159 } 166 }
160 167
161 size_t FlexfecSender::MaxPacketOverhead() const { 168 size_t FlexfecSender::MaxPacketOverhead() const {
162 return kFlexfecMaxHeaderSize; 169 return kFlexfecMaxHeaderSize;
163 } 170 }
164 171
165 } // namespace webrtc 172 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698