niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 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_RTP_SENDER_H_ |
| 12 | #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ |
| 13 | |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 14 | #include "rtp_rtcp_config.h" // misc. defines (e.g. MAX_PACKET_LENGTH) |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 15 | #include "rtp_rtcp_defines.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 16 | #include "common_types.h" // Encryption |
| 17 | #include "ssrc_database.h" |
| 18 | #include "list_wrapper.h" |
| 19 | #include "map_wrapper.h" |
| 20 | #include "Bitrate.h" |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 21 | #include "rtp_header_extension.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 22 | #include "video_codec_information.h" |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 23 | #include "transmission_bucket.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 24 | |
| 25 | #include <cassert> |
| 26 | #include <cmath> |
| 27 | |
| 28 | #define MAX_INIT_RTP_SEQ_NUMBER 32767 // 2^15 -1 |
| 29 | |
| 30 | namespace webrtc { |
| 31 | class CriticalSectionWrapper; |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 32 | class RTPPacketHistory; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 33 | class RTPSenderAudio; |
| 34 | class RTPSenderVideo; |
| 35 | |
| 36 | class RTPSenderInterface |
| 37 | { |
| 38 | public: |
| 39 | RTPSenderInterface() {} |
| 40 | virtual ~RTPSenderInterface() {} |
| 41 | |
| 42 | virtual WebRtc_UWord32 SSRC() const = 0; |
| 43 | virtual WebRtc_UWord32 Timestamp() const = 0; |
| 44 | |
| 45 | virtual WebRtc_Word32 BuildRTPheader(WebRtc_UWord8* dataBuffer, |
| 46 | const WebRtc_Word8 payloadType, |
| 47 | const bool markerBit, |
| 48 | const WebRtc_UWord32 captureTimeStamp, |
| 49 | const bool timeStampProvided = true, |
| 50 | const bool incSequenceNumber = true) = 0; |
| 51 | |
| 52 | virtual WebRtc_UWord16 RTPHeaderLength() const = 0; |
| 53 | virtual WebRtc_UWord16 IncrementSequenceNumber() = 0; |
| 54 | virtual WebRtc_UWord16 SequenceNumber() const = 0; |
| 55 | virtual WebRtc_UWord16 MaxPayloadLength() const = 0; |
henrik.lundin@webrtc.org | f15fbc3 | 2011-11-08 08:23:47 +0000 | [diff] [blame] | 56 | virtual WebRtc_UWord16 MaxDataPayloadLength() const = 0; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 57 | virtual WebRtc_UWord16 PacketOverHead() const = 0; |
| 58 | virtual WebRtc_UWord16 TargetSendBitrateKbit() const = 0; |
| 59 | virtual WebRtc_UWord16 ActualSendBitrateKbit() const = 0; |
| 60 | |
| 61 | virtual WebRtc_Word32 SendToNetwork(const WebRtc_UWord8* dataBuffer, |
stefan@webrtc.org | 6a4bef4 | 2011-12-22 12:52:41 +0000 | [diff] [blame] | 62 | const WebRtc_UWord16 payloadLength, |
| 63 | const WebRtc_UWord16 rtpHeaderLength, |
| 64 | const StorageType storage) = 0; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | class RTPSender : public Bitrate, public RTPSenderInterface |
| 68 | { |
| 69 | public: |
pwestin@webrtc.org | 0644b1d | 2011-12-01 15:42:31 +0000 | [diff] [blame] | 70 | RTPSender(const WebRtc_Word32 id, const bool audio, RtpRtcpClock* clock); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 71 | virtual ~RTPSender(); |
| 72 | |
| 73 | WebRtc_Word32 Init(const WebRtc_UWord32 remoteSSRC); |
| 74 | void ChangeUniqueId(const WebRtc_Word32 id); |
| 75 | |
| 76 | void ProcessBitrate(); |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 77 | void ProcessSendToNetwork(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 78 | |
| 79 | WebRtc_UWord16 TargetSendBitrateKbit() const; |
| 80 | WebRtc_UWord16 ActualSendBitrateKbit() const; |
| 81 | |
stefan@webrtc.org | fbea4e5 | 2011-10-27 16:08:29 +0000 | [diff] [blame] | 82 | WebRtc_UWord32 VideoBitrateSent() const; |
stefan@webrtc.org | d0bdab0 | 2011-10-14 14:24:54 +0000 | [diff] [blame] | 83 | WebRtc_UWord32 FecOverheadRate() const; |
| 84 | WebRtc_UWord32 NackOverheadRate() const; |
| 85 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 86 | WebRtc_Word32 SetTargetSendBitrate(const WebRtc_UWord32 bits); |
| 87 | |
| 88 | WebRtc_UWord16 MaxDataPayloadLength() const; // with RTP and FEC headers |
| 89 | |
| 90 | // callback |
| 91 | WebRtc_Word32 RegisterSendTransport(Transport* outgoingTransport); |
| 92 | |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 93 | WebRtc_Word32 RegisterPayload( |
| 94 | const WebRtc_Word8 payloadName[RTP_PAYLOAD_NAME_SIZE], |
| 95 | const WebRtc_Word8 payloadType, |
| 96 | const WebRtc_UWord32 frequency, |
| 97 | const WebRtc_UWord8 channels, |
| 98 | const WebRtc_UWord32 rate); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 99 | |
| 100 | WebRtc_Word32 DeRegisterSendPayload(const WebRtc_Word8 payloadType); |
| 101 | |
| 102 | WebRtc_Word8 SendPayloadType() const; |
| 103 | |
| 104 | int SendPayloadFrequency() const; |
| 105 | |
| 106 | void SetSendingStatus(const bool enabled); |
| 107 | |
| 108 | void SetSendingMediaStatus(const bool enabled); |
| 109 | bool SendingMedia() const; |
| 110 | |
| 111 | // number of sent RTP packets |
| 112 | WebRtc_UWord32 Packets() const; |
| 113 | |
| 114 | // number of sent RTP bytes |
| 115 | WebRtc_UWord32 Bytes() const; |
| 116 | |
| 117 | WebRtc_Word32 ResetDataCounters(); |
| 118 | |
| 119 | WebRtc_UWord32 StartTimestamp() const; |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 120 | WebRtc_Word32 SetStartTimestamp(const WebRtc_UWord32 timestamp, |
| 121 | const bool force = false); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 122 | |
| 123 | WebRtc_UWord32 GenerateNewSSRC(); |
| 124 | WebRtc_Word32 SetSSRC( const WebRtc_UWord32 ssrc); |
| 125 | |
| 126 | WebRtc_UWord16 SequenceNumber() const; |
| 127 | WebRtc_Word32 SetSequenceNumber( WebRtc_UWord16 seq); |
| 128 | |
| 129 | WebRtc_Word32 CSRCs(WebRtc_UWord32 arrOfCSRC[kRtpCsrcSize]) const; |
| 130 | |
| 131 | WebRtc_Word32 SetCSRCStatus(const bool include); |
| 132 | |
| 133 | WebRtc_Word32 SetCSRCs(const WebRtc_UWord32 arrOfCSRC[kRtpCsrcSize], |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 134 | const WebRtc_UWord8 arrLength); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 135 | |
| 136 | WebRtc_Word32 SetMaxPayloadLength(const WebRtc_UWord16 length, |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 137 | const WebRtc_UWord16 packetOverHead); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 138 | |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 139 | WebRtc_Word32 SendOutgoingData(const FrameType frameType, |
| 140 | const WebRtc_Word8 payloadType, |
| 141 | const WebRtc_UWord32 timeStamp, |
| 142 | const WebRtc_UWord8* payloadData, |
| 143 | const WebRtc_UWord32 payloadSize, |
| 144 | const RTPFragmentationHeader* fragmentation, |
| 145 | VideoCodecInformation* codecInfo = NULL, |
| 146 | const RTPVideoTypeHeader* rtpTypeHdr = NULL); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 147 | |
pwestin@webrtc.org | 12d97f6 | 2012-01-05 10:54:44 +0000 | [diff] [blame] | 148 | WebRtc_Word32 SendPadData(WebRtc_Word8 payload_type, |
| 149 | WebRtc_UWord32 capture_timestamp, |
| 150 | WebRtc_Word32 bytes); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 151 | /* |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 152 | * RTP header extension |
| 153 | */ |
| 154 | WebRtc_Word32 SetTransmissionTimeOffset( |
| 155 | const WebRtc_Word32 transmissionTimeOffset); |
| 156 | |
| 157 | WebRtc_Word32 RegisterRtpHeaderExtension(const RTPExtensionType type, |
| 158 | const WebRtc_UWord8 id); |
| 159 | |
| 160 | WebRtc_Word32 DeregisterRtpHeaderExtension(const RTPExtensionType type); |
| 161 | |
| 162 | WebRtc_UWord16 RtpHeaderExtensionTotalLength() const; |
| 163 | |
| 164 | WebRtc_UWord16 BuildRTPHeaderExtension(WebRtc_UWord8* dataBuffer) const; |
| 165 | |
| 166 | WebRtc_UWord8 BuildTransmissionTimeOffsetExtension( |
| 167 | WebRtc_UWord8* dataBuffer) const; |
| 168 | |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 169 | void UpdateTransmissionTimeOffset(WebRtc_UWord8* rtp_packet, |
| 170 | const WebRtc_UWord16 rtp_packet_length, |
| 171 | const WebRtcRTPHeader& rtp_header, |
| 172 | const WebRtc_UWord32 time_ms) const; |
| 173 | |
| 174 | void SetTransmissionSmoothingStatus(const bool enable); |
| 175 | |
| 176 | bool TransmissionSmoothingStatus() const; |
| 177 | |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 178 | /* |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 179 | * NACK |
| 180 | */ |
stefan@webrtc.org | 6a4bef4 | 2011-12-22 12:52:41 +0000 | [diff] [blame] | 181 | int SelectiveRetransmissions() const; |
| 182 | int SetSelectiveRetransmissions(uint8_t settings); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 183 | void OnReceivedNACK(const WebRtc_UWord16 nackSequenceNumbersLength, |
| 184 | const WebRtc_UWord16* nackSequenceNumbers, |
| 185 | const WebRtc_UWord16 avgRTT); |
| 186 | |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 187 | WebRtc_Word32 SetStorePacketsStatus(const bool enable, |
| 188 | const WebRtc_UWord16 numberToStore); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 189 | |
| 190 | bool StorePackets() const; |
| 191 | |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 192 | WebRtc_Word32 ReSendPacket(WebRtc_UWord16 packet_id, |
| 193 | WebRtc_UWord32 min_resend_time = 0); |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 194 | |
| 195 | WebRtc_Word32 ReSendToNetwork(const WebRtc_UWord8* packet, |
| 196 | const WebRtc_UWord32 size); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 197 | |
| 198 | bool ProcessNACKBitRate(const WebRtc_UWord32 now); |
| 199 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 200 | /* |
| 201 | * Keep alive |
| 202 | */ |
| 203 | WebRtc_Word32 EnableRTPKeepalive( const WebRtc_Word8 unknownPayloadType, |
| 204 | const WebRtc_UWord16 deltaTransmitTimeMS); |
| 205 | |
| 206 | WebRtc_Word32 RTPKeepaliveStatus(bool* enable, |
| 207 | WebRtc_Word8* unknownPayloadType, |
| 208 | WebRtc_UWord16* deltaTransmitTimeMS) const; |
| 209 | |
| 210 | WebRtc_Word32 DisableRTPKeepalive(); |
| 211 | |
| 212 | bool RTPKeepalive() const; |
| 213 | |
| 214 | bool TimeToSendRTPKeepalive() const; |
| 215 | |
| 216 | WebRtc_Word32 SendRTPKeepalivePacket(); |
| 217 | |
| 218 | /* |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 219 | * RTX |
| 220 | */ |
| 221 | void SetRTXStatus(const bool enable, |
| 222 | const bool setSSRC, |
| 223 | const WebRtc_UWord32 SSRC); |
| 224 | |
| 225 | void RTXStatus(bool* enable, WebRtc_UWord32* SSRC) const; |
| 226 | |
| 227 | /* |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 228 | * Functions wrapping RTPSenderInterface |
| 229 | */ |
| 230 | virtual WebRtc_Word32 BuildRTPheader(WebRtc_UWord8* dataBuffer, |
| 231 | const WebRtc_Word8 payloadType, |
| 232 | const bool markerBit, |
| 233 | const WebRtc_UWord32 captureTimeStamp, |
| 234 | const bool timeStampProvided = true, |
| 235 | const bool incSequenceNumber = true); |
| 236 | |
| 237 | virtual WebRtc_UWord16 RTPHeaderLength() const ; |
| 238 | virtual WebRtc_UWord16 IncrementSequenceNumber(); |
| 239 | virtual WebRtc_UWord16 MaxPayloadLength() const; |
| 240 | virtual WebRtc_UWord16 PacketOverHead() const; |
| 241 | |
| 242 | // current timestamp |
| 243 | virtual WebRtc_UWord32 Timestamp() const; |
| 244 | virtual WebRtc_UWord32 SSRC() const; |
| 245 | |
| 246 | virtual WebRtc_Word32 SendToNetwork(const WebRtc_UWord8* dataBuffer, |
stefan@webrtc.org | 6a4bef4 | 2011-12-22 12:52:41 +0000 | [diff] [blame] | 247 | const WebRtc_UWord16 payloadLength, |
| 248 | const WebRtc_UWord16 rtpHeaderLength, |
| 249 | const StorageType storage); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 250 | |
| 251 | /* |
| 252 | * Audio |
| 253 | */ |
| 254 | WebRtc_Word32 RegisterAudioCallback(RtpAudioFeedback* messagesCallback); |
| 255 | |
| 256 | // Send a DTMF tone using RFC 2833 (4733) |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 257 | WebRtc_Word32 SendTelephoneEvent(const WebRtc_UWord8 key, |
| 258 | const WebRtc_UWord16 time_ms, |
| 259 | const WebRtc_UWord8 level); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 260 | |
| 261 | bool SendTelephoneEventActive(WebRtc_Word8& telephoneEvent) const; |
| 262 | |
| 263 | // set audio packet size, used to determine when it's time to send a DTMF packet in silence (CNG) |
| 264 | WebRtc_Word32 SetAudioPacketSize(const WebRtc_UWord16 packetSizeSamples); |
| 265 | |
| 266 | // Set status and ID for header-extension-for-audio-level-indication. |
| 267 | WebRtc_Word32 SetAudioLevelIndicationStatus(const bool enable, |
| 268 | const WebRtc_UWord8 ID); |
| 269 | |
| 270 | // Get status and ID for header-extension-for-audio-level-indication. |
| 271 | WebRtc_Word32 AudioLevelIndicationStatus(bool& enable, |
| 272 | WebRtc_UWord8& ID) const; |
| 273 | |
| 274 | // Store the audio level in dBov for header-extension-for-audio-level-indication. |
| 275 | WebRtc_Word32 SetAudioLevel(const WebRtc_UWord8 level_dBov); |
| 276 | |
| 277 | // Set payload type for Redundant Audio Data RFC 2198 |
| 278 | WebRtc_Word32 SetRED(const WebRtc_Word8 payloadType); |
| 279 | |
| 280 | // Get payload type for Redundant Audio Data RFC 2198 |
| 281 | WebRtc_Word32 RED(WebRtc_Word8& payloadType) const; |
| 282 | |
| 283 | /* |
| 284 | * Video |
| 285 | */ |
| 286 | VideoCodecInformation* CodecInformationVideo(); |
| 287 | |
| 288 | RtpVideoCodecTypes VideoCodecType() const; |
| 289 | |
| 290 | WebRtc_UWord32 MaxConfiguredBitrateVideo() const; |
| 291 | |
| 292 | WebRtc_Word32 SendRTPIntraRequest(); |
| 293 | |
| 294 | // FEC |
| 295 | WebRtc_Word32 SetGenericFECStatus(const bool enable, |
| 296 | const WebRtc_UWord8 payloadTypeRED, |
| 297 | const WebRtc_UWord8 payloadTypeFEC); |
| 298 | |
| 299 | WebRtc_Word32 GenericFECStatus(bool& enable, |
| 300 | WebRtc_UWord8& payloadTypeRED, |
| 301 | WebRtc_UWord8& payloadTypeFEC) const; |
| 302 | |
| 303 | WebRtc_Word32 SetFECCodeRate(const WebRtc_UWord8 keyFrameCodeRate, |
marpan@google.com | 80c5d7a | 2011-07-15 21:32:40 +0000 | [diff] [blame] | 304 | const WebRtc_UWord8 deltaFrameCodeRate); |
| 305 | |
| 306 | WebRtc_Word32 SetFECUepProtection(const bool keyUseUepProtection, |
| 307 | const bool deltaUseUepProtection); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 308 | |
| 309 | protected: |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 310 | WebRtc_Word32 CheckPayloadType(const WebRtc_Word8 payloadType, |
| 311 | RtpVideoCodecTypes& videoType); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 312 | |
| 313 | private: |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 314 | void UpdateNACKBitRate(const WebRtc_UWord32 bytes, |
| 315 | const WebRtc_UWord32 now); |
| 316 | |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 317 | WebRtc_Word32 _id; |
| 318 | const bool _audioConfigured; |
| 319 | RTPSenderAudio* _audio; |
| 320 | RTPSenderVideo* _video; |
| 321 | |
henrike@webrtc.org | 65573f2 | 2011-12-13 19:17:27 +0000 | [diff] [blame] | 322 | CriticalSectionWrapper* _sendCritsect; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 323 | |
henrike@webrtc.org | 65573f2 | 2011-12-13 19:17:27 +0000 | [diff] [blame] | 324 | CriticalSectionWrapper* _transportCritsect; |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 325 | Transport* _transport; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 326 | |
| 327 | bool _sendingMedia; |
| 328 | |
| 329 | WebRtc_UWord16 _maxPayloadLength; |
| 330 | WebRtc_UWord16 _targetSendBitrate; |
| 331 | WebRtc_UWord16 _packetOverHead; |
| 332 | |
| 333 | WebRtc_Word8 _payloadType; |
| 334 | MapWrapper _payloadTypeMap; |
| 335 | |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 336 | RtpHeaderExtensionMap _rtpHeaderExtensionMap; |
| 337 | WebRtc_Word32 _transmissionTimeOffset; |
| 338 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 339 | bool _keepAliveIsActive; |
| 340 | WebRtc_Word8 _keepAlivePayloadType; |
| 341 | WebRtc_UWord32 _keepAliveLastSent; |
| 342 | WebRtc_UWord16 _keepAliveDeltaTimeSend; |
| 343 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 344 | // NACK |
| 345 | WebRtc_UWord32 _nackByteCountTimes[NACK_BYTECOUNT_SIZE]; |
| 346 | WebRtc_Word32 _nackByteCount[NACK_BYTECOUNT_SIZE]; |
stefan@webrtc.org | d0bdab0 | 2011-10-14 14:24:54 +0000 | [diff] [blame] | 347 | Bitrate _nackBitrate; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 348 | |
asapersson@webrtc.org | 0b3c35a | 2012-01-16 11:06:31 +0000 | [diff] [blame^] | 349 | RTPPacketHistory* _packetHistory; |
| 350 | TransmissionBucket _sendBucket; |
| 351 | WebRtc_UWord32 _timeLastSendToNetworkUpdate; |
| 352 | bool _transmissionSmoothing; |
| 353 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 354 | // statistics |
| 355 | WebRtc_UWord32 _packetsSent; |
| 356 | WebRtc_UWord32 _payloadBytesSent; |
| 357 | |
| 358 | // RTP variables |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 359 | bool _startTimeStampForced; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 360 | WebRtc_UWord32 _startTimeStamp; |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 361 | SSRCDatabase& _ssrcDB; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 362 | WebRtc_UWord32 _remoteSSRC; |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 363 | bool _sequenceNumberForced; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 364 | WebRtc_UWord16 _sequenceNumber; |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 365 | WebRtc_UWord16 _sequenceNumberRTX; |
asapersson@webrtc.org | 5249cc8 | 2011-12-16 14:31:37 +0000 | [diff] [blame] | 366 | bool _ssrcForced; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 367 | WebRtc_UWord32 _ssrc; |
| 368 | WebRtc_UWord32 _timeStamp; |
| 369 | WebRtc_UWord8 _CSRCs; |
| 370 | WebRtc_UWord32 _CSRC[kRtpCsrcSize]; |
| 371 | bool _includeCSRCs; |
pwestin@webrtc.org | 8281e7d | 2012-01-10 14:09:18 +0000 | [diff] [blame] | 372 | bool _RTX; |
| 373 | WebRtc_UWord32 _ssrcRTX; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 374 | }; |
| 375 | } // namespace webrtc |
| 376 | |
| 377 | #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ |