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

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

Issue 2484143002: Wire up FlexfecSender in RTPSender and add unit tests. (Closed)
Patch Set: Rebase. 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_video.h ('k') | 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 26 matching lines...) Expand all
37 RtpPacketToSend* red_packet) { 37 RtpPacketToSend* red_packet) {
38 uint8_t* red_payload = red_packet->AllocatePayload( 38 uint8_t* red_payload = red_packet->AllocatePayload(
39 kRedForFecHeaderLength + media_packet.payload_size()); 39 kRedForFecHeaderLength + media_packet.payload_size());
40 RTC_DCHECK(red_payload); 40 RTC_DCHECK(red_payload);
41 red_payload[0] = media_packet.PayloadType(); 41 red_payload[0] = media_packet.PayloadType();
42 memcpy(&red_payload[kRedForFecHeaderLength], media_packet.payload(), 42 memcpy(&red_payload[kRedForFecHeaderLength], media_packet.payload(),
43 media_packet.payload_size()); 43 media_packet.payload_size());
44 } 44 }
45 } // namespace 45 } // namespace
46 46
47 RTPSenderVideo::RTPSenderVideo(Clock* clock, RTPSender* rtp_sender) 47 RTPSenderVideo::RTPSenderVideo(Clock* clock,
48 RTPSender* rtp_sender,
49 FlexfecSender* flexfec_sender)
48 : rtp_sender_(rtp_sender), 50 : rtp_sender_(rtp_sender),
49 clock_(clock), 51 clock_(clock),
50 video_type_(kRtpVideoGeneric), 52 video_type_(kRtpVideoGeneric),
51 retransmission_settings_(kRetransmitBaseLayer), 53 retransmission_settings_(kRetransmitBaseLayer),
52 last_rotation_(kVideoRotation_0), 54 last_rotation_(kVideoRotation_0),
53 red_payload_type_(-1), 55 red_payload_type_(-1),
54 ulpfec_payload_type_(-1), 56 ulpfec_payload_type_(-1),
55 flexfec_sender_(nullptr), // TODO(brandtr): Wire up in future CL. 57 flexfec_sender_(flexfec_sender),
56 delta_fec_params_{0, 1, kFecMaskRandom}, 58 delta_fec_params_{0, 1, kFecMaskRandom},
57 key_fec_params_{0, 1, kFecMaskRandom}, 59 key_fec_params_{0, 1, kFecMaskRandom},
58 fec_bitrate_(1000, RateStatistics::kBpsScale), 60 fec_bitrate_(1000, RateStatistics::kBpsScale),
59 video_bitrate_(1000, RateStatistics::kBpsScale) { 61 video_bitrate_(1000, RateStatistics::kBpsScale) {
60 encoder_checker_.Detach(); 62 encoder_checker_.Detach();
61 } 63 }
62 64
63 RTPSenderVideo::~RTPSenderVideo() {} 65 RTPSenderVideo::~RTPSenderVideo() {}
64 66
65 void RTPSenderVideo::SetVideoCodecType(RtpVideoCodecTypes video_type) { 67 void RTPSenderVideo::SetVideoCodecType(RtpVideoCodecTypes video_type) {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 rtc::CritScope cs(&crit_); 412 rtc::CritScope cs(&crit_);
411 return retransmission_settings_; 413 return retransmission_settings_;
412 } 414 }
413 415
414 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { 416 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) {
415 rtc::CritScope cs(&crit_); 417 rtc::CritScope cs(&crit_);
416 retransmission_settings_ = settings; 418 retransmission_settings_ = settings;
417 } 419 }
418 420
419 } // namespace webrtc 421 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_video.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698