Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender.h

Issue 2981163003: Refactor rtcp statistics: Rtcp module take narrow interface (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 bool has_last_xr_rr; 71 bool has_last_xr_rr;
72 rtcp::ReceiveTimeInfo last_xr_rr; 72 rtcp::ReceiveTimeInfo last_xr_rr;
73 73
74 // Used when generating TMMBR. 74 // Used when generating TMMBR.
75 ModuleRtpRtcpImpl* module; 75 ModuleRtpRtcpImpl* module;
76 }; 76 };
77 77
78 RTCPSender(bool audio, 78 RTCPSender(bool audio,
79 Clock* clock, 79 Clock* clock,
80 ReceiveStatistics* receive_statistics, 80 ReceiveStatisticsReporter* receive_statistics,
81 RtcpPacketTypeCounterObserver* packet_type_counter_observer, 81 RtcpPacketTypeCounterObserver* packet_type_counter_observer,
82 RtcEventLog* event_log, 82 RtcEventLog* event_log,
83 Transport* outgoing_transport); 83 Transport* outgoing_transport);
84 virtual ~RTCPSender(); 84 virtual ~RTCPSender();
85 85
86 RtcpMode Status() const; 86 RtcpMode Status() const;
87 void SetRTCPStatus(RtcpMode method); 87 void SetRTCPStatus(RtcpMode method);
88 88
89 bool Sending() const; 89 bool Sending() const;
90 int32_t SetSendingStatus(const FeedbackState& feedback_state, 90 int32_t SetSendingStatus(const FeedbackState& feedback_state,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void SetVideoBitrateAllocation(const BitrateAllocation& bitrate); 150 void SetVideoBitrateAllocation(const BitrateAllocation& bitrate);
151 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet); 151 bool SendFeedbackPacket(const rtcp::TransportFeedback& packet);
152 152
153 private: 153 private:
154 class RtcpContext; 154 class RtcpContext;
155 155
156 // Determine which RTCP messages should be sent and setup flags. 156 // Determine which RTCP messages should be sent and setup flags.
157 void PrepareReport(const FeedbackState& feedback_state) 157 void PrepareReport(const FeedbackState& feedback_state)
158 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 158 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
159 159
160 bool AddReportBlock(const FeedbackState& feedback_state,
161 uint32_t ssrc,
162 StreamStatistician* statistician)
163 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
164
165 std::unique_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context) 160 std::unique_ptr<rtcp::RtcpPacket> BuildSR(const RtcpContext& context)
166 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 161 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
167 std::unique_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context) 162 std::unique_ptr<rtcp::RtcpPacket> BuildRR(const RtcpContext& context)
168 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 163 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
169 std::unique_ptr<rtcp::RtcpPacket> BuildSDES(const RtcpContext& context) 164 std::unique_ptr<rtcp::RtcpPacket> BuildSDES(const RtcpContext& context)
170 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 165 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
171 std::unique_ptr<rtcp::RtcpPacket> BuildPLI(const RtcpContext& context) 166 std::unique_ptr<rtcp::RtcpPacket> BuildPLI(const RtcpContext& context)
172 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 167 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
173 std::unique_ptr<rtcp::RtcpPacket> BuildREMB(const RtcpContext& context) 168 std::unique_ptr<rtcp::RtcpPacket> BuildREMB(const RtcpContext& context)
174 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_); 169 EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);
(...skipping 30 matching lines...) Expand all
205 int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_); 200 int64_t next_time_to_send_rtcp_ GUARDED_BY(critical_section_rtcp_sender_);
206 201
207 uint32_t timestamp_offset_ GUARDED_BY(critical_section_rtcp_sender_); 202 uint32_t timestamp_offset_ GUARDED_BY(critical_section_rtcp_sender_);
208 uint32_t last_rtp_timestamp_ GUARDED_BY(critical_section_rtcp_sender_); 203 uint32_t last_rtp_timestamp_ GUARDED_BY(critical_section_rtcp_sender_);
209 int64_t last_frame_capture_time_ms_ GUARDED_BY(critical_section_rtcp_sender_); 204 int64_t last_frame_capture_time_ms_ GUARDED_BY(critical_section_rtcp_sender_);
210 uint32_t ssrc_ GUARDED_BY(critical_section_rtcp_sender_); 205 uint32_t ssrc_ GUARDED_BY(critical_section_rtcp_sender_);
211 // SSRC that we receive on our RTP channel 206 // SSRC that we receive on our RTP channel
212 uint32_t remote_ssrc_ GUARDED_BY(critical_section_rtcp_sender_); 207 uint32_t remote_ssrc_ GUARDED_BY(critical_section_rtcp_sender_);
213 std::string cname_ GUARDED_BY(critical_section_rtcp_sender_); 208 std::string cname_ GUARDED_BY(critical_section_rtcp_sender_);
214 209
215 ReceiveStatistics* receive_statistics_ 210 ReceiveStatisticsReporter* receive_statistics_
216 GUARDED_BY(critical_section_rtcp_sender_); 211 GUARDED_BY(critical_section_rtcp_sender_);
217 std::map<uint32_t, rtcp::ReportBlock> report_blocks_ 212 std::vector<rtcp::ReportBlock> report_blocks_
218 GUARDED_BY(critical_section_rtcp_sender_); 213 GUARDED_BY(critical_section_rtcp_sender_);
219 std::map<uint32_t, std::string> csrc_cnames_ 214 std::map<uint32_t, std::string> csrc_cnames_
220 GUARDED_BY(critical_section_rtcp_sender_); 215 GUARDED_BY(critical_section_rtcp_sender_);
221 216
222 // send CSRCs 217 // send CSRCs
223 std::vector<uint32_t> csrcs_ GUARDED_BY(critical_section_rtcp_sender_); 218 std::vector<uint32_t> csrcs_ GUARDED_BY(critical_section_rtcp_sender_);
224 219
225 // Full intra request 220 // Full intra request
226 uint8_t sequence_number_fir_ GUARDED_BY(critical_section_rtcp_sender_); 221 uint8_t sequence_number_fir_ GUARDED_BY(critical_section_rtcp_sender_);
227 222
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 typedef std::unique_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)( 278 typedef std::unique_ptr<rtcp::RtcpPacket> (RTCPSender::*BuilderFunc)(
284 const RtcpContext&); 279 const RtcpContext&);
285 // Map from RTCPPacketType to builder. 280 // Map from RTCPPacketType to builder.
286 std::map<uint32_t, BuilderFunc> builders_; 281 std::map<uint32_t, BuilderFunc> builders_;
287 282
288 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender); 283 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTCPSender);
289 }; 284 };
290 } // namespace webrtc 285 } // namespace webrtc
291 286
292 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ 287 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698