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_SENDER_H_ |
| 12 | #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |
| 13 | |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 14 | #include <map> |
edjee@google.com | 79b0289 | 2013-04-04 19:43:34 +0000 | [diff] [blame] | 15 | #include <sstream> |
| 16 | #include <string> |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 17 | |
pbos@webrtc.org | a048d7c | 2013-05-29 14:27:38 +0000 | [diff] [blame] | 18 | #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" |
| 19 | #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" |
| 20 | #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.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/system_wrappers/interface/scoped_ptr.h" |
| 25 | #include "webrtc/typedefs.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | |
| 27 | namespace webrtc { |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 28 | |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 29 | class ModuleRtpRtcpImpl; |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 30 | |
edjee@google.com | 79b0289 | 2013-04-04 19:43:34 +0000 | [diff] [blame] | 31 | class NACKStringBuilder |
| 32 | { |
| 33 | public: |
| 34 | NACKStringBuilder(); |
pbos@webrtc.org | f3e4cee | 2013-07-31 15:17:19 +0000 | [diff] [blame] | 35 | ~NACKStringBuilder(); |
| 36 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 37 | void PushNACK(uint16_t nack); |
edjee@google.com | 79b0289 | 2013-04-04 19:43:34 +0000 | [diff] [blame] | 38 | std::string GetResult(); |
| 39 | |
| 40 | private: |
| 41 | std::ostringstream _stream; |
| 42 | int _count; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 43 | uint16_t _prevNack; |
edjee@google.com | 79b0289 | 2013-04-04 19:43:34 +0000 | [diff] [blame] | 44 | bool _consecutive; |
| 45 | }; |
| 46 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 47 | class RTCPSender |
| 48 | { |
| 49 | public: |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 50 | RTCPSender(const int32_t id, const bool audio, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 51 | Clock* clock, ModuleRtpRtcpImpl* owner); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 52 | virtual ~RTCPSender(); |
| 53 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 54 | void ChangeUniqueId(const int32_t id); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 55 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 56 | int32_t Init(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 57 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 58 | int32_t RegisterSendTransport(Transport* outgoingTransport); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 59 | |
| 60 | RTCPMethod Status() const; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 61 | int32_t SetRTCPStatus(const RTCPMethod method); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 62 | |
| 63 | bool Sending() const; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 64 | int32_t SetSendingStatus(const bool enabled); // combine the functions |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 65 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 66 | int32_t SetNackStatus(const bool enable); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 67 | |
stefan@webrtc.org | 7c3523c | 2012-09-11 07:00:42 +0000 | [diff] [blame] | 68 | void SetStartTimestamp(uint32_t start_timestamp); |
| 69 | |
| 70 | void SetLastRtpTime(uint32_t rtp_timestamp, |
| 71 | int64_t capture_time_ms); |
| 72 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 73 | void SetSSRC( const uint32_t ssrc); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 74 | |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 75 | int32_t SetRemoteSSRC( const uint32_t ssrc); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 76 | |
stefan@webrtc.org | 7da3459 | 2013-04-09 14:56:29 +0000 | [diff] [blame] | 77 | int32_t SetCameraDelay(const int32_t delayMS); |
| 78 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 79 | int32_t CNAME(char cName[RTCP_CNAME_SIZE]); |
| 80 | int32_t SetCNAME(const char cName[RTCP_CNAME_SIZE]); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 81 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 82 | int32_t AddMixedCNAME(const uint32_t SSRC, |
| 83 | const char cName[RTCP_CNAME_SIZE]); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 84 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 85 | int32_t RemoveMixedCNAME(const uint32_t SSRC); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 86 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 87 | uint32_t SendTimeOfSendReport(const uint32_t sendReport); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 88 | |
| 89 | bool TimeToSendRTCPReport(const bool sendKeyframeBeforeRTP = false) const; |
| 90 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 91 | uint32_t LastSendReport(uint32_t& lastRTCPTime); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 92 | |
tnakamura@webrtc.org | aa4d96a | 2013-07-16 19:25:04 +0000 | [diff] [blame] | 93 | int32_t SendRTCP(const uint32_t rtcpPacketTypeFlags, |
| 94 | const int32_t nackSize = 0, |
| 95 | const uint16_t* nackList = 0, |
| 96 | const bool repeat = false, |
| 97 | const uint64_t pictureID = 0); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 98 | |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 99 | int32_t AddReportBlock(const uint32_t SSRC, |
| 100 | const RTCPReportBlock* receiveBlock); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 101 | |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 102 | int32_t RemoveReportBlock(const uint32_t SSRC); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 103 | |
| 104 | /* |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 105 | * REMB |
| 106 | */ |
| 107 | bool REMB() const; |
| 108 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 109 | int32_t SetREMBStatus(const bool enable); |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 110 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 111 | int32_t SetREMBData(const uint32_t bitrate, |
| 112 | const uint8_t numberOfSSRC, |
| 113 | const uint32_t* SSRC); |
mflodman@webrtc.org | 84dc3d1 | 2011-12-22 10:26:13 +0000 | [diff] [blame] | 114 | |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 115 | /* |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 116 | * TMMBR |
| 117 | */ |
| 118 | bool TMMBR() const; |
| 119 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 120 | int32_t SetTMMBRStatus(const bool enable); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 121 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 122 | int32_t SetTMMBN(const TMMBRSet* boundingSet, |
| 123 | const uint32_t maxBitrateKbit); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 124 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 125 | /* |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 126 | * Extended jitter report |
| 127 | */ |
| 128 | bool IJ() const; |
| 129 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 130 | int32_t SetIJStatus(const bool enable); |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 131 | |
| 132 | /* |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 133 | * |
| 134 | */ |
| 135 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 136 | int32_t SetApplicationSpecificData(const uint8_t subType, |
| 137 | const uint32_t name, |
| 138 | const uint8_t* data, |
| 139 | const uint16_t length); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 140 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 141 | int32_t SetRTCPVoIPMetrics(const RTCPVoIPMetric* VoIPMetric); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 142 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 143 | int32_t SetCSRCs(const uint32_t arrOfCSRC[kRtpCsrcSize], |
| 144 | const uint8_t arrLength); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 145 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 146 | int32_t SetCSRCStatus(const bool include); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 147 | |
stefan@webrtc.org | 9354cc9 | 2012-06-07 08:10:14 +0000 | [diff] [blame] | 148 | void SetTargetBitrate(unsigned int target_bitrate); |
mflodman@webrtc.org | 117c119 | 2012-01-13 08:52:58 +0000 | [diff] [blame] | 149 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 150 | private: |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 151 | int32_t SendToNetwork(const uint8_t* dataBuffer, const uint16_t length); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 152 | |
| 153 | void UpdatePacketRate(); |
| 154 | |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 155 | int32_t AddReportBlocks(uint8_t* rtcpbuffer, |
| 156 | uint32_t& pos, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 157 | uint8_t& numberOfReportBlocks, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 158 | const RTCPReportBlock* received, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 159 | const uint32_t NTPsec, |
| 160 | const uint32_t NTPfrac); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 161 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 162 | int32_t BuildSR(uint8_t* rtcpbuffer, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 163 | uint32_t& pos, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 164 | const uint32_t NTPsec, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 165 | const uint32_t NTPfrac, |
| 166 | const RTCPReportBlock* received = NULL); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 167 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 168 | int32_t BuildRR(uint8_t* rtcpbuffer, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 169 | uint32_t& pos, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 170 | const uint32_t NTPsec, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 171 | const uint32_t NTPfrac, |
| 172 | const RTCPReportBlock* received = NULL); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 173 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 174 | int32_t BuildExtendedJitterReport( |
| 175 | uint8_t* rtcpbuffer, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 176 | uint32_t& pos, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 177 | const uint32_t jitterTransmissionTimeOffset); |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 178 | |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 179 | int32_t BuildSDEC(uint8_t* rtcpbuffer, uint32_t& pos); |
| 180 | int32_t BuildPLI(uint8_t* rtcpbuffer, uint32_t& pos); |
| 181 | int32_t BuildREMB(uint8_t* rtcpbuffer, uint32_t& pos); |
| 182 | int32_t BuildTMMBR(uint8_t* rtcpbuffer, uint32_t& pos); |
| 183 | int32_t BuildTMMBN(uint8_t* rtcpbuffer, uint32_t& pos); |
| 184 | int32_t BuildAPP(uint8_t* rtcpbuffer, uint32_t& pos); |
| 185 | int32_t BuildVoIPMetric(uint8_t* rtcpbuffer, uint32_t& pos); |
| 186 | int32_t BuildBYE(uint8_t* rtcpbuffer, uint32_t& pos); |
| 187 | int32_t BuildFIR(uint8_t* rtcpbuffer, uint32_t& pos, bool repeat); |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 188 | int32_t BuildSLI(uint8_t* rtcpbuffer, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 189 | uint32_t& pos, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 190 | const uint8_t pictureID); |
| 191 | int32_t BuildRPSI(uint8_t* rtcpbuffer, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 192 | uint32_t& pos, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 193 | const uint64_t pictureID, |
| 194 | const uint8_t payloadType); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 195 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 196 | int32_t BuildNACK(uint8_t* rtcpbuffer, |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 197 | uint32_t& pos, |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 198 | const int32_t nackSize, |
| 199 | const uint16_t* nackList, |
edjee@google.com | 79b0289 | 2013-04-04 19:43:34 +0000 | [diff] [blame] | 200 | std::string* nackString); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 201 | |
| 202 | private: |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 203 | int32_t _id; |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 204 | const bool _audio; |
stefan@webrtc.org | a678a3b | 2013-01-21 07:42:11 +0000 | [diff] [blame] | 205 | Clock* _clock; |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 206 | RTCPMethod _method; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 207 | |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 208 | ModuleRtpRtcpImpl& _rtpRtcp; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 209 | |
henrike@webrtc.org | 65573f2 | 2011-12-13 19:17:27 +0000 | [diff] [blame] | 210 | CriticalSectionWrapper* _criticalSectionTransport; |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 211 | Transport* _cbTransport; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 212 | |
henrike@webrtc.org | 65573f2 | 2011-12-13 19:17:27 +0000 | [diff] [blame] | 213 | CriticalSectionWrapper* _criticalSectionRTCPSender; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 214 | bool _usingNack; |
| 215 | bool _sending; |
| 216 | bool _sendTMMBN; |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 217 | bool _REMB; |
| 218 | bool _sendREMB; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 219 | bool _TMMBR; |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 220 | bool _IJ; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 221 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 222 | int64_t _nextTimeToSendRTCP; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 223 | |
stefan@webrtc.org | 7c3523c | 2012-09-11 07:00:42 +0000 | [diff] [blame] | 224 | uint32_t start_timestamp_; |
| 225 | uint32_t last_rtp_timestamp_; |
| 226 | int64_t last_frame_capture_time_ms_; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 227 | uint32_t _SSRC; |
| 228 | uint32_t _remoteSSRC; // SSRC that we receive on our RTP channel |
pwestin@webrtc.org | 26f8d9c | 2012-01-19 15:53:09 +0000 | [diff] [blame] | 229 | char _CNAME[RTCP_CNAME_SIZE]; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 230 | |
elham@webrtc.org | b7eda43 | 2013-07-15 21:08:27 +0000 | [diff] [blame] | 231 | std::map<uint32_t, RTCPReportBlock*> _reportBlocks; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 232 | std::map<uint32_t, RTCPUtility::RTCPCnameInformation*> _csrcCNAMEs; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 233 | |
stefan@webrtc.org | 7da3459 | 2013-04-09 14:56:29 +0000 | [diff] [blame] | 234 | int32_t _cameraDelayMS; |
| 235 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 236 | // Sent |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 237 | uint32_t _lastSendReport[RTCP_NUMBER_OF_SR]; // allow packet loss and RTT above 1 sec |
| 238 | uint32_t _lastRTCPTime[RTCP_NUMBER_OF_SR]; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 239 | |
| 240 | // send CSRCs |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 241 | uint8_t _CSRCs; |
| 242 | uint32_t _CSRC[kRtpCsrcSize]; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 243 | bool _includeCSRCs; |
| 244 | |
| 245 | // Full intra request |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 246 | uint8_t _sequenceNumberFIR; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 247 | |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 248 | // REMB |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 249 | uint8_t _lengthRembSSRC; |
| 250 | uint8_t _sizeRembSSRC; |
| 251 | uint32_t* _rembSSRC; |
| 252 | uint32_t _rembBitrate; |
pwestin@webrtc.org | 741da94 | 2011-09-20 13:52:04 +0000 | [diff] [blame] | 253 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 254 | TMMBRHelp _tmmbrHelp; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 255 | uint32_t _tmmbr_Send; |
| 256 | uint32_t _packetOH_Send; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 257 | |
| 258 | // APP |
| 259 | bool _appSend; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 260 | uint8_t _appSubType; |
| 261 | uint32_t _appName; |
| 262 | uint8_t* _appData; |
| 263 | uint16_t _appLength; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 264 | |
| 265 | // XR VoIP metric |
| 266 | bool _xrSendVoIPMetric; |
| 267 | RTCPVoIPMetric _xrVoIPMetric; |
edjee@google.com | 79b0289 | 2013-04-04 19:43:34 +0000 | [diff] [blame] | 268 | |
| 269 | // Counters |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 270 | uint32_t _nackCount; |
| 271 | uint32_t _pliCount; |
| 272 | uint32_t _fullIntraRequestCount; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 273 | }; |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 274 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 275 | |
| 276 | #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTCP_SENDER_H_ |