Chromium Code Reviews| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 uint16_t length); | 143 uint16_t length); |
| 144 int32_t SetRTCPVoIPMetrics(const RTCPVoIPMetric* VoIPMetric); | 144 int32_t SetRTCPVoIPMetrics(const RTCPVoIPMetric* VoIPMetric); |
| 145 | 145 |
| 146 void SendRtcpXrReceiverReferenceTime(bool enable); | 146 void SendRtcpXrReceiverReferenceTime(bool enable); |
| 147 | 147 |
| 148 bool RtcpXrReceiverReferenceTime() const; | 148 bool RtcpXrReceiverReferenceTime() const; |
| 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 void SetVideoBitrateAllocation(const BitrateAllocation& bitrate); | |
| 153 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); | 154 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); |
| 154 | 155 |
| 155 private: | 156 private: |
| 156 class RtcpContext; | 157 class RtcpContext; |
| 157 | 158 |
| 158 // Determine which RTCP messages should be sent and setup flags. | 159 // Determine which RTCP messages should be sent and setup flags. |
| 159 void PrepareReport(const FeedbackState& feedback_state) | 160 void PrepareReport(const FeedbackState& feedback_state) |
| 160 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 161 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 161 | 162 |
| 162 bool AddReportBlock(const FeedbackState& feedback_state, | 163 bool AddReportBlock(const FeedbackState& feedback_state, |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 190 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 191 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 191 std::unique_ptr<rtcp::RtcpPacket> BuildRPSI(const RtcpContext& context) | 192 std::unique_ptr<rtcp::RtcpPacket> BuildRPSI(const RtcpContext& context) |
| 192 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 193 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 193 std::unique_ptr<rtcp::RtcpPacket> BuildNACK(const RtcpContext& context) | 194 std::unique_ptr<rtcp::RtcpPacket> BuildNACK(const RtcpContext& context) |
| 194 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 195 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 195 std::unique_ptr<rtcp::RtcpPacket> BuildReceiverReferenceTime( | 196 std::unique_ptr<rtcp::RtcpPacket> BuildReceiverReferenceTime( |
| 196 const RtcpContext& context) | 197 const RtcpContext& context) |
| 197 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 198 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 198 std::unique_ptr<rtcp::RtcpPacket> BuildDlrr(const RtcpContext& context) | 199 std::unique_ptr<rtcp::RtcpPacket> BuildDlrr(const RtcpContext& context) |
| 199 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 200 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 201 std::unique_ptr<rtcp::RtcpPacket> BuildTargetBitrate( | |
| 202 const RtcpContext& context) | |
| 203 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | |
| 200 | 204 |
| 201 private: | 205 private: |
| 202 const bool audio_; | 206 const bool audio_; |
| 203 Clock* const clock_; | 207 Clock* const clock_; |
| 204 Random random_ GUARDED_BY(critical_section_rtcp_sender_); | 208 Random random_ GUARDED_BY(critical_section_rtcp_sender_); |
| 205 RtcpMode method_ GUARDED_BY(critical_section_rtcp_sender_); | 209 RtcpMode method_ GUARDED_BY(critical_section_rtcp_sender_); |
| 206 | 210 |
| 207 RtcEventLog* const event_log_; | 211 RtcEventLog* const event_log_; |
| 208 Transport* const transport_; | 212 Transport* const transport_; |
| 209 | 213 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 | 262 |
| 259 // XR VoIP metric | 263 // XR VoIP metric |
| 260 RTCPVoIPMetric xr_voip_metric_ GUARDED_BY(critical_section_rtcp_sender_); | 264 RTCPVoIPMetric xr_voip_metric_ GUARDED_BY(critical_section_rtcp_sender_); |
| 261 | 265 |
| 262 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; | 266 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; |
| 263 RtcpPacketTypeCounter packet_type_counter_ | 267 RtcpPacketTypeCounter packet_type_counter_ |
| 264 GUARDED_BY(critical_section_rtcp_sender_); | 268 GUARDED_BY(critical_section_rtcp_sender_); |
| 265 | 269 |
| 266 RTCPUtility::NackStats nack_stats_ GUARDED_BY(critical_section_rtcp_sender_); | 270 RTCPUtility::NackStats nack_stats_ GUARDED_BY(critical_section_rtcp_sender_); |
| 267 | 271 |
| 272 rtc::Optional<BitrateAllocation> video_bitrate_allocation_ | |
|
danilchap
2016/11/29 10:39:31
#include "webrtc/base/optional.h"
sprang_webrtc
2016/11/29 12:24:01
Done.
| |
| 273 GUARDED_BY(critical_section_rtcp_sender_); | |
| 274 | |
| 268 void SetFlag(RTCPPacketType type, bool is_volatile) | 275 void SetFlag(RTCPPacketType type, bool is_volatile) |
| 269 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 276 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 270 void SetFlags(const std::set<RTCPPacketType>& types, bool is_volatile) | 277 void SetFlags(const std::set<RTCPPacketType>& types, bool is_volatile) |
| 271 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 278 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 272 bool IsFlagPresent(RTCPPacketType type) const | 279 bool IsFlagPresent(RTCPPacketType type) const |
| 273 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 280 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 274 bool ConsumeFlag(RTCPPacketType type, bool forced = false) | 281 bool ConsumeFlag(RTCPPacketType type, bool forced = false) |
| 275 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 282 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| 276 bool AllVolatileFlagsConsumed() const | 283 bool AllVolatileFlagsConsumed() const |
| 277 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); | 284 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 288 | 295 |
| 289 typedef std::unique_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( | 296 typedef std::unique_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( |
| 290 const RtcpContext&); | 297 const RtcpContext&); |
| 291 std::map<RTCPPacketType, BuilderFunc> builders_; | 298 std::map<RTCPPacketType, BuilderFunc> builders_; |
| 292 | 299 |
| 293 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); | 300 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); |
| 294 }; | 301 }; |
| 295 } // namespace webrtc | 302 } // namespace webrtc |
| 296 | 303 |
| 297 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ | 304 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
| OLD | NEW |