niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
pwestin@webrtc.org | f6bb77a | 2012-01-24 17:16:59 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |
| 12 | #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |
| 13 | |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 14 | #include <map> |
perkj@webrtc.org | ce5990c | 2012-01-11 13:00:08 +0000 | [diff] [blame] | 15 | #include <vector> |
stefan@webrtc.org | 28a331e | 2013-09-17 07:49:56 +0000 | [diff] [blame] | 16 | #include <set> |
perkj@webrtc.org | ce5990c | 2012-01-11 13:00:08 +0000 | [diff] [blame] | 17 | |
asapersson@webrtc.org | cb79141 | 2014-12-18 14:30:32 +0000 | [diff] [blame] | 18 | #include "webrtc/base/thread_annotations.h" |
pbos@webrtc.org | a048d7c | 2013-05-29 14:27:38 +0000 | [diff] [blame] | 19 | #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h" |
| 20 | #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver_help.h" |
| 21 | #include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" |
| 22 | #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
| 23 | #include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h" |
| 24 | #include "webrtc/typedefs.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 25 | |
| 26 | namespace webrtc { |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 27 | class ModuleRtpRtcpImpl; |
| 28 | |
pwestin@webrtc.org | cac7878 | 2012-04-05 08:30:10 +0000 | [diff] [blame] | 29 | class RTCPReceiver : public TMMBRHelp |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 30 | { |
| 31 | public: |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 32 | RTCPReceiver(const int32_t id, Clock* clock, |
pwestin@webrtc.org | 0644b1d | 2011-12-01 15:42:31 +0000 | [diff] [blame] | 33 | ModuleRtpRtcpImpl* owner); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 34 | virtual ~RTCPReceiver(); |
| 35 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 36 | void ChangeUniqueId(const int32_t id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 37 | |
| 38 | RTCPMethod Status() const; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 39 | int32_t SetRTCPStatus(const RTCPMethod method); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 40 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 41 | int64_t LastReceived(); |
| 42 | int64_t LastReceivedReceiverReport() const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 43 | |
stefan@webrtc.org | 28a331e | 2013-09-17 07:49:56 +0000 | [diff] [blame] | 44 | void SetSsrcs(uint32_t main_ssrc, |
| 45 | const std::set<uint32_t>& registered_ssrcs); |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 46 | void SetRelaySSRC( const uint32_t ssrc); |
| 47 | int32_t SetRemoteSSRC( const uint32_t ssrc); |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 48 | uint32_t RemoteSSRC() const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 49 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 50 | uint32_t RelaySSRC() const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 51 | |
pwestin@webrtc.org | 49888ce | 2012-04-27 05:25:53 +0000 | [diff] [blame] | 52 | void RegisterRtcpObservers(RtcpIntraFrameObserver* intra_frame_callback, |
pbos@webrtc.org | ece3890 | 2014-11-14 11:52:04 +0000 | [diff] [blame] | 53 | RtcpBandwidthObserver* bandwidth_callback); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 54 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 55 | int32_t IncomingRTCPPacket( |
| 56 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, |
| 57 | RTCPUtility::RTCPParserV2 *rtcpParser); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 58 | |
| 59 | void TriggerCallbacksFromRTCPPacket(RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 60 | |
| 61 | // get received cname |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 62 | int32_t CNAME(const uint32_t remoteSSRC, |
| 63 | char cName[RTCP_CNAME_SIZE]) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 64 | |
| 65 | // get received NTP |
pbos@webrtc.org | 2f4b14e | 2014-07-15 15:25:39 +0000 | [diff] [blame] | 66 | bool NTP(uint32_t* ReceivedNTPsecs, |
| 67 | uint32_t* ReceivedNTPfrac, |
| 68 | uint32_t* RTCPArrivalTimeSecs, |
| 69 | uint32_t* RTCPArrivalTimeFrac, |
| 70 | uint32_t* rtcp_timestamp) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 71 | |
asapersson@webrtc.org | 8469f7b | 2013-10-02 13:15:34 +0000 | [diff] [blame] | 72 | bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const; |
| 73 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 74 | // get rtt |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 75 | int32_t RTT(uint32_t remoteSSRC, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 76 | uint16_t* RTT, |
| 77 | uint16_t* avgRTT, |
| 78 | uint16_t* minRTT, |
| 79 | uint16_t* maxRTT) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 80 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 81 | int32_t SenderInfoReceived(RTCPSenderInfo* senderInfo) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 82 | |
asapersson@webrtc.org | 7d6bd22 | 2013-10-31 12:14:34 +0000 | [diff] [blame] | 83 | bool GetAndResetXrRrRtt(uint16_t* rtt_ms); |
| 84 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 85 | // get statistics |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 86 | int32_t StatisticsReceived( |
perkj@webrtc.org | ce5990c | 2012-01-11 13:00:08 +0000 | [diff] [blame] | 87 | std::vector<RTCPReportBlock>* receiveBlocks) const; |
| 88 | |
asapersson@webrtc.org | 8098e07 | 2014-02-19 11:59:02 +0000 | [diff] [blame] | 89 | void GetPacketTypeCounter(RtcpPacketTypeCounter* packet_counter) const; |
| 90 | |
mflodman@webrtc.org | 2f225ca | 2013-01-09 13:54:43 +0000 | [diff] [blame] | 91 | // Returns true if we haven't received an RTCP RR for several RTCP |
| 92 | // intervals, but only triggers true once. |
| 93 | bool RtcpRrTimeout(int64_t rtcp_interval_ms); |
| 94 | |
| 95 | // Returns true if we haven't received an RTCP RR telling the receive side |
| 96 | // has not received RTP packets for too long, i.e. extended highest sequence |
| 97 | // number hasn't increased for several RTCP intervals. The function only |
| 98 | // returns true once until a new RR is received. |
| 99 | bool RtcpRrSequenceNumberTimeout(int64_t rtcp_interval_ms); |
| 100 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 101 | // Get TMMBR |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 102 | int32_t TMMBRReceived(const uint32_t size, |
| 103 | const uint32_t accNumCandidates, |
| 104 | TMMBRSet* candidateSet) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 105 | |
| 106 | bool UpdateRTCPReceiveInformationTimers(); |
| 107 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 108 | int32_t BoundingSet(bool &tmmbrOwner, TMMBRSet* boundingSetRec); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 109 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 110 | int32_t UpdateTMMBR(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 111 | |
sprang@webrtc.org | a6ad6e5 | 2013-12-05 09:48:44 +0000 | [diff] [blame] | 112 | void RegisterRtcpStatisticsCallback(RtcpStatisticsCallback* callback); |
| 113 | RtcpStatisticsCallback* GetRtcpStatisticsCallback(); |
| 114 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 115 | protected: |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 116 | RTCPUtility::RTCPCnameInformation* CreateCnameInformation(const uint32_t remoteSSRC); |
| 117 | RTCPUtility::RTCPCnameInformation* GetCnameInformation(const uint32_t remoteSSRC) const; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 118 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 119 | RTCPHelp::RTCPReceiveInformation* CreateReceiveInformation(const uint32_t remoteSSRC); |
| 120 | RTCPHelp::RTCPReceiveInformation* GetReceiveInformation(const uint32_t remoteSSRC); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 121 | |
| 122 | void UpdateReceiveInformation( RTCPHelp::RTCPReceiveInformation& receiveInformation); |
| 123 | |
| 124 | void HandleSenderReceiverReport(RTCPUtility::RTCPParserV2& rtcpParser, |
| 125 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 126 | |
| 127 | void HandleReportBlock(const RTCPUtility::RTCPPacket& rtcpPacket, |
| 128 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 129 | const uint32_t remoteSSRC, |
| 130 | const uint8_t numberOfReportBlocks); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 131 | |
| 132 | void HandleSDES(RTCPUtility::RTCPParserV2& rtcpParser); |
| 133 | |
| 134 | void HandleSDESChunk(RTCPUtility::RTCPParserV2& rtcpParser); |
| 135 | |
asapersson@webrtc.org | 8469f7b | 2013-10-02 13:15:34 +0000 | [diff] [blame] | 136 | void HandleXrHeader(RTCPUtility::RTCPParserV2& parser, |
| 137 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 138 | |
| 139 | void HandleXrReceiveReferenceTime( |
| 140 | RTCPUtility::RTCPParserV2& parser, |
| 141 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 142 | |
| 143 | void HandleXrDlrrReportBlock( |
| 144 | RTCPUtility::RTCPParserV2& parser, |
| 145 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 146 | |
| 147 | void HandleXrDlrrReportBlockItem( |
| 148 | const RTCPUtility::RTCPPacket& packet, |
| 149 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 150 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 151 | void HandleXRVOIPMetric(RTCPUtility::RTCPParserV2& rtcpParser, |
| 152 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 153 | |
| 154 | void HandleNACK(RTCPUtility::RTCPParserV2& rtcpParser, |
| 155 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 156 | |
| 157 | void HandleNACKItem(const RTCPUtility::RTCPPacket& rtcpPacket, |
| 158 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 159 | |
| 160 | void HandleBYE(RTCPUtility::RTCPParserV2& rtcpParser); |
| 161 | |
| 162 | void HandlePLI(RTCPUtility::RTCPParserV2& rtcpParser, |
| 163 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 164 | |
| 165 | void HandleSLI(RTCPUtility::RTCPParserV2& rtcpParser, |
| 166 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 167 | |
| 168 | void HandleSLIItem(const RTCPUtility::RTCPPacket& rtcpPacket, |
| 169 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 170 | |
| 171 | void HandleRPSI(RTCPUtility::RTCPParserV2& rtcpParser, |
| 172 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 173 | |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 174 | void HandlePsfbApp(RTCPUtility::RTCPParserV2& rtcpParser, |
| 175 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 176 | |
| 177 | void HandleREMBItem(RTCPUtility::RTCPParserV2& rtcpParser, |
| 178 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 179 | |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 180 | void HandleIJ(RTCPUtility::RTCPParserV2& rtcpParser, |
| 181 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 182 | |
| 183 | void HandleIJItem(const RTCPUtility::RTCPPacket& rtcpPacket, |
| 184 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 185 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 186 | void HandleTMMBR(RTCPUtility::RTCPParserV2& rtcpParser, |
| 187 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 188 | |
| 189 | void HandleTMMBRItem(RTCPHelp::RTCPReceiveInformation& receiveInfo, |
| 190 | const RTCPUtility::RTCPPacket& rtcpPacket, |
| 191 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 192 | const uint32_t senderSSRC); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 193 | |
hta@webrtc.org | 9d54cd1 | 2012-04-30 08:24:55 +0000 | [diff] [blame] | 194 | void HandleTMMBN(RTCPUtility::RTCPParserV2& rtcpParser, |
| 195 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 196 | |
| 197 | void HandleSR_REQ(RTCPUtility::RTCPParserV2& rtcpParser, |
| 198 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 199 | |
| 200 | void HandleTMMBNItem(RTCPHelp::RTCPReceiveInformation& receiveInfo, |
| 201 | const RTCPUtility::RTCPPacket& rtcpPacket); |
| 202 | |
| 203 | void HandleFIR(RTCPUtility::RTCPParserV2& rtcpParser, |
| 204 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 205 | |
pwestin@webrtc.org | b2179c2 | 2012-05-21 12:00:49 +0000 | [diff] [blame] | 206 | void HandleFIRItem(RTCPHelp::RTCPReceiveInformation* receiveInfo, |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 207 | const RTCPUtility::RTCPPacket& rtcpPacket, |
| 208 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 209 | |
| 210 | void HandleAPP(RTCPUtility::RTCPParserV2& rtcpParser, |
| 211 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 212 | |
| 213 | void HandleAPPItem(RTCPUtility::RTCPParserV2& rtcpParser, |
| 214 | RTCPHelp::RTCPPacketInformation& rtcpPacketInformation); |
| 215 | |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 216 | private: |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 217 | typedef std::map<uint32_t, RTCPHelp::RTCPReceiveInformation*> |
stefan@webrtc.org | b586507 | 2013-02-01 14:33:42 +0000 | [diff] [blame] | 218 | ReceivedInfoMap; |
asapersson@webrtc.org | cb79141 | 2014-12-18 14:30:32 +0000 | [diff] [blame] | 219 | // RTCP report block information mapped by remote SSRC. |
| 220 | typedef std::map<uint32_t, RTCPHelp::RTCPReportBlockInformation*> |
| 221 | ReportBlockInfoMap; |
| 222 | // RTCP report block information map mapped by source SSRC. |
| 223 | typedef std::map<uint32_t, ReportBlockInfoMap> ReportBlockMap; |
| 224 | |
| 225 | RTCPHelp::RTCPReportBlockInformation* CreateOrGetReportBlockInformation( |
| 226 | uint32_t remote_ssrc, uint32_t source_ssrc) |
| 227 | EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 228 | RTCPHelp::RTCPReportBlockInformation* GetReportBlockInformation( |
| 229 | uint32_t remote_ssrc, uint32_t source_ssrc) const |
| 230 | EXCLUSIVE_LOCKS_REQUIRED(_criticalSectionRTCPReceiver); |
| 231 | |
| 232 | int32_t _id; |
| 233 | Clock* _clock; |
| 234 | RTCPMethod _method; |
| 235 | int64_t _lastReceived; |
| 236 | ModuleRtpRtcpImpl& _rtpRtcp; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 237 | |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 238 | CriticalSectionWrapper* _criticalSectionFeedbacks; |
asapersson@webrtc.org | cb79141 | 2014-12-18 14:30:32 +0000 | [diff] [blame] | 239 | RtcpBandwidthObserver* _cbRtcpBandwidthObserver; |
pwestin@webrtc.org | 49888ce | 2012-04-27 05:25:53 +0000 | [diff] [blame] | 240 | RtcpIntraFrameObserver* _cbRtcpIntraFrameObserver; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 241 | |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 242 | CriticalSectionWrapper* _criticalSectionRTCPReceiver; |
asapersson@webrtc.org | cb79141 | 2014-12-18 14:30:32 +0000 | [diff] [blame] | 243 | uint32_t main_ssrc_; |
| 244 | uint32_t _remoteSSRC; |
stefan@webrtc.org | 28a331e | 2013-09-17 07:49:56 +0000 | [diff] [blame] | 245 | std::set<uint32_t> registered_ssrcs_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 246 | |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 247 | // Received send report |
| 248 | RTCPSenderInfo _remoteSenderInfo; |
| 249 | // when did we receive the last send report |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 250 | uint32_t _lastReceivedSRNTPsecs; |
| 251 | uint32_t _lastReceivedSRNTPfrac; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 252 | |
asapersson@webrtc.org | 8469f7b | 2013-10-02 13:15:34 +0000 | [diff] [blame] | 253 | // Received XR receive time report. |
| 254 | RtcpReceiveTimeInfo _remoteXRReceiveTimeInfo; |
| 255 | // Time when the report was received. |
| 256 | uint32_t _lastReceivedXRNTPsecs; |
| 257 | uint32_t _lastReceivedXRNTPfrac; |
asapersson@webrtc.org | 7d6bd22 | 2013-10-31 12:14:34 +0000 | [diff] [blame] | 258 | // Estimated rtt, zero when there is no valid estimate. |
| 259 | uint16_t xr_rr_rtt_ms_; |
asapersson@webrtc.org | 8469f7b | 2013-10-02 13:15:34 +0000 | [diff] [blame] | 260 | |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 261 | // Received report blocks. |
asapersson@webrtc.org | cb79141 | 2014-12-18 14:30:32 +0000 | [diff] [blame] | 262 | ReportBlockMap _receivedReportBlockMap |
| 263 | GUARDED_BY(_criticalSectionRTCPReceiver); |
stefan@webrtc.org | b586507 | 2013-02-01 14:33:42 +0000 | [diff] [blame] | 264 | ReceivedInfoMap _receivedInfoMap; |
asapersson@webrtc.org | cb79141 | 2014-12-18 14:30:32 +0000 | [diff] [blame] | 265 | std::map<uint32_t, RTCPUtility::RTCPCnameInformation*> _receivedCnameMap; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 266 | |
asapersson@webrtc.org | cb79141 | 2014-12-18 14:30:32 +0000 | [diff] [blame] | 267 | uint32_t _packetTimeOutMS; |
mflodman@webrtc.org | d7d4688 | 2012-02-14 12:49:59 +0000 | [diff] [blame] | 268 | |
mflodman@webrtc.org | 2f225ca | 2013-01-09 13:54:43 +0000 | [diff] [blame] | 269 | // The last time we received an RTCP RR. |
| 270 | int64_t _lastReceivedRrMs; |
| 271 | |
asapersson@webrtc.org | cb79141 | 2014-12-18 14:30:32 +0000 | [diff] [blame] | 272 | // The time we last received an RTCP RR telling we have successfully |
mflodman@webrtc.org | 2f225ca | 2013-01-09 13:54:43 +0000 | [diff] [blame] | 273 | // delivered RTP packet to the remote side. |
| 274 | int64_t _lastIncreasedSequenceNumberMs; |
stefan@webrtc.org | 8ca8a71 | 2013-04-23 16:48:32 +0000 | [diff] [blame] | 275 | |
sprang@webrtc.org | a6ad6e5 | 2013-12-05 09:48:44 +0000 | [diff] [blame] | 276 | RtcpStatisticsCallback* stats_callback_; |
asapersson@webrtc.org | 8098e07 | 2014-02-19 11:59:02 +0000 | [diff] [blame] | 277 | |
| 278 | RtcpPacketTypeCounter packet_type_counter_; |
asapersson@webrtc.org | 2dd3134 | 2014-10-29 12:42:30 +0000 | [diff] [blame] | 279 | |
| 280 | RTCPUtility::NackStats nack_stats_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 281 | }; |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 282 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 283 | #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_RECEIVER_H_ |