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