Chromium Code Reviews| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 const uint8_t* payload_data, | 52 const uint8_t* payload_data, |
| 53 size_t payload_size, | 53 size_t payload_size, |
| 54 const RTPFragmentationHeader* fragmentation, | 54 const RTPFragmentationHeader* fragmentation, |
| 55 const RTPVideoHeader* video_header); | 55 const RTPVideoHeader* video_header); |
| 56 | 56 |
| 57 int32_t SendRTPIntraRequest(); | 57 int32_t SendRTPIntraRequest(); |
| 58 | 58 |
| 59 void SetVideoCodecType(RtpVideoCodecTypes type); | 59 void SetVideoCodecType(RtpVideoCodecTypes type); |
| 60 | 60 |
| 61 // FEC | 61 // FEC |
| 62 void SetGenericFECStatus(bool enable, | 62 void SetUlpfecConfig(bool ulpfec_enabled, |
| 63 uint8_t payload_type_red, | 63 int red_payload_type, |
| 64 uint8_t payload_type_fec); | 64 int ulpfec_payload_type); |
| 65 | 65 |
| 66 void GenericFECStatus(bool* enable, | 66 void UlpfecConfig(bool* ulpfec_enabled, |
| 67 uint8_t* payload_type_red, | 67 int* red_payload_type, |
| 68 uint8_t* payload_type_fec) const; | 68 int* ulpfec_payload_type) const; |
| 69 | 69 |
| 70 void SetFecParameters(const FecProtectionParams* delta_params, | 70 void SetFecParameters(const FecProtectionParams* delta_params, |
| 71 const FecProtectionParams* key_params); | 71 const FecProtectionParams* key_params); |
| 72 | 72 |
| 73 uint32_t VideoBitrateSent() const; | 73 uint32_t VideoBitrateSent() const; |
| 74 uint32_t FecOverheadRate() const; | 74 uint32_t FecOverheadRate() const; |
| 75 | 75 |
| 76 int SelectiveRetransmissions() const; | 76 int SelectiveRetransmissions() const; |
| 77 void SetSelectiveRetransmissions(uint8_t settings); | 77 void SetSelectiveRetransmissions(uint8_t settings); |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 void SendVideoPacket(std::unique_ptr<RtpPacketToSend> packet, | 80 void SendVideoPacket(std::unique_ptr<RtpPacketToSend> packet, |
| 81 StorageType storage); | 81 StorageType storage); |
| 82 | 82 |
| 83 void SendVideoPacketAsRed(std::unique_ptr<RtpPacketToSend> media_packet, | 83 void SendVideoPacketAsRed(std::unique_ptr<RtpPacketToSend> media_packet, |
| 84 StorageType media_packet_storage, | 84 StorageType media_packet_storage, |
| 85 bool protect); | 85 bool protect); |
| 86 | 86 |
| 87 RTPSender* const rtp_sender_; | 87 RTPSender* const rtp_sender_; |
| 88 Clock* const clock_; | 88 Clock* const clock_; |
| 89 | 89 |
| 90 // Should never be held when calling out of this class. | 90 // Should never be held when calling out of this class. |
| 91 rtc::CriticalSection crit_; | 91 rtc::CriticalSection crit_; |
| 92 | 92 |
| 93 RtpVideoCodecTypes video_type_ = kRtpVideoGeneric; | 93 RtpVideoCodecTypes video_type_ = kRtpVideoGeneric; |
| 94 int32_t retransmission_settings_ GUARDED_BY(crit_) = kRetransmitBaseLayer; | 94 int32_t retransmission_settings_ GUARDED_BY(crit_) = kRetransmitBaseLayer; |
| 95 | 95 |
| 96 // FEC | 96 // FEC |
| 97 bool fec_enabled_ GUARDED_BY(crit_) = false; | 97 bool fec_enabled_ GUARDED_BY(crit_) = false; |
|
danilchap
2016/10/26 12:59:14
may be rename this variable to ulpfec_enabled_
brandtr
2016/10/26 13:57:04
This is happening in upcoming CL.
| |
| 98 int8_t red_payload_type_ GUARDED_BY(crit_) = 0; | 98 int red_payload_type_ GUARDED_BY(crit_) = -1; |
| 99 int8_t fec_payload_type_ GUARDED_BY(crit_) = 0; | 99 int fec_payload_type_ GUARDED_BY(crit_) = -1; |
| 100 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ | 100 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ |
| 101 0, 1, kFecMaskRandom}; | 101 0, 1, kFecMaskRandom}; |
| 102 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ | 102 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ |
| 103 0, 1, kFecMaskRandom}; | 103 0, 1, kFecMaskRandom}; |
| 104 ProducerFec producer_fec_ GUARDED_BY(crit_); | 104 ProducerFec producer_fec_ GUARDED_BY(crit_); |
| 105 | 105 |
| 106 rtc::CriticalSection stats_crit_; | 106 rtc::CriticalSection stats_crit_; |
| 107 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets | 107 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets |
| 108 // and any padding overhead. | 108 // and any padding overhead. |
| 109 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); | 109 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); |
| 110 // Bitrate used for video payload and RTP headers. | 110 // Bitrate used for video payload and RTP headers. |
| 111 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); | 111 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); |
| 112 OneTimeEvent first_frame_sent_; | 112 OneTimeEvent first_frame_sent_; |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace webrtc | 115 } // namespace webrtc |
| 116 | 116 |
| 117 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ | 117 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ |
| OLD | NEW |