| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 constexpr size_t kRedForFecHeaderLength = 1; | 34 constexpr size_t kRedForFecHeaderLength = 1; |
| 35 | 35 |
| 36 void BuildRedPayload(const RtpPacketToSend& media_packet, | 36 void BuildRedPayload(const RtpPacketToSend& media_packet, |
| 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 |
| 43 media_packet.payload_size()); | 43 auto media_payload = media_packet.payload(); |
| 44 memcpy(&red_payload[kRedForFecHeaderLength], media_payload.data(), |
| 45 media_payload.size()); |
| 44 } | 46 } |
| 45 } // namespace | 47 } // namespace |
| 46 | 48 |
| 47 RTPSenderVideo::RTPSenderVideo(Clock* clock, | 49 RTPSenderVideo::RTPSenderVideo(Clock* clock, |
| 48 RTPSender* rtp_sender, | 50 RTPSender* rtp_sender, |
| 49 FlexfecSender* flexfec_sender) | 51 FlexfecSender* flexfec_sender) |
| 50 : rtp_sender_(rtp_sender), | 52 : rtp_sender_(rtp_sender), |
| 51 clock_(clock), | 53 clock_(clock), |
| 52 video_type_(kRtpVideoGeneric), | 54 video_type_(kRtpVideoGeneric), |
| 53 retransmission_settings_(kRetransmitBaseLayer), | 55 retransmission_settings_(kRetransmitBaseLayer), |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 rtc::CritScope cs(&crit_); | 419 rtc::CritScope cs(&crit_); |
| 418 return retransmission_settings_; | 420 return retransmission_settings_; |
| 419 } | 421 } |
| 420 | 422 |
| 421 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { | 423 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { |
| 422 rtc::CritScope cs(&crit_); | 424 rtc::CritScope cs(&crit_); |
| 423 retransmission_settings_ = settings; | 425 retransmission_settings_ = settings; |
| 424 } | 426 } |
| 425 | 427 |
| 426 } // namespace webrtc | 428 } // namespace webrtc |
| OLD | NEW |