| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 void SetCsrcs(const std::vector<uint32_t>& csrcs); | 150 void SetCsrcs(const std::vector<uint32_t>& csrcs); |
| 151 | 151 |
| 152 void SetTargetBitrate(unsigned int target_bitrate); | 152 void SetTargetBitrate(unsigned int target_bitrate); |
| 153 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); | 153 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 class RtcpContext; | 156 class RtcpContext; |
| 157 | 157 |
| 158 // Determine which RTCP messages should be sent and setup flags. | 158 // Determine which RTCP messages should be sent and setup flags. |
| 159 void PrepareReport(const std::set<RTCPPacketType>& packetTypes, | 159 void PrepareReport(const FeedbackState& feedback_state) |
| 160 const FeedbackState& feedback_state) | |
| 161 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 160 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 162 | 161 |
| 163 bool AddReportBlock(const FeedbackState& feedback_state, | 162 bool AddReportBlock(const FeedbackState& feedback_state, |
| 164 uint32_t ssrc, | 163 uint32_t ssrc, |
| 165 StreamStatistician* statistician) | 164 StreamStatistician* statistician) |
| 166 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 165 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 167 | 166 |
| 168 std::unique_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context) | 167 std::unique_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context) |
| 169 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 168 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 170 std::unique_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context) | 169 std::unique_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context) |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 287 |
| 289 typedef std::unique_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( | 288 typedef std::unique_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( |
| 290 const RtcpContext&); | 289 const RtcpContext&); |
| 291 std::map<RTCPPacketType, BuilderFunc> builders_; | 290 std::map<RTCPPacketType, BuilderFunc> builders_; |
| 292 | 291 |
| 293 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); | 292 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); |
| 294 }; | 293 }; |
| 295 } // namespace webrtc | 294 } // namespace webrtc |
| 296 | 295 |
| 297 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ | 296 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
| OLD | NEW |