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

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

Issue 2373053002: Move RTCPHelp::RTCPReceiveInformation inside RTCPReceiver (Closed)
Patch Set: Created 4 years, 2 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // Returns true if we haven't received an RTCP RR for several RTCP 94 // Returns true if we haven't received an RTCP RR for several RTCP
95 // intervals, but only triggers true once. 95 // intervals, but only triggers true once.
96 bool RtcpRrTimeout(int64_t rtcp_interval_ms); 96 bool RtcpRrTimeout(int64_t rtcp_interval_ms);
97 97
98 // Returns true if we haven't received an RTCP RR telling the receive side 98 // Returns true if we haven't received an RTCP RR telling the receive side
99 // has not received RTP packets for too long, i.e. extended highest sequence 99 // has not received RTP packets for too long, i.e. extended highest sequence
100 // number hasn't increased for several RTCP intervals. The function only 100 // number hasn't increased for several RTCP intervals. The function only
101 // returns true once until a new RR is received. 101 // returns true once until a new RR is received.
102 bool RtcpRrSequenceNumberTimeout(int64_t rtcp_interval_ms); 102 bool RtcpRrSequenceNumberTimeout(int64_t rtcp_interval_ms);
103 103
104 std::vector<rtcp::TmmbItem> TmmbrReceived() const; 104 std::vector<rtcp::TmmbItem> TmmbrReceived();
105 105
106 bool UpdateRTCPReceiveInformationTimers(); 106 bool UpdateRTCPReceiveInformationTimers();
107 107
108 std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner); 108 std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner);
109 109
110 void UpdateTmmbr(); 110 void UpdateTmmbr();
111 111
112 void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback); 112 void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback);
113 RtcpStatisticsCallback* GetRtcpStatisticsCallback(); 113 RtcpStatisticsCallback* GetRtcpStatisticsCallback();
114 114
115 private: 115 private:
116 struct PacketInformation; 116 struct PacketInformation;
117 using ReceivedInfoMap = std::map<uint32_t, RTCPHelp::RTCPReceiveInformation*>; 117 struct ReceiveInformation;
118 // Mapped by remote ssrc.
119 using ReceivedInfoMap = std::map<uint32_t, ReceiveInformation>;
118 // RTCP report block information mapped by remote SSRC. 120 // RTCP report block information mapped by remote SSRC.
119 using ReportBlockInfoMap = 121 using ReportBlockInfoMap =
120 std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*>; 122 std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*>;
121 // RTCP report block information map mapped by source SSRC. 123 // RTCP report block information map mapped by source SSRC.
122 using ReportBlockMap = std::map<uint32_t, ReportBlockInfoMap>; 124 using ReportBlockMap = std::map<uint32_t, ReportBlockInfoMap>;
123 125
124 bool ParseCompoundPacket(const uint8_t* packet_begin, 126 bool ParseCompoundPacket(const uint8_t* packet_begin,
125 const uint8_t* packet_end, 127 const uint8_t* packet_end,
126 PacketInformation* packet_information); 128 PacketInformation* packet_information);
127 129
128 void TriggerCallbacksFromRTCPPacket( 130 void TriggerCallbacksFromRTCPPacket(
129 const PacketInformation& packet_information); 131 const PacketInformation& packet_information);
130 132
131 RTCPHelp::RTCPReceiveInformation* CreateReceiveInformation( 133 void CreateReceiveInformation(uint32_t remote_ssrc)
132 uint32_t remoteSSRC); 134 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver);
133 RTCPHelp::RTCPReceiveInformation* GetReceiveInformation(uint32_t remoteSSRC); 135 ReceiveInformation* GetReceiveInformation(uint32_t remote_ssrc)
136 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver);
134 137
135 void HandleSenderReport(const rtcp::CommonHeader& rtcp_block, 138 void HandleSenderReport(const rtcp::CommonHeader& rtcp_block,
136 PacketInformation* packet_information) 139 PacketInformation* packet_information)
137 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); 140 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver);
138 141
139 void HandleReceiverReport(const rtcp::CommonHeader& rtcp_block, 142 void HandleReceiverReport(const rtcp::CommonHeader& rtcp_block,
140 PacketInformation* packet_information) 143 PacketInformation* packet_information)
141 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); 144 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver);
142 145
143 void HandleReportBlock(const rtcp::ReportBlock& report_block, 146 void HandleReportBlock(const rtcp::ReportBlock& report_block,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Time when the report was received. 240 // Time when the report was received.
238 uint32_t _lastReceivedXRNTPsecs; 241 uint32_t _lastReceivedXRNTPsecs;
239 uint32_t _lastReceivedXRNTPfrac; 242 uint32_t _lastReceivedXRNTPfrac;
240 // Estimated rtt, zero when there is no valid estimate. 243 // Estimated rtt, zero when there is no valid estimate.
241 bool xr_rrtr_status_ GUARDED_BY(_criticalSectionRTCPReceiver); 244 bool xr_rrtr_status_ GUARDED_BY(_criticalSectionRTCPReceiver);
242 int64_t xr_rr_rtt_ms_; 245 int64_t xr_rr_rtt_ms_;
243 246
244 // Received report blocks. 247 // Received report blocks.
245 ReportBlockMap _receivedReportBlockMap 248 ReportBlockMap _receivedReportBlockMap
246 GUARDED_BY(_criticalSectionRTCPReceiver); 249 GUARDED_BY(_criticalSectionRTCPReceiver);
247 ReceivedInfoMap _receivedInfoMap; 250 ReceivedInfoMap received_infos_ GUARDED_BY(_criticalSectionRTCPReceiver);
248 std::map<uint32_t, std::string> received_cnames_ 251 std::map<uint32_t, std::string> received_cnames_
249 GUARDED_BY(_criticalSectionRTCPReceiver); 252 GUARDED_BY(_criticalSectionRTCPReceiver);
250 253
251 // The last time we received an RTCP RR. 254 // The last time we received an RTCP RR.
252 int64_t _lastReceivedRrMs; 255 int64_t _lastReceivedRrMs;
253 256
254 // The time we last received an RTCP RR telling we have successfully 257 // The time we last received an RTCP RR telling we have successfully
255 // delivered RTP packet to the remote side. 258 // delivered RTP packet to the remote side.
256 int64_t _lastIncreasedSequenceNumberMs; 259 int64_t _lastIncreasedSequenceNumberMs;
257 260
258 RtcpStatisticsCallback* stats_callback_ GUARDED_BY(_criticalSectionFeedbacks); 261 RtcpStatisticsCallback* stats_callback_ GUARDED_BY(_criticalSectionFeedbacks);
259 262
260 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; 263 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_;
261 RtcpPacketTypeCounter packet_type_counter_; 264 RtcpPacketTypeCounter packet_type_counter_;
262 265
263 RTCPUtility::NackStats nack_stats_; 266 RTCPUtility::NackStats nack_stats_;
264 267
265 size_t num_skipped_packets_; 268 size_t num_skipped_packets_;
266 int64_t last_skipped_packets_warning_; 269 int64_t last_skipped_packets_warning_;
267 }; 270 };
268 } // namespace webrtc 271 } // namespace webrtc
269 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ 272 #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') | webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698