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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <set> | 15 #include <set> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/base/criticalsection.h" | 18 #include "webrtc/base/criticalsection.h" |
19 #include "webrtc/base/thread_annotations.h" | 19 #include "webrtc/base/thread_annotations.h" |
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
21 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h" | 21 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h" |
22 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" | 22 #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" |
23 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 23 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
24 #include "webrtc/typedefs.h" | 24 #include "webrtc/typedefs.h" |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 class ModuleRtpRtcpImpl; | 27 class ModuleRtpRtcpImpl; |
28 | 28 |
29 class RTCPReceiver | 29 class RTCPReceiver { |
30 { | 30 public: |
31 public: | 31 RTCPReceiver(Clock* clock, |
32 RTCPReceiver(Clock* clock, | 32 bool receiver_only, |
33 bool receiver_only, | 33 RtcpPacketTypeCounterObserver* packet_type_counter_observer, |
34 RtcpPacketTypeCounterObserver* packet_type_counter_observer, | 34 RtcpBandwidthObserver* rtcp_bandwidth_observer, |
35 RtcpBandwidthObserver* rtcp_bandwidth_observer, | 35 RtcpIntraFrameObserver* rtcp_intra_frame_observer, |
36 RtcpIntraFrameObserver* rtcp_intra_frame_observer, | 36 TransportFeedbackObserver* transport_feedback_observer, |
37 TransportFeedbackObserver* transport_feedback_observer, | 37 ModuleRtpRtcpImpl* owner); |
38 ModuleRtpRtcpImpl* owner); | 38 virtual ~RTCPReceiver(); |
39 virtual ~RTCPReceiver(); | 39 |
40 | 40 int64_t LastReceived(); |
41 int64_t LastReceived(); | 41 int64_t LastReceivedReceiverReport() const; |
42 int64_t LastReceivedReceiverReport() const; | 42 |
43 | 43 void SetSsrcs(uint32_t main_ssrc, const std::set<uint32_t>& registered_ssrcs); |
44 void SetSsrcs(uint32_t main_ssrc, | 44 void SetRemoteSSRC(uint32_t ssrc); |
45 const std::set<uint32_t>& registered_ssrcs); | 45 uint32_t RemoteSSRC() const; |
46 void SetRemoteSSRC(uint32_t ssrc); | 46 |
47 uint32_t RemoteSSRC() const; | 47 int32_t IncomingRTCPPacket( |
48 | 48 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, |
49 int32_t IncomingRTCPPacket( | 49 RTCPUtility::RTCPParserV2* rtcpParser); |
50 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, | 50 |
51 RTCPUtility::RTCPParserV2 *rtcpParser); | 51 void TriggerCallbacksFromRTCPPacket( |
52 | 52 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
53 void TriggerCallbacksFromRTCPPacket( | 53 |
54 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); | 54 // get received cname |
55 | 55 int32_t CNAME(uint32_t remoteSSRC, char cName[RTCP_CNAME_SIZE]) const; |
56 // get received cname | 56 |
57 int32_t CNAME(uint32_t remoteSSRC, char cName[RTCP_CNAME_SIZE]) const; | 57 // get received NTP |
58 | 58 bool NTP(uint32_t* ReceivedNTPsecs, |
59 // get received NTP | 59 uint32_t* ReceivedNTPfrac, |
60 bool NTP(uint32_t* ReceivedNTPsecs, | 60 uint32_t* RTCPArrivalTimeSecs, |
61 uint32_t* ReceivedNTPfrac, | 61 uint32_t* RTCPArrivalTimeFrac, |
62 uint32_t* RTCPArrivalTimeSecs, | 62 uint32_t* rtcp_timestamp) const; |
63 uint32_t* RTCPArrivalTimeFrac, | 63 |
64 uint32_t* rtcp_timestamp) const; | 64 bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const; |
65 | 65 |
66 bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const; | 66 // get rtt |
67 | 67 int32_t RTT(uint32_t remoteSSRC, |
68 // get rtt | 68 int64_t* RTT, |
69 int32_t RTT(uint32_t remoteSSRC, | 69 int64_t* avgRTT, |
70 int64_t* RTT, | 70 int64_t* minRTT, |
71 int64_t* avgRTT, | 71 int64_t* maxRTT) const; |
72 int64_t* minRTT, | 72 |
73 int64_t* maxRTT) const; | 73 int32_t SenderInfoReceived(RTCPSenderInfo* senderInfo) const; |
74 | 74 |
75 int32_t SenderInfoReceived(RTCPSenderInfo* senderInfo) const; | 75 void SetRtcpXrRrtrStatus(bool enable); |
76 | 76 bool GetAndResetXrRrRtt(int64_t* rtt_ms); |
77 void SetRtcpXrRrtrStatus(bool enable); | 77 |
78 bool GetAndResetXrRrRtt(int64_t* rtt_ms); | 78 // get statistics |
79 | 79 int32_t StatisticsReceived(std::vector<RTCPReportBlock>* receiveBlocks) const; |
80 // get statistics | 80 |
81 int32_t StatisticsReceived( | 81 // Returns true if we haven't received an RTCP RR for several RTCP |
82 std::vector<RTCPReportBlock>* receiveBlocks) const; | 82 // intervals, but only triggers true once. |
83 | 83 bool RtcpRrTimeout(int64_t rtcp_interval_ms); |
84 // Returns true if we haven't received an RTCP RR for several RTCP | 84 |
85 // intervals, but only triggers true once. | 85 // Returns true if we haven't received an RTCP RR telling the receive side |
86 bool RtcpRrTimeout(int64_t rtcp_interval_ms); | 86 // has not received RTP packets for too long, i.e. extended highest sequence |
87 | 87 // number hasn't increased for several RTCP intervals. The function only |
88 // Returns true if we haven't received an RTCP RR telling the receive side | 88 // returns true once until a new RR is received. |
89 // has not received RTP packets for too long, i.e. extended highest sequence | 89 bool RtcpRrSequenceNumberTimeout(int64_t rtcp_interval_ms); |
90 // number hasn't increased for several RTCP intervals. The function only | 90 |
91 // returns true once until a new RR is received. | 91 // Get TMMBR |
92 bool RtcpRrSequenceNumberTimeout(int64_t rtcp_interval_ms); | 92 std::vector<rtcp::TmmbItem> TMMBRReceived() const; |
93 | 93 |
94 // Get TMMBR | 94 bool UpdateRTCPReceiveInformationTimers(); |
95 std::vector<rtcp::TmmbItem> TMMBRReceived() const; | 95 |
96 | 96 std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner); |
97 bool UpdateRTCPReceiveInformationTimers(); | 97 |
98 | 98 int32_t UpdateTMMBR(); |
99 std::vector<rtcp::TmmbItem> BoundingSet(bool* tmmbr_owner); | 99 |
100 | 100 void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback); |
101 int32_t UpdateTMMBR(); | 101 RtcpStatisticsCallback* GetRtcpStatisticsCallback(); |
102 | 102 |
103 void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback); | 103 protected: |
104 RtcpStatisticsCallback* GetRtcpStatisticsCallback(); | 104 RTCPUtility::RTCPCnameInformation* CreateCnameInformation( |
105 | 105 uint32_t remoteSSRC); |
106 protected: | 106 RTCPUtility::RTCPCnameInformation* GetCnameInformation( |
107 RTCPUtility::RTCPCnameInformation* CreateCnameInformation(uint32_t remoteSSRC); | 107 uint32_t remoteSSRC) const; |
108 RTCPUtility::RTCPCnameInformation* GetCnameInformation( | 108 |
109 uint32_t remoteSSRC) const; | 109 RTCPHelp::RTCPReceiveInformation* CreateReceiveInformation( |
110 | 110 uint32_t remoteSSRC); |
111 RTCPHelp::RTCPReceiveInformation* CreateReceiveInformation( | 111 RTCPHelp::RTCPReceiveInformation* GetReceiveInformation(uint32_t remoteSSRC); |
112 uint32_t remoteSSRC); | 112 |
113 RTCPHelp::RTCPReceiveInformation* GetReceiveInformation(uint32_t remoteSSRC); | 113 void HandleSenderReceiverReport( |
114 | 114 RTCPUtility::RTCPParserV2& rtcpParser, |
115 void HandleSenderReceiverReport( | 115 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
116 RTCPUtility::RTCPParserV2& rtcpParser, | 116 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
117 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 117 |
118 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 118 void HandleReportBlock(const RTCPUtility::RTCPPacket& rtcpPacket, |
119 | 119 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, |
120 void HandleReportBlock( | 120 uint32_t remoteSSRC) |
121 const RTCPUtility::RTCPPacket& rtcpPacket, | 121 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
122 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, | 122 |
123 uint32_t remoteSSRC) | 123 void HandleSDES(RTCPUtility::RTCPParserV2& rtcpParser, |
124 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 124 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
125 | 125 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
126 void HandleSDES(RTCPUtility::RTCPParserV2& rtcpParser, | 126 |
| 127 void HandleSDESChunk(RTCPUtility::RTCPParserV2& rtcpParser) |
| 128 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 129 |
| 130 void HandleXrHeader(RTCPUtility::RTCPParserV2& parser, |
| 131 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 132 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 133 |
| 134 void HandleXrReceiveReferenceTime( |
| 135 RTCPUtility::RTCPParserV2& parser, |
| 136 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 137 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 138 |
| 139 void HandleXrDlrrReportBlock( |
| 140 RTCPUtility::RTCPParserV2& parser, |
| 141 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 142 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 143 |
| 144 void HandleXrDlrrReportBlockItem( |
| 145 const RTCPUtility::RTCPPacket& packet, |
| 146 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 147 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 148 |
| 149 void HandleXRVOIPMetric( |
| 150 RTCPUtility::RTCPParserV2& rtcpParser, |
| 151 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 152 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 153 |
| 154 void HandleNACK(RTCPUtility::RTCPParserV2& rtcpParser, |
| 155 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 156 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 157 |
| 158 void HandleNACKItem(const RTCPUtility::RTCPPacket& rtcpPacket, |
| 159 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 160 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 161 |
| 162 void HandleBYE(RTCPUtility::RTCPParserV2& rtcpParser) |
| 163 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 164 |
| 165 void HandlePLI(RTCPUtility::RTCPParserV2& rtcpParser, |
| 166 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 167 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 168 |
| 169 void HandleSLI(RTCPUtility::RTCPParserV2& rtcpParser, |
| 170 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 171 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 172 |
| 173 void HandleSLIItem(const RTCPUtility::RTCPPacket& rtcpPacket, |
| 174 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 175 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 176 |
| 177 void HandleRPSI(RTCPUtility::RTCPParserV2& rtcpParser, |
| 178 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 179 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 180 |
| 181 void HandlePsfbApp(RTCPUtility::RTCPParserV2& rtcpParser, |
| 182 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 183 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 184 |
| 185 void HandleREMBItem(RTCPUtility::RTCPParserV2& rtcpParser, |
| 186 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 187 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 188 |
| 189 void HandleIJ(RTCPUtility::RTCPParserV2& rtcpParser, |
| 190 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
| 191 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 192 |
| 193 void HandleIJItem(const RTCPUtility::RTCPPacket& rtcpPacket, |
127 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 194 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
128 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 195 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
129 | 196 |
130 void HandleSDESChunk(RTCPUtility::RTCPParserV2& rtcpParser) | 197 void HandleTMMBR(RTCPUtility::RTCPParserV2& rtcpParser, |
131 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 198 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
132 | 199 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
133 void HandleXrHeader(RTCPUtility::RTCPParserV2& parser, | 200 |
134 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 201 void HandleTMMBRItem(RTCPHelp::RTCPReceiveInformation& receiveInfo, |
135 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 202 const RTCPUtility::RTCPPacket& rtcpPacket, |
136 | 203 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, |
137 void HandleXrReceiveReferenceTime( | 204 uint32_t senderSSRC) |
138 RTCPUtility::RTCPParserV2& parser, | 205 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
139 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 206 |
140 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 207 void HandleTMMBN(RTCPUtility::RTCPParserV2& rtcpParser, |
141 | 208 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
142 void HandleXrDlrrReportBlock( | 209 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
143 RTCPUtility::RTCPParserV2& parser, | 210 |
144 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 211 void HandleSR_REQ(RTCPUtility::RTCPParserV2& rtcpParser, |
145 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
146 | |
147 void HandleXrDlrrReportBlockItem( | |
148 const RTCPUtility::RTCPPacket& packet, | |
149 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
150 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
151 | |
152 void HandleXRVOIPMetric( | |
153 RTCPUtility::RTCPParserV2& rtcpParser, | |
154 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
155 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
156 | |
157 void HandleNACK(RTCPUtility::RTCPParserV2& rtcpParser, | |
158 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 212 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
159 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 213 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
160 | 214 |
161 void HandleNACKItem(const RTCPUtility::RTCPPacket& rtcpPacket, | 215 void HandleTMMBNItem(RTCPHelp::RTCPReceiveInformation& receiveInfo, |
162 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 216 const RTCPUtility::RTCPPacket& rtcpPacket) |
163 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 217 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
164 | 218 |
165 void HandleBYE(RTCPUtility::RTCPParserV2& rtcpParser) | 219 void HandleFIR(RTCPUtility::RTCPParserV2& rtcpParser, |
166 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 220 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
167 | 221 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
168 void HandlePLI(RTCPUtility::RTCPParserV2& rtcpParser, | 222 |
169 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 223 void HandleFIRItem(RTCPHelp::RTCPReceiveInformation* receiveInfo, |
170 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 224 const RTCPUtility::RTCPPacket& rtcpPacket, |
171 | 225 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
172 void HandleSLI(RTCPUtility::RTCPParserV2& rtcpParser, | 226 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
173 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 227 |
174 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 228 void HandleAPP(RTCPUtility::RTCPParserV2& rtcpParser, |
175 | 229 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
176 void HandleSLIItem(const RTCPUtility::RTCPPacket& rtcpPacket, | 230 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
177 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 231 |
178 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 232 void HandleAPPItem(RTCPUtility::RTCPParserV2& rtcpParser, |
179 | 233 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) |
180 void HandleRPSI(RTCPUtility::RTCPParserV2& rtcpParser, | 234 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
181 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 235 |
182 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 236 void HandleTransportFeedback( |
183 | 237 RTCPUtility::RTCPParserV2* rtcp_parser, |
184 void HandlePsfbApp(RTCPUtility::RTCPParserV2& rtcpParser, | 238 RTCPHelp::RTCPPacketInformation* rtcp_packet_information) |
185 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | 239 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
186 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
187 | |
188 void HandleREMBItem(RTCPUtility::RTCPParserV2& rtcpParser, | |
189 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
190 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
191 | |
192 void HandleIJ(RTCPUtility::RTCPParserV2& rtcpParser, | |
193 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
194 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
195 | |
196 void HandleIJItem(const RTCPUtility::RTCPPacket& rtcpPacket, | |
197 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
198 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
199 | |
200 void HandleTMMBR(RTCPUtility::RTCPParserV2& rtcpParser, | |
201 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
202 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
203 | |
204 void HandleTMMBRItem(RTCPHelp::RTCPReceiveInformation& receiveInfo, | |
205 const RTCPUtility::RTCPPacket& rtcpPacket, | |
206 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, | |
207 uint32_t senderSSRC) | |
208 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
209 | |
210 void HandleTMMBN(RTCPUtility::RTCPParserV2& rtcpParser, | |
211 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
212 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
213 | |
214 void HandleSR_REQ(RTCPUtility::RTCPParserV2& rtcpParser, | |
215 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
216 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
217 | |
218 void HandleTMMBNItem(RTCPHelp::RTCPReceiveInformation& receiveInfo, | |
219 const RTCPUtility::RTCPPacket& rtcpPacket) | |
220 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
221 | |
222 void HandleFIR(RTCPUtility::RTCPParserV2& rtcpParser, | |
223 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
224 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
225 | |
226 void HandleFIRItem(RTCPHelp::RTCPReceiveInformation* receiveInfo, | |
227 const RTCPUtility::RTCPPacket& rtcpPacket, | |
228 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
229 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
230 | |
231 void HandleAPP(RTCPUtility::RTCPParserV2& rtcpParser, | |
232 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
233 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
234 | |
235 void HandleAPPItem(RTCPUtility::RTCPParserV2& rtcpParser, | |
236 RTCPHelp::RTCPPacketInformation& rtcpPacketInformation) | |
237 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
238 | |
239 void HandleTransportFeedback( | |
240 RTCPUtility::RTCPParserV2* rtcp_parser, | |
241 RTCPHelp::RTCPPacketInformation* rtcp_packet_information) | |
242 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | |
243 | 240 |
244 private: | 241 private: |
245 typedef std::map<uint32_t, RTCPHelp::RTCPReceiveInformation*> | 242 typedef std::map<uint32_t, RTCPHelp::RTCPReceiveInformation*> ReceivedInfoMap; |
246 ReceivedInfoMap; | |
247 // RTCP report block information mapped by remote SSRC. | 243 // RTCP report block information mapped by remote SSRC. |
248 typedef std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*> | 244 typedef std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*> |
249 ReportBlockInfoMap; | 245 ReportBlockInfoMap; |
250 // RTCP report block information map mapped by source SSRC. | 246 // RTCP report block information map mapped by source SSRC. |
251 typedef std::map<uint32_t, ReportBlockInfoMap> ReportBlockMap; | 247 typedef std::map<uint32_t, ReportBlockInfoMap> ReportBlockMap; |
252 | 248 |
253 RTCPHelp::RTCPReportBlockInformation* CreateOrGetReportBlockInformation( | 249 RTCPHelp::RTCPReportBlockInformation* CreateOrGetReportBlockInformation( |
254 uint32_t remote_ssrc, uint32_t source_ssrc) | 250 uint32_t remote_ssrc, |
255 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 251 uint32_t source_ssrc) |
| 252 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
256 RTCPHelp::RTCPReportBlockInformation* GetReportBlockInformation( | 253 RTCPHelp::RTCPReportBlockInformation* GetReportBlockInformation( |
257 uint32_t remote_ssrc, uint32_t source_ssrc) const | 254 uint32_t remote_ssrc, |
258 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); | 255 uint32_t source_ssrc) const |
| 256 EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
259 | 257 |
260 Clock* const _clock; | 258 Clock* const _clock; |
261 const bool receiver_only_; | 259 const bool receiver_only_; |
262 int64_t _lastReceived; | 260 int64_t _lastReceived; |
263 ModuleRtpRtcpImpl& _rtpRtcp; | 261 ModuleRtpRtcpImpl& _rtpRtcp; |
264 | 262 |
265 rtc::CriticalSection _criticalSectionFeedbacks; | 263 rtc::CriticalSection _criticalSectionFeedbacks; |
266 RtcpBandwidthObserver* const _cbRtcpBandwidthObserver; | 264 RtcpBandwidthObserver* const _cbRtcpBandwidthObserver; |
267 RtcpIntraFrameObserver* const _cbRtcpIntraFrameObserver; | 265 RtcpIntraFrameObserver* const _cbRtcpIntraFrameObserver; |
268 TransportFeedbackObserver* const _cbTransportFeedbackObserver; | 266 TransportFeedbackObserver* const _cbTransportFeedbackObserver; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 302 |
305 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; | 303 RtcpPacketTypeCounterObserver* const packet_type_counter_observer_; |
306 RtcpPacketTypeCounter packet_type_counter_; | 304 RtcpPacketTypeCounter packet_type_counter_; |
307 | 305 |
308 RTCPUtility::NackStats nack_stats_; | 306 RTCPUtility::NackStats nack_stats_; |
309 | 307 |
310 size_t num_skipped_packets_; | 308 size_t num_skipped_packets_; |
311 int64_t last_skipped_packets_warning_; | 309 int64_t last_skipped_packets_warning_; |
312 }; | 310 }; |
313 } // namespace webrtc | 311 } // namespace webrtc |
314 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ | 312 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |
OLD | NEW |