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

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

Issue 2314743002: Centralize deactivation of Unequal Protection. (Closed)
Patch Set: Fix fuzzer here too. Created 4 years, 2 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
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 video_type, max_data_payload_length, 266 video_type, max_data_payload_length,
267 video_header ? &(video_header->codecHeader) : nullptr, frame_type)); 267 video_header ? &(video_header->codecHeader) : nullptr, frame_type));
268 268
269 StorageType storage; 269 StorageType storage;
270 int red_payload_type; 270 int red_payload_type;
271 bool first_frame = first_frame_sent_(); 271 bool first_frame = first_frame_sent_();
272 { 272 {
273 rtc::CritScope cs(&crit_); 273 rtc::CritScope cs(&crit_);
274 FecProtectionParams* fec_params = 274 FecProtectionParams* fec_params =
275 frame_type == kVideoFrameKey ? &key_fec_params_ : &delta_fec_params_; 275 frame_type == kVideoFrameKey ? &key_fec_params_ : &delta_fec_params_;
276 // We currently do not use unequal protection in the FEC. 276 producer_fec_.SetFecParameters(fec_params);
277 // This is signalled both here (by setting the number of important
278 // packets to zero), as well as in ProducerFec::AddRtpPacketAndGenerateFec.
279 constexpr int kNumImportantPackets = 0;
280 producer_fec_.SetFecParameters(fec_params, kNumImportantPackets);
281 storage = packetizer->GetStorageType(retransmission_settings_); 277 storage = packetizer->GetStorageType(retransmission_settings_);
282 red_payload_type = red_payload_type_; 278 red_payload_type = red_payload_type_;
283 } 279 }
284 280
285 // TODO(changbin): we currently don't support to configure the codec to 281 // TODO(changbin): we currently don't support to configure the codec to
286 // output multiple partitions for VP8. Should remove below check after the 282 // output multiple partitions for VP8. Should remove below check after the
287 // issue is fixed. 283 // issue is fixed.
288 const RTPFragmentationHeader* frag = 284 const RTPFragmentationHeader* frag =
289 (video_type == kRtpVideoVp8) ? NULL : fragmentation; 285 (video_type == kRtpVideoVp8) ? NULL : fragmentation;
290 286
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 rtc::CritScope cs(&crit_); 341 rtc::CritScope cs(&crit_);
346 return retransmission_settings_; 342 return retransmission_settings_;
347 } 343 }
348 344
349 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { 345 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) {
350 rtc::CritScope cs(&crit_); 346 rtc::CritScope cs(&crit_);
351 retransmission_settings_ = settings; 347 retransmission_settings_ = settings;
352 } 348 }
353 349
354 } // namespace webrtc 350 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/producer_fec_unittest.cc ('k') | webrtc/test/fuzzers/producer_fec_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698