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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 void SetCsrcs(const std::vector<uint32_t>& csrcs); | 151 void SetCsrcs(const std::vector<uint32_t>& csrcs); |
152 | 152 |
153 void SetTargetBitrate(unsigned int target_bitrate); | 153 void SetTargetBitrate(unsigned int target_bitrate); |
154 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); | 154 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); |
155 | 155 |
156 private: | 156 private: |
157 class RtcpContext; | 157 class RtcpContext; |
158 | 158 |
159 // Determine which RTCP messages should be sent and setup flags. | 159 // Determine which RTCP messages should be sent and setup flags. |
160 void PrepareReport(const std::set<RTCPPacketType>& packetTypes, | 160 void PrepareReport(const FeedbackState& feedback_state) |
161 const FeedbackState& feedback_state) | |
162 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 161 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
163 | 162 |
164 bool AddReportBlock(const FeedbackState& feedback_state, | 163 bool AddReportBlock(const FeedbackState& feedback_state, |
165 uint32_t ssrc, | 164 uint32_t ssrc, |
166 StreamStatistician* statistician) | 165 StreamStatistician* statistician) |
167 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 166 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
168 | 167 |
169 rtc::scoped_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context) | 168 rtc::scoped_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context) |
170 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 169 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
171 rtc::scoped_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context) | 170 rtc::scoped_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 298 |
300 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( | 299 typedef rtc::scoped_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( |
301 const RtcpContext&); | 300 const RtcpContext&); |
302 std::map<RTCPPacketType, BuilderFunc> builders_; | 301 std::map<RTCPPacketType, BuilderFunc> builders_; |
303 | 302 |
304 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); | 303 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); |
305 }; | 304 }; |
306 } // namespace webrtc | 305 } // namespace webrtc |
307 | 306 |
308 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ | 307 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
OLD | NEW |