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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 const uint8_t* payload_data, | 53 const uint8_t* payload_data, |
54 size_t payload_size, | 54 size_t payload_size, |
55 const RTPFragmentationHeader* fragmentation, | 55 const RTPFragmentationHeader* fragmentation, |
56 const RTPVideoHeader* video_header); | 56 const RTPVideoHeader* video_header); |
57 | 57 |
58 int32_t SendRTPIntraRequest(); | 58 int32_t SendRTPIntraRequest(); |
59 | 59 |
60 void SetVideoCodecType(RtpVideoCodecTypes type); | 60 void SetVideoCodecType(RtpVideoCodecTypes type); |
61 | 61 |
62 // FEC | 62 // FEC |
63 void SetGenericFECStatus(bool enable, | 63 void SetUlpfecConfig(bool enabled, |
64 uint8_t payload_type_red, | 64 int red_payload_type, |
65 uint8_t payload_type_fec); | 65 int ulpfec_payload_type); |
66 | 66 |
67 void GenericFECStatus(bool* enable, | 67 void UlpfecConfig(bool* enabled, |
stefan-webrtc
2016/10/31 09:33:16
Perhaps GetUlpfecConfig
brandtr
2016/10/31 12:47:03
Done.
| |
68 uint8_t* payload_type_red, | 68 int* red_payload_type, |
69 uint8_t* payload_type_fec) const; | 69 int* ulpfec_payload_type) const; |
70 | 70 |
71 void SetFecParameters(const FecProtectionParams* delta_params, | 71 void SetFecParameters(const FecProtectionParams* delta_params, |
72 const FecProtectionParams* key_params); | 72 const FecProtectionParams* key_params); |
73 | 73 |
74 uint32_t VideoBitrateSent() const; | 74 uint32_t VideoBitrateSent() const; |
75 uint32_t FecOverheadRate() const; | 75 uint32_t FecOverheadRate() const; |
76 | 76 |
77 int SelectiveRetransmissions() const; | 77 int SelectiveRetransmissions() const; |
78 void SetSelectiveRetransmissions(uint8_t settings); | 78 void SetSelectiveRetransmissions(uint8_t settings); |
79 | 79 |
(...skipping 11 matching lines...) Expand all Loading... | |
91 // Should never be held when calling out of this class. | 91 // Should never be held when calling out of this class. |
92 rtc::CriticalSection crit_; | 92 rtc::CriticalSection crit_; |
93 rtc::SequencedTaskChecker encoder_checker_; | 93 rtc::SequencedTaskChecker encoder_checker_; |
94 | 94 |
95 RtpVideoCodecTypes video_type_ = kRtpVideoGeneric; | 95 RtpVideoCodecTypes video_type_ = kRtpVideoGeneric; |
96 int32_t retransmission_settings_ GUARDED_BY(crit_) = kRetransmitBaseLayer; | 96 int32_t retransmission_settings_ GUARDED_BY(crit_) = kRetransmitBaseLayer; |
97 VideoRotation last_rotation_ GUARDED_BY(encoder_checker_) = kVideoRotation_0; | 97 VideoRotation last_rotation_ GUARDED_BY(encoder_checker_) = kVideoRotation_0; |
98 | 98 |
99 // FEC | 99 // FEC |
100 bool fec_enabled_ GUARDED_BY(crit_) = false; | 100 bool fec_enabled_ GUARDED_BY(crit_) = false; |
101 int8_t red_payload_type_ GUARDED_BY(crit_) = 0; | 101 int red_payload_type_ GUARDED_BY(crit_) = -1; |
102 int8_t fec_payload_type_ GUARDED_BY(crit_) = 0; | 102 int fec_payload_type_ GUARDED_BY(crit_) = -1; |
stefan-webrtc
2016/10/31 09:33:16
I'd prefer moving these initializations to the ini
brandtr
2016/10/31 12:47:03
Done!
This was originally my plan, but then I saw
danilchap
2016/10/31 13:22:00
just curious, what are benefits of initializer lis
stefan-webrtc
2016/11/03 13:52:25
We discussed this a lot at some point, and I think
| |
103 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ | 103 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ |
104 0, 1, kFecMaskRandom}; | 104 0, 1, kFecMaskRandom}; |
105 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ | 105 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ |
106 0, 1, kFecMaskRandom}; | 106 0, 1, kFecMaskRandom}; |
107 ProducerFec producer_fec_ GUARDED_BY(crit_); | 107 ProducerFec producer_fec_ GUARDED_BY(crit_); |
108 | 108 |
109 rtc::CriticalSection stats_crit_; | 109 rtc::CriticalSection stats_crit_; |
110 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets | 110 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets |
111 // and any padding overhead. | 111 // and any padding overhead. |
112 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); | 112 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); |
113 // Bitrate used for video payload and RTP headers. | 113 // Bitrate used for video payload and RTP headers. |
114 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); | 114 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); |
115 OneTimeEvent first_frame_sent_; | 115 OneTimeEvent first_frame_sent_; |
116 }; | 116 }; |
117 | 117 |
118 } // namespace webrtc | 118 } // namespace webrtc |
119 | 119 |
120 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ | 120 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ |
OLD | NEW |