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 18 matching lines...) Expand all Loading... |
29 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" | 29 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" |
30 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 30 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
31 #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h" | 31 #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h" |
32 #include "webrtc/transport.h" | 32 #include "webrtc/transport.h" |
33 #include "webrtc/typedefs.h" | 33 #include "webrtc/typedefs.h" |
34 | 34 |
35 namespace webrtc { | 35 namespace webrtc { |
36 | 36 |
37 class ModuleRtpRtcpImpl; | 37 class ModuleRtpRtcpImpl; |
38 class RTCPReceiver; | 38 class RTCPReceiver; |
| 39 class RtcEventLog; |
39 | 40 |
40 class NACKStringBuilder { | 41 class NACKStringBuilder { |
41 public: | 42 public: |
42 NACKStringBuilder(); | 43 NACKStringBuilder(); |
43 ~NACKStringBuilder(); | 44 ~NACKStringBuilder(); |
44 | 45 |
45 void PushNACK(uint16_t nack); | 46 void PushNACK(uint16_t nack); |
46 std::string GetResult(); | 47 std::string GetResult(); |
47 | 48 |
48 private: | 49 private: |
(...skipping 22 matching lines...) Expand all Loading... |
71 RtcpReceiveTimeInfo last_xr_rr; | 72 RtcpReceiveTimeInfo last_xr_rr; |
72 | 73 |
73 // Used when generating TMMBR. | 74 // Used when generating TMMBR. |
74 ModuleRtpRtcpImpl* module; | 75 ModuleRtpRtcpImpl* module; |
75 }; | 76 }; |
76 | 77 |
77 RTCPSender(bool audio, | 78 RTCPSender(bool audio, |
78 Clock* clock, | 79 Clock* clock, |
79 ReceiveStatistics* receive_statistics, | 80 ReceiveStatistics* receive_statistics, |
80 RtcpPacketTypeCounterObserver* packet_type_counter_observer, | 81 RtcpPacketTypeCounterObserver* packet_type_counter_observer, |
| 82 RtcEventLog* event_log, |
81 Transport* outgoing_transport); | 83 Transport* outgoing_transport); |
82 virtual ~RTCPSender(); | 84 virtual ~RTCPSender(); |
83 | 85 |
84 RtcpMode Status() const; | 86 RtcpMode Status() const; |
85 void SetRTCPStatus(RtcpMode method); | 87 void SetRTCPStatus(RtcpMode method); |
86 | 88 |
87 bool Sending() const; | 89 bool Sending() const; |
88 int32_t SetSendingStatus(const FeedbackState& feedback_state, | 90 int32_t SetSendingStatus(const FeedbackState& feedback_state, |
89 bool enabled); // combine the functions | 91 bool enabled); // combine the functions |
90 | 92 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 199 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
198 rtc::scoped_ptr<rtcp::RtcpPacket> BuildDlrr(const RtcpContext& context) | 200 rtc::scoped_ptr<rtcp::RtcpPacket> BuildDlrr(const RtcpContext& context) |
199 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 201 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
200 | 202 |
201 private: | 203 private: |
202 const bool audio_; | 204 const bool audio_; |
203 Clock* const clock_; | 205 Clock* const clock_; |
204 Random random_ GUARDED_BY(critical_section_rtcp_sender_); | 206 Random random_ GUARDED_BY(critical_section_rtcp_sender_); |
205 RtcpMode method_ GUARDED_BY(critical_section_rtcp_sender_); | 207 RtcpMode method_ GUARDED_BY(critical_section_rtcp_sender_); |
206 | 208 |
| 209 RtcEventLog* const event_log_; |
207 Transport* const transport_; | 210 Transport* const transport_; |
208 | 211 |
209 rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtcp_sender_; | 212 rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtcp_sender_; |
210 bool using_nack_ GUARDED_BY(critical_section_rtcp_sender_); | 213 bool using_nack_ GUARDED_BY(critical_section_rtcp_sender_); |
211 bool sending_ GUARDED_BY(critical_section_rtcp_sender_); | 214 bool sending_ GUARDED_BY(critical_section_rtcp_sender_); |
212 bool remb_enabled_ GUARDED_BY(critical_section_rtcp_sender_); | 215 bool remb_enabled_ GUARDED_BY(critical_section_rtcp_sender_); |
213 | 216 |
214 int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_); | 217 int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_); |
215 | 218 |
216 uint32_t start_timestamp_ GUARDED_BY(critical_section_rtcp_sender_); | 219 uint32_t start_timestamp_ GUARDED_BY(critical_section_rtcp_sender_); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 bool operator==(const ReportFlag& flag) const { return type == flag.type; } | 293 bool operator==(const ReportFlag& flag) const { return type == flag.type; } |
291 const RTCPPacketType type; | 294 const RTCPPacketType type; |
292 const bool is_volatile; | 295 const bool is_volatile; |
293 }; | 296 }; |
294 | 297 |
295 std::set<ReportFlag> report_flags_ GUARDED_BY(critical_section_rtcp_sender_); | 298 std::set<ReportFlag> report_flags_ GUARDED_BY(critical_section_rtcp_sender_); |
296 | 299 |
297 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( | 300 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( |
298 const RtcpContext&); | 301 const RtcpContext&); |
299 std::map<RTCPPacketType, BuilderFunc> builders_; | 302 std::map<RTCPPacketType, BuilderFunc> builders_; |
| 303 |
| 304 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); |
300 }; | 305 }; |
301 } // namespace webrtc | 306 } // namespace webrtc |
302 | 307 |
303 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ | 308 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
OLD | NEW |