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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |