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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 bool IncomingPacket(const uint8_t* packet, size_t packet_size); | 54 bool IncomingPacket(const uint8_t* packet, size_t packet_size); |
55 | 55 |
56 int64_t LastReceived(); | 56 int64_t LastReceived(); |
57 int64_t LastReceivedReceiverReport() const; | 57 int64_t LastReceivedReceiverReport() const; |
58 | 58 |
59 void SetSsrcs(uint32_t main_ssrc, const std::set<uint32_t>& registered_ssrcs); | 59 void SetSsrcs(uint32_t main_ssrc, const std::set<uint32_t>& registered_ssrcs); |
60 void SetRemoteSSRC(uint32_t ssrc); | 60 void SetRemoteSSRC(uint32_t ssrc); |
61 uint32_t RemoteSSRC() const; | 61 uint32_t RemoteSSRC() const; |
62 | 62 |
| 63 int32_t IncomingRTCPPacket( |
| 64 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, |
| 65 RTCPUtility::RTCPParserV2* rtcpParser); |
| 66 |
| 67 void TriggerCallbacksFromRTCPPacket( |
| 68 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 69 |
63 // get received cname | 70 // get received cname |
64 int32_t CNAME(uint32_t remoteSSRC, char cName[RTCP_CNAME_SIZE]) const; | 71 int32_t CNAME(uint32_t remoteSSRC, char cName[RTCP_CNAME_SIZE]) const; |
65 | 72 |
66 // get received NTP | 73 // get received NTP |
67 bool NTP(uint32_t* ReceivedNTPsecs, | 74 bool NTP(uint32_t* ReceivedNTPsecs, |
68 uint32_t* ReceivedNTPfrac, | 75 uint32_t* ReceivedNTPfrac, |
69 uint32_t* RTCPArrivalTimeSecs, | 76 uint32_t* RTCPArrivalTimeSecs, |
70 uint32_t* RTCPArrivalTimeFrac, | 77 uint32_t* RTCPArrivalTimeFrac, |
71 uint32_t* rtcp_timestamp) const; | 78 uint32_t* rtcp_timestamp) const; |
72 | 79 |
(...skipping 28 matching lines...) Expand all Loading... |
101 | 108 |
102 bool UpdateRTCPReceiveInformationTimers(); | 109 bool UpdateRTCPReceiveInformationTimers(); |
103 | 110 |
104 std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner); | 111 std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner); |
105 | 112 |
106 void UpdateTmmbr(); | 113 void UpdateTmmbr(); |
107 | 114 |
108 void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback); | 115 void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback); |
109 RtcpStatisticsCallback* GetRtcpStatisticsCallback(); | 116 RtcpStatisticsCallback* GetRtcpStatisticsCallback(); |
110 | 117 |
111 private: | 118 protected: |
112 using ReceivedInfoMap = std::map<uint32_t, RTCPHelp::RTCPReceiveInformation*>; | |
113 // RTCP report block information mapped by remote SSRC. | |
114 using ReportBlockInfoMap = | |
115 std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*>; | |
116 // RTCP report block information map mapped by source SSRC. | |
117 using ReportBlockMap = std::map<uint32_t, ReportBlockInfoMap>; | |
118 | |
119 int32_t IncomingRTCPPacket( | |
120 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, | |
121 RTCPUtility::RTCPParserV2* rtcpParser); | |
122 | |
123 void TriggerCallbacksFromRTCPPacket( | |
124 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); | |
125 | |
126 RTCPUtility::RTCPCnameInformation* CreateCnameInformation( | 119 RTCPUtility::RTCPCnameInformation* CreateCnameInformation( |
127 uint32_t remoteSSRC); | 120 uint32_t remoteSSRC); |
128 RTCPUtility::RTCPCnameInformation* GetCnameInformation( | 121 RTCPUtility::RTCPCnameInformation* GetCnameInformation( |
129 uint32_t remoteSSRC) const; | 122 uint32_t remoteSSRC) const; |
130 | 123 |
131 RTCPHelp::RTCPReceiveInformation* CreateReceiveInformation( | 124 RTCPHelp::RTCPReceiveInformation* CreateReceiveInformation( |
132 uint32_t remoteSSRC); | 125 uint32_t remoteSSRC); |
133 RTCPHelp::RTCPReceiveInformation* GetReceiveInformation(uint32_t remoteSSRC); | 126 RTCPHelp::RTCPReceiveInformation* GetReceiveInformation(uint32_t remoteSSRC); |
134 | 127 |
135 void HandleSenderReceiverReport( | 128 void HandleSenderReceiverReport( |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 246 |
254 void HandleAPPItem(RTCPUtility::RTCPParserV2& rtcpParser, | 247 void HandleAPPItem(RTCPUtility::RTCPParserV2& rtcpParser, |
255 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 248 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
256 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 249 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
257 | 250 |
258 void HandleTransportFeedback( | 251 void HandleTransportFeedback( |
259 RTCPUtility::RTCPParserV2* rtcp_parser, | 252 RTCPUtility::RTCPParserV2* rtcp_parser, |
260 RTCPHelp::RTCPPacketInformation* rtcp_packet_information) | 253 RTCPHelp::RTCPPacketInformation* rtcp_packet_information) |
261 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 254 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
262 | 255 |
| 256 private: |
| 257 typedef std::map<uint32_t, RTCPHelp::RTCPReceiveInformation*> ReceivedInfoMap; |
| 258 // RTCP report block information mapped by remote SSRC. |
| 259 typedef std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*> |
| 260 ReportBlockInfoMap; |
| 261 // RTCP report block information map mapped by source SSRC. |
| 262 typedef std::map<uint32_t, ReportBlockInfoMap> ReportBlockMap; |
| 263 |
263 RTCPHelp::RTCPReportBlockInformation* CreateOrGetReportBlockInformation( | 264 RTCPHelp::RTCPReportBlockInformation* CreateOrGetReportBlockInformation( |
264 uint32_t remote_ssrc, | 265 uint32_t remote_ssrc, |
265 uint32_t source_ssrc) | 266 uint32_t source_ssrc) |
266 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 267 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
267 RTCPHelp::RTCPReportBlockInformation* GetReportBlockInformation( | 268 RTCPHelp::RTCPReportBlockInformation* GetReportBlockInformation( |
268 uint32_t remote_ssrc, | 269 uint32_t remote_ssrc, |
269 uint32_t source_ssrc) const | 270 uint32_t source_ssrc) const |
270 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 271 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
271 | 272 |
272 Clock* const _clock; | 273 Clock* const _clock; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; | 318 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; |
318 RtcpPacketTypeCounter packet_type_counter_; | 319 RtcpPacketTypeCounter packet_type_counter_; |
319 | 320 |
320 RTCPUtility::NackStats nack_stats_; | 321 RTCPUtility::NackStats nack_stats_; |
321 | 322 |
322 size_t num_skipped_packets_; | 323 size_t num_skipped_packets_; |
323 int64_t last_skipped_packets_warning_; | 324 int64_t last_skipped_packets_warning_; |
324 }; | 325 }; |
325 } // namespace webrtc | 326 } // namespace webrtc |
326 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ | 327 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |
OLD | NEW |