blob: 58bfca5084a0c8d4d8f6edb37b01add044aab08f [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
pwestin@webrtc.orgf6bb77a2012-01-24 17:16:59 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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
pwestin@webrtc.org00741872012-01-19 15:56:10 +000014#include <cassert>
15#include <cmath>
16#include <map>
17
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +000018#include "webrtc/common_types.h"
19#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
phoglund@webrtc.orgc38eef82013-01-07 10:18:30 +000020#include "webrtc/modules/rtp_rtcp/source/bitrate.h"
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +000021#include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
22#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
23#include "webrtc/modules/rtp_rtcp/source/ssrc_database.h"
24#include "webrtc/modules/rtp_rtcp/source/video_codec_information.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000025
niklase@google.com470e71d2011-07-07 08:21:25 +000026#define MAX_INIT_RTP_SEQ_NUMBER 32767 // 2^15 -1
27
28namespace webrtc {
29class CriticalSectionWrapper;
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +000030class PacedSender;
asapersson@webrtc.org0b3c35a2012-01-16 11:06:31 +000031class RTPPacketHistory;
niklase@google.com470e71d2011-07-07 08:21:25 +000032class RTPSenderAudio;
33class RTPSenderVideo;
34
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000035class RTPSenderInterface {
36 public:
37 RTPSenderInterface() {}
38 virtual ~RTPSenderInterface() {}
niklase@google.com470e71d2011-07-07 08:21:25 +000039
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000040 virtual WebRtc_UWord32 SSRC() const = 0;
41 virtual WebRtc_UWord32 Timestamp() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000042
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000043 virtual WebRtc_Word32 BuildRTPheader(WebRtc_UWord8* dataBuffer,
niklase@google.com470e71d2011-07-07 08:21:25 +000044 const WebRtc_Word8 payloadType,
45 const bool markerBit,
46 const WebRtc_UWord32 captureTimeStamp,
47 const bool timeStampProvided = true,
48 const bool incSequenceNumber = true) = 0;
49
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000050 virtual WebRtc_UWord16 RTPHeaderLength() const = 0;
51 virtual WebRtc_UWord16 IncrementSequenceNumber() = 0;
52 virtual WebRtc_UWord16 SequenceNumber() const = 0;
53 virtual WebRtc_UWord16 MaxPayloadLength() const = 0;
54 virtual WebRtc_UWord16 MaxDataPayloadLength() const = 0;
55 virtual WebRtc_UWord16 PacketOverHead() const = 0;
56 virtual WebRtc_UWord16 ActualSendBitrateKbit() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000057
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +000058 virtual WebRtc_Word32 SendToNetwork(uint8_t* data_buffer,
59 int payload_length,
60 int rtp_header_length,
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000061 int64_t capture_time_ms,
62 StorageType storage) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000063};
64
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000065class RTPSender : public Bitrate, public RTPSenderInterface {
66 public:
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +000067 RTPSender(const WebRtc_Word32 id,
68 const bool audio,
69 RtpRtcpClock* clock,
70 Transport* transport,
71 RtpAudioFeedback* audio_feedback,
72 PacedSender* paced_sender);
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000073 virtual ~RTPSender();
niklase@google.com470e71d2011-07-07 08:21:25 +000074
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000075 void ProcessBitrate();
niklase@google.com470e71d2011-07-07 08:21:25 +000076
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000077 WebRtc_UWord16 ActualSendBitrateKbit() const;
niklase@google.com470e71d2011-07-07 08:21:25 +000078
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000079 WebRtc_UWord32 VideoBitrateSent() const;
80 WebRtc_UWord32 FecOverheadRate() const;
81 WebRtc_UWord32 NackOverheadRate() const;
stefan@webrtc.orgd0bdab02011-10-14 14:24:54 +000082
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000083 void SetTargetSendBitrate(const WebRtc_UWord32 bits);
niklase@google.com470e71d2011-07-07 08:21:25 +000084
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000085 WebRtc_UWord16 MaxDataPayloadLength() const; // with RTP and FEC headers
niklase@google.com470e71d2011-07-07 08:21:25 +000086
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000087 WebRtc_Word32 RegisterPayload(
88 const char payloadName[RTP_PAYLOAD_NAME_SIZE],
89 const WebRtc_Word8 payloadType,
90 const WebRtc_UWord32 frequency,
91 const WebRtc_UWord8 channels,
92 const WebRtc_UWord32 rate);
niklase@google.com470e71d2011-07-07 08:21:25 +000093
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000094 WebRtc_Word32 DeRegisterSendPayload(const WebRtc_Word8 payloadType);
niklase@google.com470e71d2011-07-07 08:21:25 +000095
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000096 WebRtc_Word8 SendPayloadType() const;
niklase@google.com470e71d2011-07-07 08:21:25 +000097
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +000098 int SendPayloadFrequency() const;
niklase@google.com470e71d2011-07-07 08:21:25 +000099
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000100 void SetSendingStatus(const bool enabled);
niklase@google.com470e71d2011-07-07 08:21:25 +0000101
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000102 void SetSendingMediaStatus(const bool enabled);
103 bool SendingMedia() const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000104
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000105 // number of sent RTP packets
106 WebRtc_UWord32 Packets() const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000107
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000108 // number of sent RTP bytes
109 WebRtc_UWord32 Bytes() const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000110
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000111 void ResetDataCounters();
niklase@google.com470e71d2011-07-07 08:21:25 +0000112
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000113 WebRtc_UWord32 StartTimestamp() const;
114 void SetStartTimestamp(WebRtc_UWord32 timestamp, bool force);
niklase@google.com470e71d2011-07-07 08:21:25 +0000115
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000116 WebRtc_UWord32 GenerateNewSSRC();
117 void SetSSRC(const WebRtc_UWord32 ssrc);
niklase@google.com470e71d2011-07-07 08:21:25 +0000118
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000119 WebRtc_UWord16 SequenceNumber() const;
120 void SetSequenceNumber(WebRtc_UWord16 seq);
niklase@google.com470e71d2011-07-07 08:21:25 +0000121
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000122 WebRtc_Word32 CSRCs(WebRtc_UWord32 arrOfCSRC[kRtpCsrcSize]) const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000123
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000124 void SetCSRCStatus(const bool include);
niklase@google.com470e71d2011-07-07 08:21:25 +0000125
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000126 void SetCSRCs(const WebRtc_UWord32 arrOfCSRC[kRtpCsrcSize],
127 const WebRtc_UWord8 arrLength);
niklase@google.com470e71d2011-07-07 08:21:25 +0000128
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000129 WebRtc_Word32 SetMaxPayloadLength(const WebRtc_UWord16 length,
130 const WebRtc_UWord16 packetOverHead);
niklase@google.com470e71d2011-07-07 08:21:25 +0000131
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000132 WebRtc_Word32 SendOutgoingData(const FrameType frameType,
133 const WebRtc_Word8 payloadType,
134 const WebRtc_UWord32 timeStamp,
135 int64_t capture_time_ms,
136 const WebRtc_UWord8* payloadData,
137 const WebRtc_UWord32 payloadSize,
138 const RTPFragmentationHeader* fragmentation,
139 VideoCodecInformation* codecInfo = NULL,
140 const RTPVideoTypeHeader* rtpTypeHdr = NULL);
niklase@google.com470e71d2011-07-07 08:21:25 +0000141
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000142 WebRtc_Word32 SendPadData(WebRtc_Word8 payload_type,
143 WebRtc_UWord32 capture_timestamp,
144 int64_t capture_time_ms,
145 WebRtc_Word32 bytes);
146 /*
147 * RTP header extension
148 */
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000149 WebRtc_Word32 SetTransmissionTimeOffset(
150 const WebRtc_Word32 transmissionTimeOffset);
niklase@google.com470e71d2011-07-07 08:21:25 +0000151
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000152 WebRtc_Word32 RegisterRtpHeaderExtension(const RTPExtensionType type,
153 const WebRtc_UWord8 id);
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000154
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000155 WebRtc_Word32 DeregisterRtpHeaderExtension(const RTPExtensionType type);
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000156
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000157 WebRtc_UWord16 RtpHeaderExtensionTotalLength() const;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000158
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000159 WebRtc_UWord16 BuildRTPHeaderExtension(WebRtc_UWord8* dataBuffer) const;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000160
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000161 WebRtc_UWord8 BuildTransmissionTimeOffsetExtension(
162 WebRtc_UWord8* dataBuffer) const;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000163
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000164 bool UpdateTransmissionTimeOffset(WebRtc_UWord8* rtp_packet,
165 const WebRtc_UWord16 rtp_packet_length,
166 const WebRtcRTPHeader& rtp_header,
167 const WebRtc_Word64 time_diff_ms) const;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000168
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000169 void TimeToSendPacket(uint16_t sequence_number, int64_t capture_time_ms);
asapersson@webrtc.org0b3c35a2012-01-16 11:06:31 +0000170
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000171 /*
172 * NACK
173 */
174 int SelectiveRetransmissions() const;
175 int SetSelectiveRetransmissions(uint8_t settings);
176 void OnReceivedNACK(const WebRtc_UWord16 nackSequenceNumbersLength,
177 const WebRtc_UWord16* nackSequenceNumbers,
178 const WebRtc_UWord16 avgRTT);
asapersson@webrtc.org0b3c35a2012-01-16 11:06:31 +0000179
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000180 void SetStorePacketsStatus(const bool enable,
181 const WebRtc_UWord16 numberToStore);
niklase@google.com470e71d2011-07-07 08:21:25 +0000182
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000183 bool StorePackets() const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000184
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000185 WebRtc_Word32 ReSendPacket(WebRtc_UWord16 packet_id,
186 WebRtc_UWord32 min_resend_time = 0);
niklase@google.com470e71d2011-07-07 08:21:25 +0000187
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000188 WebRtc_Word32 ReSendToNetwork(const WebRtc_UWord8* packet,
189 const WebRtc_UWord32 size);
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000190
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000191 bool ProcessNACKBitRate(const WebRtc_UWord32 now);
niklase@google.com470e71d2011-07-07 08:21:25 +0000192
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000193 /*
194 * RTX
195 */
196 void SetRTXStatus(const bool enable,
197 const bool setSSRC,
198 const WebRtc_UWord32 SSRC);
niklase@google.com470e71d2011-07-07 08:21:25 +0000199
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000200 void RTXStatus(bool* enable, WebRtc_UWord32* SSRC) const;
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000201
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000202 /*
203 * Functions wrapping RTPSenderInterface
204 */
205 virtual WebRtc_Word32 BuildRTPheader(WebRtc_UWord8* dataBuffer,
206 const WebRtc_Word8 payloadType,
207 const bool markerBit,
208 const WebRtc_UWord32 captureTimeStamp,
209 const bool timeStampProvided = true,
210 const bool incSequenceNumber = true);
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000211
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000212 virtual WebRtc_UWord16 RTPHeaderLength() const ;
213 virtual WebRtc_UWord16 IncrementSequenceNumber();
214 virtual WebRtc_UWord16 MaxPayloadLength() const;
215 virtual WebRtc_UWord16 PacketOverHead() const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000216
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000217 // current timestamp
218 virtual WebRtc_UWord32 Timestamp() const;
219 virtual WebRtc_UWord32 SSRC() const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000220
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000221 virtual WebRtc_Word32 SendToNetwork(uint8_t* data_buffer,
222 int payload_length,
223 int rtp_header_length,
224 int64_t capture_time_ms,
225 StorageType storage);
226 /*
227 * Audio
228 */
229 // Send a DTMF tone using RFC 2833 (4733)
230 WebRtc_Word32 SendTelephoneEvent(const WebRtc_UWord8 key,
231 const WebRtc_UWord16 time_ms,
232 const WebRtc_UWord8 level);
niklase@google.com470e71d2011-07-07 08:21:25 +0000233
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000234 bool SendTelephoneEventActive(WebRtc_Word8& telephoneEvent) const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000235
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000236 // Set audio packet size, used to determine when it's time to send a DTMF
237 // packet in silence (CNG)
238 WebRtc_Word32 SetAudioPacketSize(const WebRtc_UWord16 packetSizeSamples);
niklase@google.com470e71d2011-07-07 08:21:25 +0000239
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000240 // Set status and ID for header-extension-for-audio-level-indication.
241 WebRtc_Word32 SetAudioLevelIndicationStatus(const bool enable,
242 const WebRtc_UWord8 ID);
niklase@google.com470e71d2011-07-07 08:21:25 +0000243
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000244 // Get status and ID for header-extension-for-audio-level-indication.
245 WebRtc_Word32 AudioLevelIndicationStatus(bool& enable,
246 WebRtc_UWord8& ID) const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000247
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000248 // Store the audio level in dBov for
249 // header-extension-for-audio-level-indication.
250 WebRtc_Word32 SetAudioLevel(const WebRtc_UWord8 level_dBov);
niklase@google.com470e71d2011-07-07 08:21:25 +0000251
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000252 // Set payload type for Redundant Audio Data RFC 2198
253 WebRtc_Word32 SetRED(const WebRtc_Word8 payloadType);
niklase@google.com470e71d2011-07-07 08:21:25 +0000254
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000255 // Get payload type for Redundant Audio Data RFC 2198
256 WebRtc_Word32 RED(WebRtc_Word8& payloadType) const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000257
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000258 /*
259 * Video
260 */
261 VideoCodecInformation* CodecInformationVideo();
niklase@google.com470e71d2011-07-07 08:21:25 +0000262
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000263 RtpVideoCodecTypes VideoCodecType() const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000264
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000265 WebRtc_UWord32 MaxConfiguredBitrateVideo() const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000266
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000267 WebRtc_Word32 SendRTPIntraRequest();
niklase@google.com470e71d2011-07-07 08:21:25 +0000268
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000269 // FEC
270 WebRtc_Word32 SetGenericFECStatus(const bool enable,
271 const WebRtc_UWord8 payloadTypeRED,
272 const WebRtc_UWord8 payloadTypeFEC);
niklase@google.com470e71d2011-07-07 08:21:25 +0000273
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000274 WebRtc_Word32 GenericFECStatus(bool& enable,
275 WebRtc_UWord8& payloadTypeRED,
276 WebRtc_UWord8& payloadTypeFEC) const;
niklase@google.com470e71d2011-07-07 08:21:25 +0000277
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000278 WebRtc_Word32 SetFecParameters(
279 const FecProtectionParams* delta_params,
280 const FecProtectionParams* key_params);
niklase@google.com470e71d2011-07-07 08:21:25 +0000281
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000282 protected:
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000283 WebRtc_Word32 CheckPayloadType(const WebRtc_Word8 payloadType,
284 RtpVideoCodecTypes& videoType);
niklase@google.com470e71d2011-07-07 08:21:25 +0000285
pwestin@webrtc.orgc66e8b32012-11-07 17:01:04 +0000286 private:
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000287 void UpdateNACKBitRate(const WebRtc_UWord32 bytes,
288 const WebRtc_UWord32 now);
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000289
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000290 WebRtc_Word32 SendPaddingAccordingToBitrate(
291 WebRtc_Word8 payload_type,
292 WebRtc_UWord32 capture_timestamp,
293 int64_t capture_time_ms);
phoglund@webrtc.orgbaaf2432012-05-31 10:47:35 +0000294
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000295 WebRtc_Word32 _id;
296 const bool _audioConfigured;
297 RTPSenderAudio* _audio;
298 RTPSenderVideo* _video;
phoglund@webrtc.orgbaaf2432012-05-31 10:47:35 +0000299
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000300 PacedSender* paced_sender_;
301 CriticalSectionWrapper* _sendCritsect;
niklase@google.com470e71d2011-07-07 08:21:25 +0000302
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000303 Transport* _transport;
304 bool _sendingMedia;
niklase@google.com470e71d2011-07-07 08:21:25 +0000305
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000306 WebRtc_UWord16 _maxPayloadLength;
307 WebRtc_UWord16 _targetSendBitrate;
308 WebRtc_UWord16 _packetOverHead;
niklase@google.com470e71d2011-07-07 08:21:25 +0000309
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000310 WebRtc_Word8 _payloadType;
311 std::map<WebRtc_Word8, ModuleRTPUtility::Payload*> _payloadTypeMap;
niklase@google.com470e71d2011-07-07 08:21:25 +0000312
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000313 RtpHeaderExtensionMap _rtpHeaderExtensionMap;
314 WebRtc_Word32 _transmissionTimeOffset;
niklase@google.com470e71d2011-07-07 08:21:25 +0000315
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000316 // NACK
317 WebRtc_UWord32 _nackByteCountTimes[NACK_BYTECOUNT_SIZE];
318 WebRtc_Word32 _nackByteCount[NACK_BYTECOUNT_SIZE];
319 Bitrate _nackBitrate;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000320
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000321 RTPPacketHistory* _packetHistory;
niklase@google.com470e71d2011-07-07 08:21:25 +0000322
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000323 // Statistics
324 WebRtc_UWord32 _packetsSent;
325 WebRtc_UWord32 _payloadBytesSent;
asapersson@webrtc.org0b3c35a2012-01-16 11:06:31 +0000326
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000327 // RTP variables
328 bool _startTimeStampForced;
329 WebRtc_UWord32 _startTimeStamp;
330 SSRCDatabase& _ssrcDB;
331 WebRtc_UWord32 _remoteSSRC;
332 bool _sequenceNumberForced;
333 WebRtc_UWord16 _sequenceNumber;
334 WebRtc_UWord16 _sequenceNumberRTX;
335 bool _ssrcForced;
336 WebRtc_UWord32 _ssrc;
337 WebRtc_UWord32 _timeStamp;
338 WebRtc_UWord8 _CSRCs;
339 WebRtc_UWord32 _CSRC[kRtpCsrcSize];
340 bool _includeCSRCs;
341 bool _RTX;
342 WebRtc_UWord32 _ssrcRTX;
niklase@google.com470e71d2011-07-07 08:21:25 +0000343};
344} // namespace webrtc
345
346#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_