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 16 matching lines...) Expand all Loading... |
27 class ModuleRtpRtcpImpl; | 27 class ModuleRtpRtcpImpl; |
28 | 28 |
29 class RTCPReceiver : public TMMBRHelp | 29 class RTCPReceiver : public TMMBRHelp |
30 { | 30 { |
31 public: | 31 public: |
32 RTCPReceiver(Clock* clock, | 32 RTCPReceiver(Clock* clock, |
33 bool receiver_only, | 33 bool receiver_only, |
34 RtcpPacketTypeCounterObserver* packet_type_counter_observer, | 34 RtcpPacketTypeCounterObserver* packet_type_counter_observer, |
35 RtcpBandwidthObserver* rtcp_bandwidth_observer, | 35 RtcpBandwidthObserver* rtcp_bandwidth_observer, |
36 RtcpIntraFrameObserver* rtcp_intra_frame_observer, | 36 RtcpIntraFrameObserver* rtcp_intra_frame_observer, |
| 37 TransportFeedbackObserver* transport_feedback_observer, |
37 ModuleRtpRtcpImpl* owner); | 38 ModuleRtpRtcpImpl* owner); |
38 virtual ~RTCPReceiver(); | 39 virtual ~RTCPReceiver(); |
39 | 40 |
40 RTCPMethod Status() const; | 41 RTCPMethod Status() const; |
41 void SetRTCPStatus(RTCPMethod method); | 42 void SetRTCPStatus(RTCPMethod method); |
42 | 43 |
43 int64_t LastReceived(); | 44 int64_t LastReceived(); |
44 int64_t LastReceivedReceiverReport() const; | 45 int64_t LastReceivedReceiverReport() const; |
45 | 46 |
46 void SetSsrcs(uint32_t main_ssrc, | 47 void SetSsrcs(uint32_t main_ssrc, |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 void HandleFIRItem(RTCPHelp::RTCPReceiveInformation* receiveInfo, | 210 void HandleFIRItem(RTCPHelp::RTCPReceiveInformation* receiveInfo, |
210 const RTCPUtility::RTCPPacket& rtcpPacket, | 211 const RTCPUtility::RTCPPacket& rtcpPacket, |
211 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); | 212 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
212 | 213 |
213 void HandleAPP(RTCPUtility::RTCPParserV2& rtcpParser, | 214 void HandleAPP(RTCPUtility::RTCPParserV2& rtcpParser, |
214 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); | 215 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
215 | 216 |
216 void HandleAPPItem(RTCPUtility::RTCPParserV2& rtcpParser, | 217 void HandleAPPItem(RTCPUtility::RTCPParserV2& rtcpParser, |
217 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); | 218 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
218 | 219 |
| 220 void HandleTransportFeedback( |
| 221 RTCPUtility::RTCPParserV2* rtcp_parser, |
| 222 RTCPHelp::RTCPPacketInformation* rtcp_packet_information); |
| 223 |
219 private: | 224 private: |
220 typedef std::map<uint32_t, RTCPHelp::RTCPReceiveInformation*> | 225 typedef std::map<uint32_t, RTCPHelp::RTCPReceiveInformation*> |
221 ReceivedInfoMap; | 226 ReceivedInfoMap; |
222 // RTCP report block information mapped by remote SSRC. | 227 // RTCP report block information mapped by remote SSRC. |
223 typedef std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*> | 228 typedef std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*> |
224 ReportBlockInfoMap; | 229 ReportBlockInfoMap; |
225 // RTCP report block information map mapped by source SSRC. | 230 // RTCP report block information map mapped by source SSRC. |
226 typedef std::map<uint32_t, ReportBlockInfoMap> ReportBlockMap; | 231 typedef std::map<uint32_t, ReportBlockInfoMap> ReportBlockMap; |
227 | 232 |
228 RTCPHelp::RTCPReportBlockInformation* CreateOrGetReportBlockInformation( | 233 RTCPHelp::RTCPReportBlockInformation* CreateOrGetReportBlockInformation( |
229 uint32_t remote_ssrc, uint32_t source_ssrc) | 234 uint32_t remote_ssrc, uint32_t source_ssrc) |
230 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 235 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
231 RTCPHelp::RTCPReportBlockInformation* GetReportBlockInformation( | 236 RTCPHelp::RTCPReportBlockInformation* GetReportBlockInformation( |
232 uint32_t remote_ssrc, uint32_t source_ssrc) const | 237 uint32_t remote_ssrc, uint32_t source_ssrc) const |
233 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 238 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
234 | 239 |
235 Clock* const _clock; | 240 Clock* const _clock; |
236 const bool receiver_only_; | 241 const bool receiver_only_; |
237 RTCPMethod _method; | 242 RTCPMethod _method; |
238 int64_t _lastReceived; | 243 int64_t _lastReceived; |
239 ModuleRtpRtcpImpl& _rtpRtcp; | 244 ModuleRtpRtcpImpl& _rtpRtcp; |
240 | 245 |
241 CriticalSectionWrapper* _criticalSectionFeedbacks; | 246 CriticalSectionWrapper* _criticalSectionFeedbacks; |
242 RtcpBandwidthObserver* const _cbRtcpBandwidthObserver; | 247 RtcpBandwidthObserver* const _cbRtcpBandwidthObserver; |
243 RtcpIntraFrameObserver* const _cbRtcpIntraFrameObserver; | 248 RtcpIntraFrameObserver* const _cbRtcpIntraFrameObserver; |
| 249 TransportFeedbackObserver* const _cbTransportFeedbackObserver; |
244 | 250 |
245 CriticalSectionWrapper* _criticalSectionRTCPReceiver; | 251 CriticalSectionWrapper* _criticalSectionRTCPReceiver; |
246 uint32_t main_ssrc_; | 252 uint32_t main_ssrc_; |
247 uint32_t _remoteSSRC; | 253 uint32_t _remoteSSRC; |
248 std::set<uint32_t> registered_ssrcs_; | 254 std::set<uint32_t> registered_ssrcs_; |
249 | 255 |
250 // Received send report | 256 // Received send report |
251 RTCPSenderInfo _remoteSenderInfo; | 257 RTCPSenderInfo _remoteSenderInfo; |
252 // when did we receive the last send report | 258 // when did we receive the last send report |
253 uint32_t _lastReceivedSRNTPsecs; | 259 uint32_t _lastReceivedSRNTPsecs; |
(...skipping 21 matching lines...) Expand all Loading... |
275 // The time we last received an RTCP RR telling we have successfully | 281 // The time we last received an RTCP RR telling we have successfully |
276 // delivered RTP packet to the remote side. | 282 // delivered RTP packet to the remote side. |
277 int64_t _lastIncreasedSequenceNumberMs; | 283 int64_t _lastIncreasedSequenceNumberMs; |
278 | 284 |
279 RtcpStatisticsCallback* stats_callback_ GUARDED_BY(_criticalSectionFeedbacks); | 285 RtcpStatisticsCallback* stats_callback_ GUARDED_BY(_criticalSectionFeedbacks); |
280 | 286 |
281 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; | 287 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; |
282 RtcpPacketTypeCounter packet_type_counter_; | 288 RtcpPacketTypeCounter packet_type_counter_; |
283 | 289 |
284 RTCPUtility::NackStats nack_stats_; | 290 RTCPUtility::NackStats nack_stats_; |
| 291 |
| 292 size_t num_skipped_packets_; |
| 293 int64_t last_skipped_packets_warning_; |
285 }; | 294 }; |
286 } // namespace webrtc | 295 } // namespace webrtc |
287 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ | 296 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |
OLD | NEW |