| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 using ReportBlockMap = std::map<uint32_t, ReportBlockInfoMap>; | 123 using ReportBlockMap = std::map<uint32_t, ReportBlockInfoMap>; |
| 124 | 124 |
| 125 bool ParseCompoundPacket(const uint8_t* packet_begin, | 125 bool ParseCompoundPacket(const uint8_t* packet_begin, |
| 126 const uint8_t* packet_end, | 126 const uint8_t* packet_end, |
| 127 PacketInformation* packet_information); | 127 PacketInformation* packet_information); |
| 128 | 128 |
| 129 void TriggerCallbacksFromRtcpPacket( | 129 void TriggerCallbacksFromRtcpPacket( |
| 130 const PacketInformation& packet_information); | 130 const PacketInformation& packet_information); |
| 131 | 131 |
| 132 TmmbrInformation* FindOrCreateTmmbrInfo(uint32_t remote_ssrc) | 132 TmmbrInformation* FindOrCreateTmmbrInfo(uint32_t remote_ssrc) |
| 133 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 133 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 134 // Update TmmbrInformation (if present) is alive. | 134 // Update TmmbrInformation (if present) is alive. |
| 135 void UpdateTmmbrRemoteIsAlive(uint32_t remote_ssrc) | 135 void UpdateTmmbrRemoteIsAlive(uint32_t remote_ssrc) |
| 136 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 136 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 137 TmmbrInformation* GetTmmbrInformation(uint32_t remote_ssrc) | 137 TmmbrInformation* GetTmmbrInformation(uint32_t remote_ssrc) |
| 138 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 138 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 139 | 139 |
| 140 void HandleSenderReport(const rtcp::CommonHeader& rtcp_block, | 140 void HandleSenderReport(const rtcp::CommonHeader& rtcp_block, |
| 141 PacketInformation* packet_information) | 141 PacketInformation* packet_information) |
| 142 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 142 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 143 | 143 |
| 144 void HandleReceiverReport(const rtcp::CommonHeader& rtcp_block, | 144 void HandleReceiverReport(const rtcp::CommonHeader& rtcp_block, |
| 145 PacketInformation* packet_information) | 145 PacketInformation* packet_information) |
| 146 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 146 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 147 | 147 |
| 148 void HandleReportBlock(const rtcp::ReportBlock& report_block, | 148 void HandleReportBlock(const rtcp::ReportBlock& report_block, |
| 149 PacketInformation* packet_information, | 149 PacketInformation* packet_information, |
| 150 uint32_t remote_ssrc) | 150 uint32_t remote_ssrc) |
| 151 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 151 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 152 | 152 |
| 153 void HandleSdes(const rtcp::CommonHeader& rtcp_block, | 153 void HandleSdes(const rtcp::CommonHeader& rtcp_block, |
| 154 PacketInformation* packet_information) | 154 PacketInformation* packet_information) |
| 155 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 155 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 156 | 156 |
| 157 void HandleXr(const rtcp::CommonHeader& rtcp_block, | 157 void HandleXr(const rtcp::CommonHeader& rtcp_block, |
| 158 PacketInformation* packet_information) | 158 PacketInformation* packet_information) |
| 159 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 159 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 160 | 160 |
| 161 void HandleXrReceiveReferenceTime(uint32_t sender_ssrc, | 161 void HandleXrReceiveReferenceTime(uint32_t sender_ssrc, |
| 162 const rtcp::Rrtr& rrtr) | 162 const rtcp::Rrtr& rrtr) |
| 163 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 163 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 164 | 164 |
| 165 void HandleXrDlrrReportBlock(const rtcp::ReceiveTimeInfo& rti) | 165 void HandleXrDlrrReportBlock(const rtcp::ReceiveTimeInfo& rti) |
| 166 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 166 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 167 | 167 |
| 168 void HandleXrTargetBitrate(uint32_t ssrc, | 168 void HandleXrTargetBitrate(uint32_t ssrc, |
| 169 const rtcp::TargetBitrate& target_bitrate, | 169 const rtcp::TargetBitrate& target_bitrate, |
| 170 PacketInformation* packet_information) | 170 PacketInformation* packet_information) |
| 171 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 171 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 172 | 172 |
| 173 void HandleNack(const rtcp::CommonHeader& rtcp_block, | 173 void HandleNack(const rtcp::CommonHeader& rtcp_block, |
| 174 PacketInformation* packet_information) | 174 PacketInformation* packet_information) |
| 175 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 175 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 176 | 176 |
| 177 void HandleBye(const rtcp::CommonHeader& rtcp_block) | 177 void HandleBye(const rtcp::CommonHeader& rtcp_block) |
| 178 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 178 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 179 | 179 |
| 180 void HandlePli(const rtcp::CommonHeader& rtcp_block, | 180 void HandlePli(const rtcp::CommonHeader& rtcp_block, |
| 181 PacketInformation* packet_information) | 181 PacketInformation* packet_information) |
| 182 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 182 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 183 | 183 |
| 184 void HandlePsfbApp(const rtcp::CommonHeader& rtcp_block, | 184 void HandlePsfbApp(const rtcp::CommonHeader& rtcp_block, |
| 185 PacketInformation* packet_information) | 185 PacketInformation* packet_information) |
| 186 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 186 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 187 | 187 |
| 188 void HandleTmmbr(const rtcp::CommonHeader& rtcp_block, | 188 void HandleTmmbr(const rtcp::CommonHeader& rtcp_block, |
| 189 PacketInformation* packet_information) | 189 PacketInformation* packet_information) |
| 190 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 190 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 191 | 191 |
| 192 void HandleTmmbn(const rtcp::CommonHeader& rtcp_block, | 192 void HandleTmmbn(const rtcp::CommonHeader& rtcp_block, |
| 193 PacketInformation* packet_information) | 193 PacketInformation* packet_information) |
| 194 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 194 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 195 | 195 |
| 196 void HandleSrReq(const rtcp::CommonHeader& rtcp_block, | 196 void HandleSrReq(const rtcp::CommonHeader& rtcp_block, |
| 197 PacketInformation* packet_information) | 197 PacketInformation* packet_information) |
| 198 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 198 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 199 | 199 |
| 200 void HandleFir(const rtcp::CommonHeader& rtcp_block, | 200 void HandleFir(const rtcp::CommonHeader& rtcp_block, |
| 201 PacketInformation* packet_information) | 201 PacketInformation* packet_information) |
| 202 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 202 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 203 | 203 |
| 204 void HandleTransportFeedback(const rtcp::CommonHeader& rtcp_block, | 204 void HandleTransportFeedback(const rtcp::CommonHeader& rtcp_block, |
| 205 PacketInformation* packet_information) | 205 PacketInformation* packet_information) |
| 206 EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); | 206 RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_); |
| 207 | 207 |
| 208 Clock* const clock_; | 208 Clock* const clock_; |
| 209 const bool receiver_only_; | 209 const bool receiver_only_; |
| 210 ModuleRtpRtcp* const rtp_rtcp_; | 210 ModuleRtpRtcp* const rtp_rtcp_; |
| 211 | 211 |
| 212 rtc::CriticalSection feedbacks_lock_; | 212 rtc::CriticalSection feedbacks_lock_; |
| 213 RtcpBandwidthObserver* const rtcp_bandwidth_observer_; | 213 RtcpBandwidthObserver* const rtcp_bandwidth_observer_; |
| 214 RtcpIntraFrameObserver* const rtcp_intra_frame_observer_; | 214 RtcpIntraFrameObserver* const rtcp_intra_frame_observer_; |
| 215 TransportFeedbackObserver* const transport_feedback_observer_; | 215 TransportFeedbackObserver* const transport_feedback_observer_; |
| 216 VideoBitrateAllocationObserver* const bitrate_allocation_observer_; | 216 VideoBitrateAllocationObserver* const bitrate_allocation_observer_; |
| 217 | 217 |
| 218 rtc::CriticalSection rtcp_receiver_lock_; | 218 rtc::CriticalSection rtcp_receiver_lock_; |
| 219 uint32_t main_ssrc_ GUARDED_BY(rtcp_receiver_lock_); | 219 uint32_t main_ssrc_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 220 uint32_t remote_ssrc_ GUARDED_BY(rtcp_receiver_lock_); | 220 uint32_t remote_ssrc_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 221 std::set<uint32_t> registered_ssrcs_ GUARDED_BY(rtcp_receiver_lock_); | 221 std::set<uint32_t> registered_ssrcs_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 222 | 222 |
| 223 // Received sender report. | 223 // Received sender report. |
| 224 NtpTime remote_sender_ntp_time_ GUARDED_BY(rtcp_receiver_lock_); | 224 NtpTime remote_sender_ntp_time_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 225 uint32_t remote_sender_rtp_time_ GUARDED_BY(rtcp_receiver_lock_); | 225 uint32_t remote_sender_rtp_time_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 226 // When did we receive the last send report. | 226 // When did we receive the last send report. |
| 227 NtpTime last_received_sr_ntp_ GUARDED_BY(rtcp_receiver_lock_); | 227 NtpTime last_received_sr_ntp_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 228 | 228 |
| 229 // Received XR receive time report. | 229 // Received XR receive time report. |
| 230 rtcp::ReceiveTimeInfo remote_time_info_; | 230 rtcp::ReceiveTimeInfo remote_time_info_; |
| 231 // Time when the report was received. | 231 // Time when the report was received. |
| 232 NtpTime last_received_xr_ntp_; | 232 NtpTime last_received_xr_ntp_; |
| 233 // Estimated rtt, zero when there is no valid estimate. | 233 // Estimated rtt, zero when there is no valid estimate. |
| 234 bool xr_rrtr_status_ GUARDED_BY(rtcp_receiver_lock_); | 234 bool xr_rrtr_status_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 235 int64_t xr_rr_rtt_ms_; | 235 int64_t xr_rr_rtt_ms_; |
| 236 | 236 |
| 237 int64_t oldest_tmmbr_info_ms_ GUARDED_BY(rtcp_receiver_lock_); | 237 int64_t oldest_tmmbr_info_ms_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 238 // Mapped by remote ssrc. | 238 // Mapped by remote ssrc. |
| 239 std::map<uint32_t, TmmbrInformation> tmmbr_infos_ | 239 std::map<uint32_t, TmmbrInformation> tmmbr_infos_ |
| 240 GUARDED_BY(rtcp_receiver_lock_); | 240 RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 241 | 241 |
| 242 ReportBlockMap received_report_blocks_ GUARDED_BY(rtcp_receiver_lock_); | 242 ReportBlockMap received_report_blocks_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 243 std::map<uint32_t, LastFirStatus> last_fir_ GUARDED_BY(rtcp_receiver_lock_); | 243 std::map<uint32_t, LastFirStatus> last_fir_ |
| 244 RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 244 std::map<uint32_t, std::string> received_cnames_ | 245 std::map<uint32_t, std::string> received_cnames_ |
| 245 GUARDED_BY(rtcp_receiver_lock_); | 246 RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 246 | 247 |
| 247 // The last time we received an RTCP RR. | 248 // The last time we received an RTCP RR. |
| 248 int64_t last_received_rr_ms_ GUARDED_BY(rtcp_receiver_lock_); | 249 int64_t last_received_rr_ms_ RTC_GUARDED_BY(rtcp_receiver_lock_); |
| 249 | 250 |
| 250 // The time we last received an RTCP RR telling we have successfully | 251 // The time we last received an RTCP RR telling we have successfully |
| 251 // delivered RTP packet to the remote side. | 252 // delivered RTP packet to the remote side. |
| 252 int64_t last_increased_sequence_number_ms_; | 253 int64_t last_increased_sequence_number_ms_; |
| 253 | 254 |
| 254 RtcpStatisticsCallback* stats_callback_ GUARDED_BY(feedbacks_lock_); | 255 RtcpStatisticsCallback* stats_callback_ RTC_GUARDED_BY(feedbacks_lock_); |
| 255 | 256 |
| 256 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; | 257 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; |
| 257 RtcpPacketTypeCounter packet_type_counter_; | 258 RtcpPacketTypeCounter packet_type_counter_; |
| 258 | 259 |
| 259 RtcpNackStats nack_stats_; | 260 RtcpNackStats nack_stats_; |
| 260 | 261 |
| 261 size_t num_skipped_packets_; | 262 size_t num_skipped_packets_; |
| 262 int64_t last_skipped_packets_warning_ms_; | 263 int64_t last_skipped_packets_warning_ms_; |
| 263 }; | 264 }; |
| 264 } // namespace webrtc | 265 } // namespace webrtc |
| 265 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ | 266 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |
| OLD | NEW |