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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 RtcpReceiveTimeInfo last_xr_rr; | 72 RtcpReceiveTimeInfo last_xr_rr; |
73 | 73 |
74 // Used when generating TMMBR. | 74 // Used when generating TMMBR. |
75 ModuleRtpRtcpImpl* module; | 75 ModuleRtpRtcpImpl* module; |
76 }; | 76 }; |
77 | 77 |
78 RTCPSender(bool audio, | 78 RTCPSender(bool audio, |
79 Clock* clock, | 79 Clock* clock, |
80 ReceiveStatistics* receive_statistics, | 80 ReceiveStatistics* receive_statistics, |
81 RtcpPacketTypeCounterObserver* packet_type_counter_observer, | 81 RtcpPacketTypeCounterObserver* packet_type_counter_observer, |
82 RtcEventLog* event_log, | |
83 Transport* outgoing_transport); | 82 Transport* outgoing_transport); |
84 virtual ~RTCPSender(); | 83 virtual ~RTCPSender(); |
85 | 84 |
86 RtcpMode Status() const; | 85 RtcpMode Status() const; |
87 void SetRTCPStatus(RtcpMode method); | 86 void SetRTCPStatus(RtcpMode method); |
88 | 87 |
89 bool Sending() const; | 88 bool Sending() const; |
90 int32_t SetSendingStatus(const FeedbackState& feedback_state, | 89 int32_t SetSendingStatus(const FeedbackState& feedback_state, |
91 bool enabled); // combine the functions | 90 bool enabled); // combine the functions |
92 | 91 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 | 141 |
143 void SendRtcpXrReceiverReferenceTime(bool enable); | 142 void SendRtcpXrReceiverReferenceTime(bool enable); |
144 | 143 |
145 bool RtcpXrReceiverReferenceTime() const; | 144 bool RtcpXrReceiverReferenceTime() const; |
146 | 145 |
147 void SetCsrcs(const std::vector<uint32_t>& csrcs); | 146 void SetCsrcs(const std::vector<uint32_t>& csrcs); |
148 | 147 |
149 void SetTargetBitrate(unsigned int target_bitrate); | 148 void SetTargetBitrate(unsigned int target_bitrate); |
150 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); | 149 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); |
151 | 150 |
151 void SetRtcEventLog(RtcEventLog* event_log); | |
152 | |
152 private: | 153 private: |
153 class RtcpContext; | 154 class RtcpContext; |
154 | 155 |
155 // Determine which RTCP messages should be sent and setup flags. | 156 // Determine which RTCP messages should be sent and setup flags. |
156 void PrepareReport(const std::set<RTCPPacketType>& packetTypes, | 157 void PrepareReport(const std::set<RTCPPacketType>& packetTypes, |
157 const FeedbackState& feedback_state) | 158 const FeedbackState& feedback_state) |
158 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 159 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
159 | 160 |
160 bool AddReportBlock(const FeedbackState& feedback_state, | 161 bool AddReportBlock(const FeedbackState& feedback_state, |
161 uint32_t ssrc, | 162 uint32_t ssrc, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
195 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 196 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
196 rtc::scoped_ptr<rtcp::RtcpPacket> BuildDlrr(const RtcpContext& context) | 197 rtc::scoped_ptr<rtcp::RtcpPacket> BuildDlrr(const RtcpContext& context) |
197 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 198 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
198 | 199 |
199 private: | 200 private: |
200 const bool audio_; | 201 const bool audio_; |
201 Clock* const clock_; | 202 Clock* const clock_; |
202 Random random_ GUARDED_BY(critical_section_rtcp_sender_); | 203 Random random_ GUARDED_BY(critical_section_rtcp_sender_); |
203 RtcpMode method_ GUARDED_BY(critical_section_rtcp_sender_); | 204 RtcpMode method_ GUARDED_BY(critical_section_rtcp_sender_); |
204 | 205 |
205 RtcEventLog* const event_log_; | 206 rtc::scoped_ptr<CriticalSectionWrapper> event_log_crit_; |
207 RtcEventLog* event_log_ GUARDED_BY(event_log_crit_); | |
the sun
2016/03/03 09:25:13
Can you use critical_section_rtcp_sender_ instead?
stefan-webrtc
2016/03/03 10:08:25
Or set it in the constructor and make it const?
ivoc
2016/03/10 13:15:36
This is changed into a pointer to the proxy object
| |
206 Transport* const transport_; | 208 Transport* const transport_; |
207 | 209 |
208 rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtcp_sender_; | 210 rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtcp_sender_; |
209 bool using_nack_ GUARDED_BY(critical_section_rtcp_sender_); | 211 bool using_nack_ GUARDED_BY(critical_section_rtcp_sender_); |
210 bool sending_ GUARDED_BY(critical_section_rtcp_sender_); | 212 bool sending_ GUARDED_BY(critical_section_rtcp_sender_); |
211 bool remb_enabled_ GUARDED_BY(critical_section_rtcp_sender_); | 213 bool remb_enabled_ GUARDED_BY(critical_section_rtcp_sender_); |
212 | 214 |
213 int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_); | 215 int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_); |
214 | 216 |
215 uint32_t start_timestamp_ GUARDED_BY(critical_section_rtcp_sender_); | 217 uint32_t start_timestamp_ GUARDED_BY(critical_section_rtcp_sender_); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 | 286 |
285 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( | 287 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( |
286 const RtcpContext&); | 288 const RtcpContext&); |
287 std::map<RTCPPacketType, BuilderFunc> builders_; | 289 std::map<RTCPPacketType, BuilderFunc> builders_; |
288 | 290 |
289 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); | 291 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); |
290 }; | 292 }; |
291 } // namespace webrtc | 293 } // namespace webrtc |
292 | 294 |
293 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ | 295 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
OLD | NEW |