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 26 matching lines...) Expand all Loading... |
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 rtc::CritScope cs(&crit_); | 413 rtc::CritScope cs(&crit_); |
412 return retransmission_settings_; | 414 return retransmission_settings_; |
413 } | 415 } |
414 | 416 |
415 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { | 417 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { |
416 rtc::CritScope cs(&crit_); | 418 rtc::CritScope cs(&crit_); |
417 retransmission_settings_ = settings; | 419 retransmission_settings_ = settings; |
418 } | 420 } |
419 | 421 |
420 } // namespace webrtc | 422 } // namespace webrtc |
OLD | NEW |