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

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

Issue 2455963003: Simplify SetFecParameters signature. (Closed)
Patch Set: Fix fuzzer. 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 } 85 }
86 } 86 }
87 87
88 FlexfecSender::~FlexfecSender() = default; 88 FlexfecSender::~FlexfecSender() = default;
89 89
90 // We are reusing the implementation from UlpfecGenerator for SetFecParameters, 90 // We are reusing the implementation from UlpfecGenerator for SetFecParameters,
91 // AddRtpPacketAndGenerateFec, and FecAvailable. 91 // AddRtpPacketAndGenerateFec, and FecAvailable.
92 void FlexfecSender::SetFecParameters(const FecProtectionParams& params) { 92 void FlexfecSender::SetFecParameters(const FecProtectionParams& params) {
93 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); 93 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
94 ulpfec_generator_.SetFecParameters(&params); 94 ulpfec_generator_.SetFecParameters(params);
95 } 95 }
96 96
97 bool FlexfecSender::AddRtpPacketAndGenerateFec( 97 bool FlexfecSender::AddRtpPacketAndGenerateFec(
98 const RtpPacketToSend& packet) { 98 const RtpPacketToSend& packet) {
99 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_); 99 RTC_DCHECK_CALLED_SEQUENTIALLY(&sequence_checker_);
100 // TODO(brandtr): Generalize this SSRC check when we support multistream 100 // TODO(brandtr): Generalize this SSRC check when we support multistream
101 // protection. 101 // protection.
102 RTC_DCHECK_EQ(packet.Ssrc(), protected_media_ssrc_); 102 RTC_DCHECK_EQ(packet.Ssrc(), protected_media_ssrc_);
103 return ulpfec_generator_.AddRtpPacketAndGenerateFec( 103 return ulpfec_generator_.AddRtpPacketAndGenerateFec(
104 packet.data(), packet.payload_size(), packet.headers_size()) == 0; 104 packet.data(), packet.payload_size(), packet.headers_size()) == 0;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 return fec_packets_to_send; 158 return fec_packets_to_send;
159 } 159 }
160 160
161 size_t FlexfecSender::MaxPacketOverhead() const { 161 size_t FlexfecSender::MaxPacketOverhead() const {
162 return kFlexfecMaxHeaderSize; 162 return kFlexfecMaxHeaderSize;
163 } 163 }
164 164
165 } // namespace webrtc 165 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698