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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <set> | 15 #include <set> |
16 #include <sstream> | 16 #include <sstream> |
17 #include <string> | 17 #include <string> |
18 #include <vector> | 18 #include <vector> |
19 | 19 |
| 20 #include "webrtc/base/random.h" |
20 #include "webrtc/base/scoped_ptr.h" | 21 #include "webrtc/base/scoped_ptr.h" |
21 #include "webrtc/base/thread_annotations.h" | 22 #include "webrtc/base/thread_annotations.h" |
22 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" | 23 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" |
23 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" | 24 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" |
24 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 25 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
26 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" | 27 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet.h" |
27 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" | 28 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" |
28 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 29 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
29 #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h" | 30 #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h" |
(...skipping 165 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> BuildReceiverReferenceTime( | 197 rtc::scoped_ptr<rtcp::RtcpPacket> BuildReceiverReferenceTime( |
197 const RtcpContext& context) | 198 const RtcpContext& context) |
198 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 199 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
199 rtc::scoped_ptr<rtcp::RtcpPacket> BuildDlrr(const RtcpContext& context) | 200 rtc::scoped_ptr<rtcp::RtcpPacket> BuildDlrr(const RtcpContext& context) |
200 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 201 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
201 | 202 |
202 private: | 203 private: |
203 const bool audio_; | 204 const bool audio_; |
204 Clock* const clock_; | 205 Clock* const clock_; |
| 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 |
207 Transport* const transport_; | 209 Transport* const transport_; |
208 | 210 |
209 rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtcp_sender_; | 211 rtc::scoped_ptr<CriticalSectionWrapper> critical_section_rtcp_sender_; |
210 bool using_nack_ GUARDED_BY(critical_section_rtcp_sender_); | 212 bool using_nack_ GUARDED_BY(critical_section_rtcp_sender_); |
211 bool sending_ GUARDED_BY(critical_section_rtcp_sender_); | 213 bool sending_ GUARDED_BY(critical_section_rtcp_sender_); |
212 bool remb_enabled_ GUARDED_BY(critical_section_rtcp_sender_); | 214 bool remb_enabled_ GUARDED_BY(critical_section_rtcp_sender_); |
213 | 215 |
214 int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_); | 216 int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 296 |
295 std::set<ReportFlag> report_flags_ GUARDED_BY(critical_section_rtcp_sender_); | 297 std::set<ReportFlag> report_flags_ GUARDED_BY(critical_section_rtcp_sender_); |
296 | 298 |
297 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( | 299 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( |
298 const RtcpContext&); | 300 const RtcpContext&); |
299 std::map<RTCPPacketType, BuilderFunc> builders_; | 301 std::map<RTCPPacketType, BuilderFunc> builders_; |
300 }; | 302 }; |
301 } // namespace webrtc | 303 } // namespace webrtc |
302 | 304 |
303 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ | 305 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
OLD | NEW |