OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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_PACING_PACKET_ROUTER_H_ | 11 #ifndef WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ |
12 #define WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ | 12 #define WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ |
13 | 13 |
14 #include <list> | 14 #include <list> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/base/constructormagic.h" |
18 #include "webrtc/base/criticalsection.h" | 18 #include "webrtc/base/criticalsection.h" |
19 #include "webrtc/base/thread_annotations.h" | 19 #include "webrtc/base/thread_annotations.h" |
20 #include "webrtc/base/thread_checker.h" | 20 #include "webrtc/base/race_checker.h" |
21 #include "webrtc/common_types.h" | 21 #include "webrtc/common_types.h" |
22 #include "webrtc/modules/pacing/paced_sender.h" | 22 #include "webrtc/modules/pacing/paced_sender.h" |
23 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" | 23 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" |
24 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 24 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 | 27 |
28 class RtpRtcp; | 28 class RtpRtcp; |
29 namespace rtcp { | 29 namespace rtcp { |
30 class TransportFeedback; | 30 class TransportFeedback; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 uint32_t bitrate_bps) override; | 77 uint32_t bitrate_bps) override; |
78 | 78 |
79 // Send REMB feedback. | 79 // Send REMB feedback. |
80 virtual bool SendRemb(uint32_t bitrate_bps, | 80 virtual bool SendRemb(uint32_t bitrate_bps, |
81 const std::vector<uint32_t>& ssrcs); | 81 const std::vector<uint32_t>& ssrcs); |
82 | 82 |
83 // Send transport feedback packet to send-side. | 83 // Send transport feedback packet to send-side. |
84 virtual bool SendTransportFeedback(rtcp::TransportFeedback* packet); | 84 virtual bool SendTransportFeedback(rtcp::TransportFeedback* packet); |
85 | 85 |
86 private: | 86 private: |
87 rtc::ThreadChecker pacer_thread_checker_; | 87 rtc::RaceChecker race_checker_; |
88 rtc::CriticalSection modules_crit_; | 88 rtc::CriticalSection modules_crit_; |
89 std::list<RtpRtcp*> rtp_send_modules_ GUARDED_BY(modules_crit_); | 89 std::list<RtpRtcp*> rtp_send_modules_ GUARDED_BY(modules_crit_); |
90 std::vector<RtpRtcp*> rtp_receive_modules_ GUARDED_BY(modules_crit_); | 90 std::vector<RtpRtcp*> rtp_receive_modules_ GUARDED_BY(modules_crit_); |
91 | 91 |
92 rtc::CriticalSection remb_crit_; | 92 rtc::CriticalSection remb_crit_; |
93 // The last time a REMB was sent. | 93 // The last time a REMB was sent. |
94 int64_t last_remb_time_ms_ GUARDED_BY(remb_crit_); | 94 int64_t last_remb_time_ms_ GUARDED_BY(remb_crit_); |
95 uint32_t last_send_bitrate_bps_ GUARDED_BY(remb_crit_); | 95 uint32_t last_send_bitrate_bps_ GUARDED_BY(remb_crit_); |
96 // The last bitrate update. | 96 // The last bitrate update. |
97 uint32_t bitrate_bps_ GUARDED_BY(remb_crit_); | 97 uint32_t bitrate_bps_ GUARDED_BY(remb_crit_); |
98 | 98 |
99 volatile int transport_seq_; | 99 volatile int transport_seq_; |
100 | 100 |
101 RTC_DISALLOW_COPY_AND_ASSIGN(PacketRouter); | 101 RTC_DISALLOW_COPY_AND_ASSIGN(PacketRouter); |
102 }; | 102 }; |
103 } // namespace webrtc | 103 } // namespace webrtc |
104 #endif // WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ | 104 #endif // WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ |
OLD | NEW |