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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 fec_enabled_ = enable; | 183 fec_enabled_ = enable; |
184 red_payload_type_ = payloadTypeRED; | 184 red_payload_type_ = payloadTypeRED; |
185 fec_payload_type_ = payloadTypeFEC; | 185 fec_payload_type_ = payloadTypeFEC; |
186 memset(&delta_fec_params_, 0, sizeof(delta_fec_params_)); | 186 memset(&delta_fec_params_, 0, sizeof(delta_fec_params_)); |
187 memset(&key_fec_params_, 0, sizeof(key_fec_params_)); | 187 memset(&key_fec_params_, 0, sizeof(key_fec_params_)); |
188 delta_fec_params_.max_fec_frames = key_fec_params_.max_fec_frames = 1; | 188 delta_fec_params_.max_fec_frames = key_fec_params_.max_fec_frames = 1; |
189 delta_fec_params_.fec_mask_type = key_fec_params_.fec_mask_type = | 189 delta_fec_params_.fec_mask_type = key_fec_params_.fec_mask_type = |
190 kFecMaskRandom; | 190 kFecMaskRandom; |
191 } | 191 } |
192 | 192 |
193 void RTPSenderVideo::GenericFECStatus(bool& enable, | 193 void RTPSenderVideo::GenericFECStatus(bool* enable, |
194 uint8_t& payloadTypeRED, | 194 uint8_t* payloadTypeRED, |
195 uint8_t& payloadTypeFEC) const { | 195 uint8_t* payloadTypeFEC) const { |
196 CriticalSectionScoped cs(crit_.get()); | 196 CriticalSectionScoped cs(crit_.get()); |
197 enable = fec_enabled_; | 197 *enable = fec_enabled_; |
198 payloadTypeRED = red_payload_type_; | 198 *payloadTypeRED = red_payload_type_; |
199 payloadTypeFEC = fec_payload_type_; | 199 *payloadTypeFEC = fec_payload_type_; |
200 } | 200 } |
201 | 201 |
202 size_t RTPSenderVideo::FECPacketOverhead() const { | 202 size_t RTPSenderVideo::FECPacketOverhead() const { |
203 CriticalSectionScoped cs(crit_.get()); | 203 CriticalSectionScoped cs(crit_.get()); |
204 if (fec_enabled_) { | 204 if (fec_enabled_) { |
205 // Overhead is FEC headers plus RED for FEC header plus anything in RTP | 205 // Overhead is FEC headers plus RED for FEC header plus anything in RTP |
206 // header beyond the 12 bytes base header (CSRC list, extensions...) | 206 // header beyond the 12 bytes base header (CSRC list, extensions...) |
207 // This reason for the header extensions to be included here is that | 207 // This reason for the header extensions to be included here is that |
208 // from an FEC viewpoint, they are part of the payload to be protected. | 208 // from an FEC viewpoint, they are part of the payload to be protected. |
209 // (The base RTP header is already protected by the FEC header.) | 209 // (The base RTP header is already protected by the FEC header.) |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 CriticalSectionScoped cs(crit_.get()); | 350 CriticalSectionScoped cs(crit_.get()); |
351 return _retransmissionSettings; | 351 return _retransmissionSettings; |
352 } | 352 } |
353 | 353 |
354 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { | 354 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { |
355 CriticalSectionScoped cs(crit_.get()); | 355 CriticalSectionScoped cs(crit_.get()); |
356 _retransmissionSettings = settings; | 356 _retransmissionSettings = settings; |
357 } | 357 } |
358 | 358 |
359 } // namespace webrtc | 359 } // namespace webrtc |
OLD | NEW |