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

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

Issue 2707763004: Rename ReceiveInfo to TmmbrInfo (Closed)
Patch Set: +comment Created 3 years, 10 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
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // intervals, but only triggers true once. 98 // intervals, but only triggers true once.
99 bool RtcpRrTimeout(int64_t rtcp_interval_ms); 99 bool RtcpRrTimeout(int64_t rtcp_interval_ms);
100 100
101 // Returns true if we haven't received an RTCP RR telling the receive side 101 // Returns true if we haven't received an RTCP RR telling the receive side
102 // has not received RTP packets for too long, i.e. extended highest sequence 102 // has not received RTP packets for too long, i.e. extended highest sequence
103 // number hasn't increased for several RTCP intervals. The function only 103 // number hasn't increased for several RTCP intervals. The function only
104 // returns true once until a new RR is received. 104 // returns true once until a new RR is received.
105 bool RtcpRrSequenceNumberTimeout(int64_t rtcp_interval_ms); 105 bool RtcpRrSequenceNumberTimeout(int64_t rtcp_interval_ms);
106 106
107 std::vector<rtcp::TmmbItem> TmmbrReceived(); 107 std::vector<rtcp::TmmbItem> TmmbrReceived();
108 108 // Return true if new bandwidth should be set.
109 bool UpdateRTCPReceiveInformationTimers(); 109 bool UpdateTmmbrTimers();
110
111 std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner); 110 std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner);
112 111 // Set new bandwidth and notify remote clients about it.
113 void UpdateTmmbr(); 112 void NotifyTmmbrUpdated();
114 113
115 void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback); 114 void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback);
116 RtcpStatisticsCallback* GetRtcpStatisticsCallback(); 115 RtcpStatisticsCallback* GetRtcpStatisticsCallback();
117 116
118 private: 117 private:
119 struct PacketInformation; 118 struct PacketInformation;
120 struct ReceiveInformation; 119 struct TmmbrInformation;
121 struct ReportBlockWithRtt; 120 struct ReportBlockWithRtt;
122 struct LastFirStatus; 121 struct LastFirStatus;
123 // Mapped by remote ssrc.
124 using ReceivedInfoMap = std::map<uint32_t, ReceiveInformation>;
125 // RTCP report blocks mapped by remote SSRC. 122 // RTCP report blocks mapped by remote SSRC.
126 using ReportBlockInfoMap = std::map<uint32_t, ReportBlockWithRtt>; 123 using ReportBlockInfoMap = std::map<uint32_t, ReportBlockWithRtt>;
127 // RTCP report blocks map mapped by source SSRC. 124 // RTCP report blocks map mapped by source SSRC.
128 using ReportBlockMap = std::map<uint32_t, ReportBlockInfoMap>; 125 using ReportBlockMap = std::map<uint32_t, ReportBlockInfoMap>;
129 126
130 bool ParseCompoundPacket(const uint8_t* packet_begin, 127 bool ParseCompoundPacket(const uint8_t* packet_begin,
131 const uint8_t* packet_end, 128 const uint8_t* packet_end,
132 PacketInformation* packet_information); 129 PacketInformation* packet_information);
133 130
134 void TriggerCallbacksFromRtcpPacket( 131 void TriggerCallbacksFromRtcpPacket(
135 const PacketInformation& packet_information); 132 const PacketInformation& packet_information);
136 133
137 void CreateReceiveInformation(uint32_t remote_ssrc) 134 void CreateTmmbrInformation(uint32_t remote_ssrc)
138 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); 135 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_);
139 ReceiveInformation* GetReceiveInformation(uint32_t remote_ssrc) 136 TmmbrInformation* GetTmmbrInformation(uint32_t remote_ssrc)
140 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); 137 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_);
141 138
142 void HandleSenderReport(const rtcp::CommonHeader& rtcp_block, 139 void HandleSenderReport(const rtcp::CommonHeader& rtcp_block,
143 PacketInformation* packet_information) 140 PacketInformation* packet_information)
144 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); 141 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_);
145 142
146 void HandleReceiverReport(const rtcp::CommonHeader& rtcp_block, 143 void HandleReceiverReport(const rtcp::CommonHeader& rtcp_block,
147 PacketInformation* packet_information) 144 PacketInformation* packet_information)
148 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); 145 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_);
149 146
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 NtpTime last_received_sr_ntp_; 232 NtpTime last_received_sr_ntp_;
236 233
237 // Received XR receive time report. 234 // Received XR receive time report.
238 rtcp::ReceiveTimeInfo remote_time_info_; 235 rtcp::ReceiveTimeInfo remote_time_info_;
239 // Time when the report was received. 236 // Time when the report was received.
240 NtpTime last_received_xr_ntp_; 237 NtpTime last_received_xr_ntp_;
241 // Estimated rtt, zero when there is no valid estimate. 238 // Estimated rtt, zero when there is no valid estimate.
242 bool xr_rrtr_status_ GUARDED_BY(rtcp_receiver_lock_); 239 bool xr_rrtr_status_ GUARDED_BY(rtcp_receiver_lock_);
243 int64_t xr_rr_rtt_ms_; 240 int64_t xr_rr_rtt_ms_;
244 241
245 // Received report blocks. 242 int64_t oldest_tmmbr_info_ms_ GUARDED_BY(rtcp_receiver_lock_);
243 // Mapped by remote ssrc.
244 std::map<uint32_t, TmmbrInformation> tmmbr_infos_
245 GUARDED_BY(rtcp_receiver_lock_);
246
246 ReportBlockMap received_report_blocks_ GUARDED_BY(rtcp_receiver_lock_); 247 ReportBlockMap received_report_blocks_ GUARDED_BY(rtcp_receiver_lock_);
247 ReceivedInfoMap received_infos_ GUARDED_BY(rtcp_receiver_lock_);
248 int64_t oldest_received_info_ms_ GUARDED_BY(rtcp_receiver_lock_);
249 std::map<uint32_t, LastFirStatus> last_fir_ GUARDED_BY(rtcp_receiver_lock_); 248 std::map<uint32_t, LastFirStatus> last_fir_ GUARDED_BY(rtcp_receiver_lock_);
250 std::map<uint32_t, std::string> received_cnames_ 249 std::map<uint32_t, std::string> received_cnames_
251 GUARDED_BY(rtcp_receiver_lock_); 250 GUARDED_BY(rtcp_receiver_lock_);
252 251
253 // The last time we received an RTCP RR. 252 // The last time we received an RTCP RR.
254 int64_t last_received_rr_ms_ GUARDED_BY(rtcp_receiver_lock_); 253 int64_t last_received_rr_ms_ GUARDED_BY(rtcp_receiver_lock_);
255 254
256 // The time we last received an RTCP RR telling we have successfully 255 // The time we last received an RTCP RR telling we have successfully
257 // delivered RTP packet to the remote side. 256 // delivered RTP packet to the remote side.
258 int64_t last_increased_sequence_number_ms_; 257 int64_t last_increased_sequence_number_ms_;
259 258
260 RtcpStatisticsCallback* stats_callback_ GUARDED_BY(feedbacks_lock_); 259 RtcpStatisticsCallback* stats_callback_ GUARDED_BY(feedbacks_lock_);
261 260
262 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; 261 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_;
263 RtcpPacketTypeCounter packet_type_counter_; 262 RtcpPacketTypeCounter packet_type_counter_;
264 263
265 RtcpNackStats nack_stats_; 264 RtcpNackStats nack_stats_;
266 265
267 size_t num_skipped_packets_; 266 size_t num_skipped_packets_;
268 int64_t last_skipped_packets_warning_ms_; 267 int64_t last_skipped_packets_warning_ms_;
269 }; 268 };
270 } // namespace webrtc 269 } // namespace webrtc
271 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ 270 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698