andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 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 | |
andrew@webrtc.org | 5cf83f4 | 2013-09-09 17:50:10 | [diff] [blame] | 11 | #ifndef WEBRTC_COMMON_TYPES_H_ |
| 12 | #define WEBRTC_COMMON_TYPES_H_ |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 13 | |
pbos@webrtc.org | e2a7a77 | 2014-03-19 08:43:57 | [diff] [blame] | 14 | #include <stddef.h> |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 15 | #include <string.h> |
pbos@webrtc.org | 7e68693 | 2014-05-15 09:35:06 | [diff] [blame] | 16 | |
| 17 | #include <string> |
pbos@webrtc.org | e2a7a77 | 2014-03-19 08:43:57 | [diff] [blame] | 18 | #include <vector> |
| 19 | |
andrew@webrtc.org | 5cf83f4 | 2013-09-09 17:50:10 | [diff] [blame] | 20 | #include "webrtc/typedefs.h" |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 21 | |
| 22 | #if defined(_MSC_VER) |
| 23 | // Disable "new behavior: elements of array will be default initialized" |
| 24 | // warning. Affects OverUseDetectorOptions. |
| 25 | #pragma warning(disable:4351) |
| 26 | #endif |
| 27 | |
| 28 | #ifdef WEBRTC_EXPORT |
| 29 | #define WEBRTC_DLLEXPORT _declspec(dllexport) |
| 30 | #elif WEBRTC_DLL |
| 31 | #define WEBRTC_DLLEXPORT _declspec(dllimport) |
| 32 | #else |
| 33 | #define WEBRTC_DLLEXPORT |
| 34 | #endif |
| 35 | |
| 36 | #ifndef NULL |
| 37 | #define NULL 0 |
| 38 | #endif |
| 39 | |
| 40 | #define RTP_PAYLOAD_NAME_SIZE 32 |
| 41 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 42 | #if defined(WEBRTC_WIN) || defined(WIN32) |
andrew@webrtc.org | 5cf83f4 | 2013-09-09 17:50:10 | [diff] [blame] | 43 | // Compares two strings without regard to case. |
| 44 | #define STR_CASE_CMP(s1, s2) ::_stricmp(s1, s2) |
| 45 | // Compares characters of two strings without regard to case. |
| 46 | #define STR_NCASE_CMP(s1, s2, n) ::_strnicmp(s1, s2, n) |
| 47 | #else |
| 48 | #define STR_CASE_CMP(s1, s2) ::strcasecmp(s1, s2) |
| 49 | #define STR_NCASE_CMP(s1, s2, n) ::strncasecmp(s1, s2, n) |
| 50 | #endif |
| 51 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 52 | namespace webrtc { |
| 53 | |
andresp@webrtc.org | ee6f8a2 | 2013-05-14 08:02:25 | [diff] [blame] | 54 | class Config; |
| 55 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 56 | class InStream |
| 57 | { |
| 58 | public: |
| 59 | virtual int Read(void *buf,int len) = 0; |
| 60 | virtual int Rewind() {return -1;} |
| 61 | virtual ~InStream() {} |
| 62 | protected: |
| 63 | InStream() {} |
| 64 | }; |
| 65 | |
| 66 | class OutStream |
| 67 | { |
| 68 | public: |
| 69 | virtual bool Write(const void *buf,int len) = 0; |
| 70 | virtual int Rewind() {return -1;} |
| 71 | virtual ~OutStream() {} |
| 72 | protected: |
| 73 | OutStream() {} |
| 74 | }; |
| 75 | |
| 76 | enum TraceModule |
| 77 | { |
pbos@webrtc.org | 46f7288 | 2013-12-16 12:24:44 | [diff] [blame] | 78 | kTraceUndefined = 0, |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 79 | // not a module, triggered from the engine code |
pbos@webrtc.org | 46f7288 | 2013-12-16 12:24:44 | [diff] [blame] | 80 | kTraceVoice = 0x0001, |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 81 | // not a module, triggered from the engine code |
pbos@webrtc.org | 46f7288 | 2013-12-16 12:24:44 | [diff] [blame] | 82 | kTraceVideo = 0x0002, |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 83 | // not a module, triggered from the utility code |
pbos@webrtc.org | 46f7288 | 2013-12-16 12:24:44 | [diff] [blame] | 84 | kTraceUtility = 0x0003, |
| 85 | kTraceRtpRtcp = 0x0004, |
| 86 | kTraceTransport = 0x0005, |
| 87 | kTraceSrtp = 0x0006, |
| 88 | kTraceAudioCoding = 0x0007, |
| 89 | kTraceAudioMixerServer = 0x0008, |
| 90 | kTraceAudioMixerClient = 0x0009, |
| 91 | kTraceFile = 0x000a, |
| 92 | kTraceAudioProcessing = 0x000b, |
| 93 | kTraceVideoCoding = 0x0010, |
| 94 | kTraceVideoMixer = 0x0011, |
| 95 | kTraceAudioDevice = 0x0012, |
| 96 | kTraceVideoRenderer = 0x0014, |
| 97 | kTraceVideoCapture = 0x0015, |
pbos@webrtc.org | 46f7288 | 2013-12-16 12:24:44 | [diff] [blame] | 98 | kTraceRemoteBitrateEstimator = 0x0017, |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 99 | }; |
| 100 | |
| 101 | enum TraceLevel |
| 102 | { |
| 103 | kTraceNone = 0x0000, // no trace |
| 104 | kTraceStateInfo = 0x0001, |
| 105 | kTraceWarning = 0x0002, |
| 106 | kTraceError = 0x0004, |
| 107 | kTraceCritical = 0x0008, |
| 108 | kTraceApiCall = 0x0010, |
| 109 | kTraceDefault = 0x00ff, |
| 110 | |
| 111 | kTraceModuleCall = 0x0020, |
| 112 | kTraceMemory = 0x0100, // memory info |
| 113 | kTraceTimer = 0x0200, // timing info |
| 114 | kTraceStream = 0x0400, // "continuous" stream of data |
| 115 | |
| 116 | // used for debug purposes |
| 117 | kTraceDebug = 0x0800, // debug |
| 118 | kTraceInfo = 0x1000, // debug info |
| 119 | |
andrew@webrtc.org | bc687c5 | 2012-11-20 07:34:45 | [diff] [blame] | 120 | // Non-verbose level used by LS_INFO of logging.h. Do not use directly. |
| 121 | kTraceTerseInfo = 0x2000, |
| 122 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 123 | kTraceAll = 0xffff |
| 124 | }; |
| 125 | |
| 126 | // External Trace API |
andrew@webrtc.org | d75680a | 2012-11-15 05:33:25 | [diff] [blame] | 127 | class TraceCallback { |
| 128 | public: |
| 129 | virtual void Print(TraceLevel level, const char* message, int length) = 0; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 130 | |
andrew@webrtc.org | d75680a | 2012-11-15 05:33:25 | [diff] [blame] | 131 | protected: |
| 132 | virtual ~TraceCallback() {} |
| 133 | TraceCallback() {} |
| 134 | }; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 135 | |
| 136 | enum FileFormats |
| 137 | { |
| 138 | kFileFormatWavFile = 1, |
| 139 | kFileFormatCompressedFile = 2, |
| 140 | kFileFormatAviFile = 3, |
| 141 | kFileFormatPreencodedFile = 4, |
| 142 | kFileFormatPcm16kHzFile = 7, |
| 143 | kFileFormatPcm8kHzFile = 8, |
| 144 | kFileFormatPcm32kHzFile = 9 |
| 145 | }; |
| 146 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 147 | enum ProcessingTypes |
| 148 | { |
| 149 | kPlaybackPerChannel = 0, |
| 150 | kPlaybackAllChannelsMixed, |
| 151 | kRecordingPerChannel, |
| 152 | kRecordingAllChannelsMixed, |
| 153 | kRecordingPreprocessing |
| 154 | }; |
| 155 | |
sprang@webrtc.org | 5fdd10a | 2013-12-04 15:09:27 | [diff] [blame] | 156 | enum FrameType |
| 157 | { |
| 158 | kFrameEmpty = 0, |
| 159 | kAudioFrameSpeech = 1, |
| 160 | kAudioFrameCN = 2, |
| 161 | kVideoFrameKey = 3, // independent frame |
| 162 | kVideoFrameDelta = 4, // depends on the previus frame |
| 163 | }; |
| 164 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 165 | // External transport callback interface |
| 166 | class Transport |
| 167 | { |
| 168 | public: |
| 169 | virtual int SendPacket(int channel, const void *data, int len) = 0; |
| 170 | virtual int SendRTCPPacket(int channel, const void *data, int len) = 0; |
| 171 | |
| 172 | protected: |
| 173 | virtual ~Transport() {} |
| 174 | Transport() {} |
| 175 | }; |
| 176 | |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 177 | // Statistics for an RTCP channel |
sprang@webrtc.org | 2714c79 | 2013-10-28 09:21:07 | [diff] [blame] | 178 | struct RtcpStatistics { |
sprang@webrtc.org | 2714c79 | 2013-10-28 09:21:07 | [diff] [blame] | 179 | RtcpStatistics() |
| 180 | : fraction_lost(0), |
| 181 | cumulative_lost(0), |
| 182 | extended_max_sequence_number(0), |
sprang@webrtc.org | 9b30fd3 | 2013-12-05 09:48:44 | [diff] [blame] | 183 | jitter(0) {} |
sprang@webrtc.org | 2714c79 | 2013-10-28 09:21:07 | [diff] [blame] | 184 | |
| 185 | uint8_t fraction_lost; |
| 186 | uint32_t cumulative_lost; |
| 187 | uint32_t extended_max_sequence_number; |
| 188 | uint32_t jitter; |
sprang@webrtc.org | 2714c79 | 2013-10-28 09:21:07 | [diff] [blame] | 189 | }; |
| 190 | |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 191 | // Callback, called whenever a new rtcp report block is transmitted. |
| 192 | class RtcpStatisticsCallback { |
| 193 | public: |
| 194 | virtual ~RtcpStatisticsCallback() {} |
| 195 | |
| 196 | virtual void StatisticsUpdated(const RtcpStatistics& statistics, |
| 197 | uint32_t ssrc) = 0; |
| 198 | }; |
| 199 | |
asapersson@webrtc.org | 4a15560 | 2014-02-19 11:59:02 | [diff] [blame] | 200 | // Statistics for RTCP packet types. |
| 201 | struct RtcpPacketTypeCounter { |
| 202 | RtcpPacketTypeCounter() |
| 203 | : nack_packets(0), |
| 204 | fir_packets(0), |
asapersson@webrtc.org | 2ba45ee | 2014-10-29 12:42:30 | [diff] [blame] | 205 | pli_packets(0), |
| 206 | nack_requests(0), |
| 207 | unique_nack_requests(0) {} |
asapersson@webrtc.org | 4a15560 | 2014-02-19 11:59:02 | [diff] [blame] | 208 | |
| 209 | void Add(const RtcpPacketTypeCounter& other) { |
| 210 | nack_packets += other.nack_packets; |
| 211 | fir_packets += other.fir_packets; |
| 212 | pli_packets += other.pli_packets; |
asapersson@webrtc.org | 2ba45ee | 2014-10-29 12:42:30 | [diff] [blame] | 213 | nack_requests += other.nack_requests; |
| 214 | unique_nack_requests += other.unique_nack_requests; |
asapersson@webrtc.org | 4a15560 | 2014-02-19 11:59:02 | [diff] [blame] | 215 | } |
| 216 | |
asapersson@webrtc.org | 2ba45ee | 2014-10-29 12:42:30 | [diff] [blame] | 217 | int UniqueNackRequestsInPercent() const { |
| 218 | if (nack_requests == 0) { |
| 219 | return 0; |
| 220 | } |
| 221 | return static_cast<int>( |
| 222 | (unique_nack_requests * 100.0f / nack_requests) + 0.5f); |
| 223 | } |
| 224 | |
| 225 | uint32_t nack_packets; // Number of RTCP NACK packets. |
| 226 | uint32_t fir_packets; // Number of RTCP FIR packets. |
| 227 | uint32_t pli_packets; // Number of RTCP PLI packets. |
| 228 | uint32_t nack_requests; // Number of NACKed RTP packets. |
| 229 | uint32_t unique_nack_requests; // Number of unique NACKed RTP packets. |
asapersson@webrtc.org | 4a15560 | 2014-02-19 11:59:02 | [diff] [blame] | 230 | }; |
| 231 | |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 232 | // Data usage statistics for a (rtp) stream |
| 233 | struct StreamDataCounters { |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 234 | StreamDataCounters() |
| 235 | : bytes(0), |
sprang@webrtc.org | b113981 | 2013-12-05 14:29:02 | [diff] [blame] | 236 | header_bytes(0), |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 237 | padding_bytes(0), |
| 238 | packets(0), |
| 239 | retransmitted_packets(0), |
| 240 | fec_packets(0) {} |
| 241 | |
pbos@webrtc.org | 9aa3497 | 2014-07-10 16:24:54 | [diff] [blame] | 242 | // TODO(pbos): Rename bytes -> media_bytes. |
sprang@webrtc.org | b113981 | 2013-12-05 14:29:02 | [diff] [blame] | 243 | uint32_t bytes; // Payload bytes, excluding RTP headers and padding. |
| 244 | uint32_t header_bytes; // Number of bytes used by RTP headers. |
| 245 | uint32_t padding_bytes; // Number of padding bytes. |
| 246 | uint32_t packets; // Number of packets. |
| 247 | uint32_t retransmitted_packets; // Number of retransmitted packets. |
| 248 | uint32_t fec_packets; // Number of redundancy packets. |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 249 | }; |
| 250 | |
| 251 | // Callback, called whenever byte/packet counts have been updated. |
| 252 | class StreamDataCountersCallback { |
| 253 | public: |
| 254 | virtual ~StreamDataCountersCallback() {} |
| 255 | |
| 256 | virtual void DataCountersUpdated(const StreamDataCounters& counters, |
| 257 | uint32_t ssrc) = 0; |
| 258 | }; |
| 259 | |
| 260 | // Rate statistics for a stream |
| 261 | struct BitrateStatistics { |
sprang@webrtc.org | b70db6d | 2013-12-13 09:46:59 | [diff] [blame] | 262 | BitrateStatistics() : bitrate_bps(0), packet_rate(0), timestamp_ms(0) {} |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 263 | |
sprang@webrtc.org | b70db6d | 2013-12-13 09:46:59 | [diff] [blame] | 264 | uint32_t bitrate_bps; // Bitrate in bits per second. |
| 265 | uint32_t packet_rate; // Packet rate in packets per second. |
| 266 | uint64_t timestamp_ms; // Ntp timestamp in ms at time of rate estimation. |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 267 | }; |
| 268 | |
| 269 | // Callback, used to notify an observer whenever new rates have been estimated. |
| 270 | class BitrateStatisticsObserver { |
| 271 | public: |
| 272 | virtual ~BitrateStatisticsObserver() {} |
| 273 | |
stefan@webrtc.org | 5232267 | 2014-11-05 14:05:29 | [diff] [blame] | 274 | virtual void Notify(const BitrateStatistics& total_stats, |
| 275 | const BitrateStatistics& retransmit_stats, |
| 276 | uint32_t ssrc) = 0; |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 277 | }; |
| 278 | |
| 279 | // Callback, used to notify an observer whenever frame counts have been updated |
| 280 | class FrameCountObserver { |
| 281 | public: |
sprang@webrtc.org | 21dc10d | 2013-11-21 09:09:54 | [diff] [blame] | 282 | virtual ~FrameCountObserver() {} |
sprang@webrtc.org | 5fdd10a | 2013-12-04 15:09:27 | [diff] [blame] | 283 | virtual void FrameCountUpdated(FrameType frame_type, |
| 284 | uint32_t frame_count, |
| 285 | const unsigned int ssrc) = 0; |
sprang@webrtc.org | 4673674 | 2013-11-20 16:47:07 | [diff] [blame] | 286 | }; |
| 287 | |
stefan@webrtc.org | 55b0f2e | 2014-07-11 13:44:02 | [diff] [blame] | 288 | // Callback, used to notify an observer whenever the send-side delay is updated. |
| 289 | class SendSideDelayObserver { |
| 290 | public: |
| 291 | virtual ~SendSideDelayObserver() {} |
| 292 | virtual void SendSideDelayUpdated(int avg_delay_ms, |
| 293 | int max_delay_ms, |
| 294 | uint32_t ssrc) = 0; |
| 295 | }; |
| 296 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 297 | // ================================================================== |
| 298 | // Voice specific types |
| 299 | // ================================================================== |
| 300 | |
| 301 | // Each codec supported can be described by this structure. |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 302 | struct CodecInst { |
| 303 | int pltype; |
| 304 | char plname[RTP_PAYLOAD_NAME_SIZE]; |
| 305 | int plfreq; |
| 306 | int pacsize; |
| 307 | int channels; |
| 308 | int rate; // bits/sec unlike {start,min,max}Bitrate elsewhere in this file! |
| 309 | |
| 310 | bool operator==(const CodecInst& other) const { |
| 311 | return pltype == other.pltype && |
| 312 | (STR_CASE_CMP(plname, other.plname) == 0) && |
| 313 | plfreq == other.plfreq && |
| 314 | pacsize == other.pacsize && |
| 315 | channels == other.channels && |
| 316 | rate == other.rate; |
| 317 | } |
| 318 | |
| 319 | bool operator!=(const CodecInst& other) const { |
| 320 | return !(*this == other); |
| 321 | } |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 322 | }; |
| 323 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 324 | // RTP |
| 325 | enum {kRtpCsrcSize = 15}; // RFC 3550 page 13 |
| 326 | |
| 327 | enum RTPDirections |
| 328 | { |
| 329 | kRtpIncoming = 0, |
| 330 | kRtpOutgoing |
| 331 | }; |
| 332 | |
| 333 | enum PayloadFrequencies |
| 334 | { |
| 335 | kFreq8000Hz = 8000, |
| 336 | kFreq16000Hz = 16000, |
| 337 | kFreq32000Hz = 32000 |
| 338 | }; |
| 339 | |
| 340 | enum VadModes // degree of bandwidth reduction |
| 341 | { |
| 342 | kVadConventional = 0, // lowest reduction |
| 343 | kVadAggressiveLow, |
| 344 | kVadAggressiveMid, |
| 345 | kVadAggressiveHigh // highest reduction |
| 346 | }; |
| 347 | |
| 348 | struct NetworkStatistics // NETEQ statistics |
| 349 | { |
| 350 | // current jitter buffer size in ms |
pbos@webrtc.org | 52b2ee5 | 2013-05-03 12:02:11 | [diff] [blame] | 351 | uint16_t currentBufferSize; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 352 | // preferred (optimal) buffer size in ms |
pbos@webrtc.org | 52b2ee5 | 2013-05-03 12:02:11 | [diff] [blame] | 353 | uint16_t preferredBufferSize; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 354 | // adding extra delay due to "peaky jitter" |
| 355 | bool jitterPeaksFound; |
henrik.lundin@webrtc.org | 6e7480a | 2014-10-09 12:58:45 | [diff] [blame] | 356 | // Loss rate (network + late); fraction between 0 and 1, scaled to Q14. |
pbos@webrtc.org | 52b2ee5 | 2013-05-03 12:02:11 | [diff] [blame] | 357 | uint16_t currentPacketLossRate; |
henrik.lundin@webrtc.org | 6e7480a | 2014-10-09 12:58:45 | [diff] [blame] | 358 | // Late loss rate; fraction between 0 and 1, scaled to Q14. |
pbos@webrtc.org | 52b2ee5 | 2013-05-03 12:02:11 | [diff] [blame] | 359 | uint16_t currentDiscardRate; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 360 | // fraction (of original stream) of synthesized speech inserted through |
| 361 | // expansion (in Q14) |
pbos@webrtc.org | 52b2ee5 | 2013-05-03 12:02:11 | [diff] [blame] | 362 | uint16_t currentExpandRate; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 363 | // fraction of synthesized speech inserted through pre-emptive expansion |
| 364 | // (in Q14) |
pbos@webrtc.org | 52b2ee5 | 2013-05-03 12:02:11 | [diff] [blame] | 365 | uint16_t currentPreemptiveRate; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 366 | // fraction of data removed through acceleration (in Q14) |
pbos@webrtc.org | 52b2ee5 | 2013-05-03 12:02:11 | [diff] [blame] | 367 | uint16_t currentAccelerateRate; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 368 | // clock-drift in parts-per-million (negative or positive) |
| 369 | int32_t clockDriftPPM; |
| 370 | // average packet waiting time in the jitter buffer (ms) |
| 371 | int meanWaitingTimeMs; |
| 372 | // median packet waiting time in the jitter buffer (ms) |
| 373 | int medianWaitingTimeMs; |
| 374 | // min packet waiting time in the jitter buffer (ms) |
| 375 | int minWaitingTimeMs; |
| 376 | // max packet waiting time in the jitter buffer (ms) |
| 377 | int maxWaitingTimeMs; |
roosa@google.com | 0049a76 | 2012-12-14 00:06:18 | [diff] [blame] | 378 | // added samples in off mode due to packet loss |
| 379 | int addedSamples; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 380 | }; |
| 381 | |
wu@webrtc.org | 79d6daf | 2013-12-13 19:17:43 | [diff] [blame] | 382 | // Statistics for calls to AudioCodingModule::PlayoutData10Ms(). |
| 383 | struct AudioDecodingCallStats { |
| 384 | AudioDecodingCallStats() |
| 385 | : calls_to_silence_generator(0), |
| 386 | calls_to_neteq(0), |
| 387 | decoded_normal(0), |
| 388 | decoded_plc(0), |
| 389 | decoded_cng(0), |
| 390 | decoded_plc_cng(0) {} |
| 391 | |
| 392 | int calls_to_silence_generator; // Number of calls where silence generated, |
| 393 | // and NetEq was disengaged from decoding. |
| 394 | int calls_to_neteq; // Number of calls to NetEq. |
| 395 | int decoded_normal; // Number of calls where audio RTP packet decoded. |
| 396 | int decoded_plc; // Number of calls resulted in PLC. |
| 397 | int decoded_cng; // Number of calls where comfort noise generated due to DTX. |
| 398 | int decoded_plc_cng; // Number of calls resulted where PLC faded to CNG. |
| 399 | }; |
| 400 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 401 | typedef struct |
| 402 | { |
| 403 | int min; // minumum |
| 404 | int max; // maximum |
| 405 | int average; // average |
| 406 | } StatVal; |
| 407 | |
| 408 | typedef struct // All levels are reported in dBm0 |
| 409 | { |
| 410 | StatVal speech_rx; // long-term speech levels on receiving side |
| 411 | StatVal speech_tx; // long-term speech levels on transmitting side |
| 412 | StatVal noise_rx; // long-term noise/silence levels on receiving side |
| 413 | StatVal noise_tx; // long-term noise/silence levels on transmitting side |
| 414 | } LevelStatistics; |
| 415 | |
| 416 | typedef struct // All levels are reported in dB |
| 417 | { |
| 418 | StatVal erl; // Echo Return Loss |
| 419 | StatVal erle; // Echo Return Loss Enhancement |
| 420 | StatVal rerl; // RERL = ERL + ERLE |
| 421 | // Echo suppression inside EC at the point just before its NLP |
| 422 | StatVal a_nlp; |
| 423 | } EchoStatistics; |
| 424 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 425 | enum NsModes // type of Noise Suppression |
| 426 | { |
| 427 | kNsUnchanged = 0, // previously set mode |
| 428 | kNsDefault, // platform default |
| 429 | kNsConference, // conferencing default |
| 430 | kNsLowSuppression, // lowest suppression |
| 431 | kNsModerateSuppression, |
| 432 | kNsHighSuppression, |
| 433 | kNsVeryHighSuppression, // highest suppression |
| 434 | }; |
| 435 | |
| 436 | enum AgcModes // type of Automatic Gain Control |
| 437 | { |
| 438 | kAgcUnchanged = 0, // previously set mode |
| 439 | kAgcDefault, // platform default |
| 440 | // adaptive mode for use when analog volume control exists (e.g. for |
| 441 | // PC softphone) |
| 442 | kAgcAdaptiveAnalog, |
| 443 | // scaling takes place in the digital domain (e.g. for conference servers |
| 444 | // and embedded devices) |
| 445 | kAgcAdaptiveDigital, |
| 446 | // can be used on embedded devices where the capture signal level |
| 447 | // is predictable |
| 448 | kAgcFixedDigital |
| 449 | }; |
| 450 | |
| 451 | // EC modes |
| 452 | enum EcModes // type of Echo Control |
| 453 | { |
| 454 | kEcUnchanged = 0, // previously set mode |
| 455 | kEcDefault, // platform default |
| 456 | kEcConference, // conferencing default (aggressive AEC) |
| 457 | kEcAec, // Acoustic Echo Cancellation |
| 458 | kEcAecm, // AEC mobile |
| 459 | }; |
| 460 | |
| 461 | // AECM modes |
| 462 | enum AecmModes // mode of AECM |
| 463 | { |
| 464 | kAecmQuietEarpieceOrHeadset = 0, |
| 465 | // Quiet earpiece or headset use |
| 466 | kAecmEarpiece, // most earpiece use |
| 467 | kAecmLoudEarpiece, // Loud earpiece or quiet speakerphone use |
| 468 | kAecmSpeakerphone, // most speakerphone use (default) |
| 469 | kAecmLoudSpeakerphone // Loud speakerphone |
| 470 | }; |
| 471 | |
| 472 | // AGC configuration |
| 473 | typedef struct |
| 474 | { |
| 475 | unsigned short targetLeveldBOv; |
| 476 | unsigned short digitalCompressionGaindB; |
| 477 | bool limiterEnable; |
| 478 | } AgcConfig; // AGC configuration parameters |
| 479 | |
| 480 | enum StereoChannel |
| 481 | { |
| 482 | kStereoLeft = 0, |
| 483 | kStereoRight, |
| 484 | kStereoBoth |
| 485 | }; |
| 486 | |
| 487 | // Audio device layers |
| 488 | enum AudioLayers |
| 489 | { |
| 490 | kAudioPlatformDefault = 0, |
| 491 | kAudioWindowsWave = 1, |
| 492 | kAudioWindowsCore = 2, |
| 493 | kAudioLinuxAlsa = 3, |
| 494 | kAudioLinuxPulse = 4 |
| 495 | }; |
| 496 | |
henrika@webrtc.org | 692224a | 2014-04-17 10:45:01 | [diff] [blame] | 497 | // TODO(henrika): to be removed. |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 498 | enum NetEqModes // NetEQ playout configurations |
| 499 | { |
| 500 | // Optimized trade-off between low delay and jitter robustness for two-way |
| 501 | // communication. |
| 502 | kNetEqDefault = 0, |
| 503 | // Improved jitter robustness at the cost of increased delay. Can be |
| 504 | // used in one-way communication. |
| 505 | kNetEqStreaming = 1, |
| 506 | // Optimzed for decodability of fax signals rather than for perceived audio |
| 507 | // quality. |
| 508 | kNetEqFax = 2, |
roosa@google.com | 90d333e | 2012-12-12 21:59:14 | [diff] [blame] | 509 | // Minimal buffer management. Inserts zeros for lost packets and during |
| 510 | // buffer increases. |
| 511 | kNetEqOff = 3, |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 512 | }; |
| 513 | |
henrika@webrtc.org | 692224a | 2014-04-17 10:45:01 | [diff] [blame] | 514 | // TODO(henrika): to be removed. |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 515 | enum OnHoldModes // On Hold direction |
| 516 | { |
| 517 | kHoldSendAndPlay = 0, // Put both sending and playing in on-hold state. |
| 518 | kHoldSendOnly, // Put only sending in on-hold state. |
| 519 | kHoldPlayOnly // Put only playing in on-hold state. |
| 520 | }; |
| 521 | |
henrika@webrtc.org | 692224a | 2014-04-17 10:45:01 | [diff] [blame] | 522 | // TODO(henrika): to be removed. |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 523 | enum AmrMode |
| 524 | { |
| 525 | kRfc3267BwEfficient = 0, |
| 526 | kRfc3267OctetAligned = 1, |
| 527 | kRfc3267FileStorage = 2, |
| 528 | }; |
| 529 | |
| 530 | // ================================================================== |
| 531 | // Video specific types |
| 532 | // ================================================================== |
| 533 | |
| 534 | // Raw video types |
| 535 | enum RawVideoType |
| 536 | { |
| 537 | kVideoI420 = 0, |
| 538 | kVideoYV12 = 1, |
| 539 | kVideoYUY2 = 2, |
| 540 | kVideoUYVY = 3, |
| 541 | kVideoIYUV = 4, |
| 542 | kVideoARGB = 5, |
| 543 | kVideoRGB24 = 6, |
| 544 | kVideoRGB565 = 7, |
| 545 | kVideoARGB4444 = 8, |
| 546 | kVideoARGB1555 = 9, |
| 547 | kVideoMJPEG = 10, |
| 548 | kVideoNV12 = 11, |
| 549 | kVideoNV21 = 12, |
| 550 | kVideoBGRA = 13, |
| 551 | kVideoUnknown = 99 |
| 552 | }; |
| 553 | |
| 554 | // Video codec |
| 555 | enum { kConfigParameterSize = 128}; |
| 556 | enum { kPayloadNameSize = 32}; |
| 557 | enum { kMaxSimulcastStreams = 4}; |
| 558 | enum { kMaxTemporalStreams = 4}; |
| 559 | |
| 560 | enum VideoCodecComplexity |
| 561 | { |
| 562 | kComplexityNormal = 0, |
| 563 | kComplexityHigh = 1, |
| 564 | kComplexityHigher = 2, |
| 565 | kComplexityMax = 3 |
| 566 | }; |
| 567 | |
| 568 | enum VideoCodecProfile |
| 569 | { |
| 570 | kProfileBase = 0x00, |
| 571 | kProfileMain = 0x01 |
| 572 | }; |
| 573 | |
| 574 | enum VP8ResilienceMode { |
| 575 | kResilienceOff, // The stream produced by the encoder requires a |
| 576 | // recovery frame (typically a key frame) to be |
| 577 | // decodable after a packet loss. |
| 578 | kResilientStream, // A stream produced by the encoder is resilient to |
| 579 | // packet losses, but packets within a frame subsequent |
| 580 | // to a loss can't be decoded. |
| 581 | kResilientFrames // Same as kResilientStream but with added resilience |
| 582 | // within a frame. |
| 583 | }; |
| 584 | |
| 585 | // VP8 specific |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 586 | struct VideoCodecVP8 { |
| 587 | bool pictureLossIndicationOn; |
| 588 | bool feedbackModeOn; |
| 589 | VideoCodecComplexity complexity; |
| 590 | VP8ResilienceMode resilience; |
| 591 | unsigned char numberOfTemporalLayers; |
| 592 | bool denoisingOn; |
| 593 | bool errorConcealmentOn; |
| 594 | bool automaticResizeOn; |
| 595 | bool frameDroppingOn; |
| 596 | int keyFrameInterval; |
| 597 | |
| 598 | bool operator==(const VideoCodecVP8& other) const { |
| 599 | return pictureLossIndicationOn == other.pictureLossIndicationOn && |
| 600 | feedbackModeOn == other.feedbackModeOn && |
| 601 | complexity == other.complexity && |
| 602 | resilience == other.resilience && |
| 603 | numberOfTemporalLayers == other.numberOfTemporalLayers && |
| 604 | denoisingOn == other.denoisingOn && |
| 605 | errorConcealmentOn == other.errorConcealmentOn && |
| 606 | automaticResizeOn == other.automaticResizeOn && |
| 607 | frameDroppingOn == other.frameDroppingOn && |
| 608 | keyFrameInterval == other.keyFrameInterval; |
| 609 | } |
| 610 | |
| 611 | bool operator!=(const VideoCodecVP8& other) const { |
| 612 | return !(*this == other); |
| 613 | } |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 614 | }; |
| 615 | |
marpan@webrtc.org | 6637388 | 2014-11-01 06:10:48 | [diff] [blame] | 616 | // VP9 specific |
| 617 | struct VideoCodecVP9 { |
| 618 | VideoCodecComplexity complexity; |
| 619 | int resilience; |
| 620 | unsigned char numberOfTemporalLayers; |
| 621 | bool denoisingOn; |
| 622 | bool frameDroppingOn; |
| 623 | int keyFrameInterval; |
| 624 | bool adaptiveQpMode; |
| 625 | }; |
| 626 | |
stefan@webrtc.org | 2d4a80c | 2014-07-04 12:42:07 | [diff] [blame] | 627 | // H264 specific. |
marpan@webrtc.org | 6637388 | 2014-11-01 06:10:48 | [diff] [blame] | 628 | struct VideoCodecH264 { |
| 629 | VideoCodecProfile profile; |
| 630 | bool frameDroppingOn; |
| 631 | int keyFrameInterval; |
| 632 | // These are NULL/0 if not externally negotiated. |
| 633 | const uint8_t* spsData; |
| 634 | size_t spsLen; |
| 635 | const uint8_t* ppsData; |
| 636 | size_t ppsLen; |
stefan@webrtc.org | 2d4a80c | 2014-07-04 12:42:07 | [diff] [blame] | 637 | }; |
| 638 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 639 | // Video codec types |
marpan@webrtc.org | 6637388 | 2014-11-01 06:10:48 | [diff] [blame] | 640 | enum VideoCodecType { |
| 641 | kVideoCodecVP8, |
| 642 | kVideoCodecVP9, |
| 643 | kVideoCodecH264, |
| 644 | kVideoCodecI420, |
| 645 | kVideoCodecRED, |
| 646 | kVideoCodecULPFEC, |
| 647 | kVideoCodecGeneric, |
| 648 | kVideoCodecUnknown |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 649 | }; |
| 650 | |
marpan@webrtc.org | 6637388 | 2014-11-01 06:10:48 | [diff] [blame] | 651 | union VideoCodecUnion { |
| 652 | VideoCodecVP8 VP8; |
| 653 | VideoCodecVP9 VP9; |
| 654 | VideoCodecH264 H264; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 655 | }; |
| 656 | |
| 657 | |
| 658 | // Simulcast is when the same stream is encoded multiple times with different |
| 659 | // settings such as resolution. |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 660 | struct SimulcastStream { |
| 661 | unsigned short width; |
| 662 | unsigned short height; |
| 663 | unsigned char numberOfTemporalLayers; |
| 664 | unsigned int maxBitrate; // kilobits/sec. |
| 665 | unsigned int targetBitrate; // kilobits/sec. |
| 666 | unsigned int minBitrate; // kilobits/sec. |
| 667 | unsigned int qpMax; // minimum quality |
| 668 | |
| 669 | bool operator==(const SimulcastStream& other) const { |
| 670 | return width == other.width && |
| 671 | height == other.height && |
| 672 | numberOfTemporalLayers == other.numberOfTemporalLayers && |
| 673 | maxBitrate == other.maxBitrate && |
| 674 | targetBitrate == other.targetBitrate && |
| 675 | minBitrate == other.minBitrate && |
| 676 | qpMax == other.qpMax; |
| 677 | } |
| 678 | |
| 679 | bool operator!=(const SimulcastStream& other) const { |
| 680 | return !(*this == other); |
| 681 | } |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 682 | }; |
| 683 | |
stefan@webrtc.org | f4d3788 | 2013-02-18 14:40:18 | [diff] [blame] | 684 | enum VideoCodecMode { |
| 685 | kRealtimeVideo, |
| 686 | kScreensharing |
| 687 | }; |
| 688 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 689 | // Common video codec properties |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 690 | struct VideoCodec { |
| 691 | VideoCodecType codecType; |
| 692 | char plName[kPayloadNameSize]; |
| 693 | unsigned char plType; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 694 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 695 | unsigned short width; |
| 696 | unsigned short height; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 697 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 698 | unsigned int startBitrate; // kilobits/sec. |
| 699 | unsigned int maxBitrate; // kilobits/sec. |
| 700 | unsigned int minBitrate; // kilobits/sec. |
pbos@webrtc.org | 3d6910c | 2014-03-24 12:36:52 | [diff] [blame] | 701 | unsigned int targetBitrate; // kilobits/sec. |
| 702 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 703 | unsigned char maxFramerate; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 704 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 705 | VideoCodecUnion codecSpecific; |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 706 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 707 | unsigned int qpMax; |
| 708 | unsigned char numberOfSimulcastStreams; |
| 709 | SimulcastStream simulcastStream[kMaxSimulcastStreams]; |
stefan@webrtc.org | f4d3788 | 2013-02-18 14:40:18 | [diff] [blame] | 710 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 711 | VideoCodecMode mode; |
andresp@webrtc.org | ee6f8a2 | 2013-05-14 08:02:25 | [diff] [blame] | 712 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 713 | // When using an external encoder/decoder this allows to pass |
| 714 | // extra options without requiring webrtc to be aware of them. |
| 715 | Config* extra_options; |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 716 | |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 717 | bool operator==(const VideoCodec& other) const { |
| 718 | bool ret = codecType == other.codecType && |
| 719 | (STR_CASE_CMP(plName, other.plName) == 0) && |
| 720 | plType == other.plType && |
| 721 | width == other.width && |
| 722 | height == other.height && |
| 723 | startBitrate == other.startBitrate && |
| 724 | maxBitrate == other.maxBitrate && |
| 725 | minBitrate == other.minBitrate && |
pbos@webrtc.org | 3d6910c | 2014-03-24 12:36:52 | [diff] [blame] | 726 | targetBitrate == other.targetBitrate && |
mallinath@webrtc.org | 18c2945 | 2014-03-21 00:41:28 | [diff] [blame] | 727 | maxFramerate == other.maxFramerate && |
| 728 | qpMax == other.qpMax && |
| 729 | numberOfSimulcastStreams == other.numberOfSimulcastStreams && |
| 730 | mode == other.mode; |
| 731 | if (ret && codecType == kVideoCodecVP8) { |
| 732 | ret &= (codecSpecific.VP8 == other.codecSpecific.VP8); |
| 733 | } |
| 734 | |
| 735 | for (unsigned char i = 0; i < other.numberOfSimulcastStreams && ret; ++i) { |
| 736 | ret &= (simulcastStream[i] == other.simulcastStream[i]); |
| 737 | } |
| 738 | return ret; |
| 739 | } |
| 740 | |
| 741 | bool operator!=(const VideoCodec& other) const { |
| 742 | return !(*this == other); |
| 743 | } |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 744 | }; |
| 745 | |
| 746 | // Bandwidth over-use detector options. These are used to drive |
| 747 | // experimentation with bandwidth estimation parameters. |
| 748 | // See modules/remote_bitrate_estimator/overuse_detector.h |
| 749 | struct OverUseDetectorOptions { |
| 750 | OverUseDetectorOptions() |
| 751 | : initial_slope(8.0/512.0), |
| 752 | initial_offset(0), |
| 753 | initial_e(), |
| 754 | initial_process_noise(), |
| 755 | initial_avg_noise(0.0), |
| 756 | initial_var_noise(50), |
| 757 | initial_threshold(25.0) { |
| 758 | initial_e[0][0] = 100; |
| 759 | initial_e[1][1] = 1e-1; |
| 760 | initial_e[0][1] = initial_e[1][0] = 0; |
| 761 | initial_process_noise[0] = 1e-10; |
| 762 | initial_process_noise[1] = 1e-2; |
| 763 | } |
| 764 | double initial_slope; |
| 765 | double initial_offset; |
| 766 | double initial_e[2][2]; |
| 767 | double initial_process_noise[2]; |
| 768 | double initial_avg_noise; |
| 769 | double initial_var_noise; |
| 770 | double initial_threshold; |
| 771 | }; |
andrew@webrtc.org | 5cf83f4 | 2013-09-09 17:50:10 | [diff] [blame] | 772 | |
wu@webrtc.org | efeb8ce | 2013-12-13 00:21:03 | [diff] [blame] | 773 | // This structure will have the information about when packet is actually |
| 774 | // received by socket. |
| 775 | struct PacketTime { |
henrike@webrtc.org | 93ae821 | 2014-04-29 17:50:47 | [diff] [blame] | 776 | PacketTime() : timestamp(-1), not_before(-1) {} |
| 777 | PacketTime(int64_t timestamp, int64_t not_before) |
| 778 | : timestamp(timestamp), not_before(not_before) { |
wu@webrtc.org | efeb8ce | 2013-12-13 00:21:03 | [diff] [blame] | 779 | } |
| 780 | |
henrike@webrtc.org | 93ae821 | 2014-04-29 17:50:47 | [diff] [blame] | 781 | int64_t timestamp; // Receive time after socket delivers the data. |
| 782 | int64_t not_before; // Earliest possible time the data could have arrived, |
| 783 | // indicating the potential error in the |timestamp| |
| 784 | // value,in case the system is busy. |
| 785 | // For example, the time of the last select() call. |
| 786 | // If unknown, this value will be set to zero. |
wu@webrtc.org | efeb8ce | 2013-12-13 00:21:03 | [diff] [blame] | 787 | }; |
| 788 | |
solenberg@webrtc.org | fec6b6e | 2014-03-24 10:38:25 | [diff] [blame] | 789 | struct RTPHeaderExtension { |
| 790 | RTPHeaderExtension() |
| 791 | : hasTransmissionTimeOffset(false), |
| 792 | transmissionTimeOffset(0), |
| 793 | hasAbsoluteSendTime(false), |
| 794 | absoluteSendTime(0), |
| 795 | hasAudioLevel(false), |
| 796 | audioLevel(0) {} |
| 797 | |
| 798 | bool hasTransmissionTimeOffset; |
| 799 | int32_t transmissionTimeOffset; |
| 800 | bool hasAbsoluteSendTime; |
| 801 | uint32_t absoluteSendTime; |
| 802 | |
| 803 | // Audio Level includes both level in dBov and voiced/unvoiced bit. See: |
| 804 | // https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/ |
| 805 | bool hasAudioLevel; |
| 806 | uint8_t audioLevel; |
| 807 | }; |
| 808 | |
| 809 | struct RTPHeader { |
| 810 | RTPHeader() |
| 811 | : markerBit(false), |
| 812 | payloadType(0), |
| 813 | sequenceNumber(0), |
| 814 | timestamp(0), |
| 815 | ssrc(0), |
| 816 | numCSRCs(0), |
| 817 | paddingLength(0), |
| 818 | headerLength(0), |
| 819 | payload_type_frequency(0), |
| 820 | extension() { |
| 821 | memset(&arrOfCSRCs, 0, sizeof(arrOfCSRCs)); |
| 822 | } |
| 823 | |
| 824 | bool markerBit; |
| 825 | uint8_t payloadType; |
| 826 | uint16_t sequenceNumber; |
| 827 | uint32_t timestamp; |
| 828 | uint32_t ssrc; |
| 829 | uint8_t numCSRCs; |
| 830 | uint32_t arrOfCSRCs[kRtpCsrcSize]; |
| 831 | uint8_t paddingLength; |
| 832 | uint16_t headerLength; |
| 833 | int payload_type_frequency; |
| 834 | RTPHeaderExtension extension; |
| 835 | }; |
| 836 | |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 | [diff] [blame] | 837 | } // namespace webrtc |
andrew@webrtc.org | 5cf83f4 | 2013-09-09 17:50:10 | [diff] [blame] | 838 | |
| 839 | #endif // WEBRTC_COMMON_TYPES_H_ |