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

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

Issue 2036083002: DCHECK that the red payload type doesn't have invalid values when FEC is enabled. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 << next_fec_sequence_number; 162 << next_fec_sequence_number;
163 } 163 }
164 delete fec_packet; 164 delete fec_packet;
165 ++next_fec_sequence_number; 165 ++next_fec_sequence_number;
166 } 166 }
167 } 167 }
168 168
169 void RTPSenderVideo::SetGenericFECStatus(const bool enable, 169 void RTPSenderVideo::SetGenericFECStatus(const bool enable,
170 const uint8_t payloadTypeRED, 170 const uint8_t payloadTypeRED,
171 const uint8_t payloadTypeFEC) { 171 const uint8_t payloadTypeFEC) {
172 RTC_DCHECK(!enable || payloadTypeRED > 0);
172 rtc::CritScope cs(&crit_); 173 rtc::CritScope cs(&crit_);
173 fec_enabled_ = enable; 174 fec_enabled_ = enable;
174 red_payload_type_ = payloadTypeRED; 175 red_payload_type_ = payloadTypeRED;
175 fec_payload_type_ = payloadTypeFEC; 176 fec_payload_type_ = payloadTypeFEC;
176 memset(&delta_fec_params_, 0, sizeof(delta_fec_params_)); 177 memset(&delta_fec_params_, 0, sizeof(delta_fec_params_));
177 memset(&key_fec_params_, 0, sizeof(key_fec_params_)); 178 memset(&key_fec_params_, 0, sizeof(key_fec_params_));
178 delta_fec_params_.max_fec_frames = key_fec_params_.max_fec_frames = 1; 179 delta_fec_params_.max_fec_frames = key_fec_params_.max_fec_frames = 1;
179 delta_fec_params_.fec_mask_type = key_fec_params_.fec_mask_type = 180 delta_fec_params_.fec_mask_type = key_fec_params_.fec_mask_type =
180 kFecMaskRandom; 181 kFecMaskRandom;
181 } 182 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 rtc::CritScope cs(&crit_); 353 rtc::CritScope cs(&crit_);
353 return _retransmissionSettings; 354 return _retransmissionSettings;
354 } 355 }
355 356
356 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { 357 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) {
357 rtc::CritScope cs(&crit_); 358 rtc::CritScope cs(&crit_);
358 _retransmissionSettings = settings; 359 _retransmissionSettings = settings;
359 } 360 }
360 361
361 } // namespace webrtc 362 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698