OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 virtual void OnReceivedRtcpReceiverReport( | 238 virtual void OnReceivedRtcpReceiverReport( |
239 const ReportBlockList& report_blocks, | 239 const ReportBlockList& report_blocks, |
240 int64_t rtt, | 240 int64_t rtt, |
241 int64_t now_ms) = 0; | 241 int64_t now_ms) = 0; |
242 | 242 |
243 virtual ~RtcpBandwidthObserver() {} | 243 virtual ~RtcpBandwidthObserver() {} |
244 }; | 244 }; |
245 | 245 |
246 struct PacketInfo { | 246 struct PacketInfo { |
247 PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number) | 247 PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number) |
248 : PacketInfo(-1, | 248 : PacketInfo(-1, arrival_time_ms, -1, sequence_number, 0, false) {} |
249 arrival_time_ms, | |
250 -1, | |
251 sequence_number, | |
252 0, | |
253 false, | |
254 kNotAProbe) {} | |
255 | 249 |
256 PacketInfo(int64_t arrival_time_ms, | 250 PacketInfo(int64_t arrival_time_ms, |
257 int64_t send_time_ms, | 251 int64_t send_time_ms, |
258 uint16_t sequence_number, | 252 uint16_t sequence_number, |
259 size_t payload_size, | 253 size_t payload_size, |
260 bool was_paced, | 254 bool was_paced) |
261 int probe_cluster_id) | |
262 : PacketInfo(-1, | 255 : PacketInfo(-1, |
263 arrival_time_ms, | 256 arrival_time_ms, |
264 send_time_ms, | 257 send_time_ms, |
265 sequence_number, | 258 sequence_number, |
266 payload_size, | 259 payload_size, |
267 was_paced, | 260 was_paced) {} |
268 probe_cluster_id) {} | |
269 | 261 |
270 PacketInfo(int64_t creation_time_ms, | 262 PacketInfo(int64_t creation_time_ms, |
271 int64_t arrival_time_ms, | 263 int64_t arrival_time_ms, |
272 int64_t send_time_ms, | 264 int64_t send_time_ms, |
273 uint16_t sequence_number, | 265 uint16_t sequence_number, |
274 size_t payload_size, | 266 size_t payload_size, |
275 bool was_paced, | 267 bool was_paced) |
276 int probe_cluster_id) | |
277 : creation_time_ms(creation_time_ms), | 268 : creation_time_ms(creation_time_ms), |
278 arrival_time_ms(arrival_time_ms), | 269 arrival_time_ms(arrival_time_ms), |
279 send_time_ms(send_time_ms), | 270 send_time_ms(send_time_ms), |
280 sequence_number(sequence_number), | 271 sequence_number(sequence_number), |
281 payload_size(payload_size), | 272 payload_size(payload_size), |
282 was_paced(was_paced), | 273 was_paced(was_paced) {} |
283 probe_cluster_id(probe_cluster_id) {} | |
284 | |
285 static constexpr int kNotAProbe = -1; | |
286 | 274 |
287 // Time corresponding to when this object was created. | 275 // Time corresponding to when this object was created. |
288 int64_t creation_time_ms; | 276 int64_t creation_time_ms; |
289 // Time corresponding to when the packet was received. Timestamped with the | 277 // Time corresponding to when the packet was received. Timestamped with the |
290 // receiver's clock. | 278 // receiver's clock. |
291 int64_t arrival_time_ms; | 279 int64_t arrival_time_ms; |
292 // Time corresponding to when the packet was sent, timestamped with the | 280 // Time corresponding to when the packet was sent, timestamped with the |
293 // sender's clock. | 281 // sender's clock. |
294 int64_t send_time_ms; | 282 int64_t send_time_ms; |
295 // Packet identifier, incremented with 1 for every packet generated by the | 283 // Packet identifier, incremented with 1 for every packet generated by the |
296 // sender. | 284 // sender. |
297 uint16_t sequence_number; | 285 uint16_t sequence_number; |
298 // Size of the packet excluding RTP headers. | 286 // Size of the packet excluding RTP headers. |
299 size_t payload_size; | 287 size_t payload_size; |
300 // True if the packet was paced out by the pacer. | 288 // True if the packet was paced out by the pacer. |
301 bool was_paced; | 289 bool was_paced; |
302 // Which probing cluster this packets belongs to. | |
303 int probe_cluster_id; | |
304 }; | 290 }; |
305 | 291 |
306 class TransportFeedbackObserver { | 292 class TransportFeedbackObserver { |
307 public: | 293 public: |
308 TransportFeedbackObserver() {} | 294 TransportFeedbackObserver() {} |
309 virtual ~TransportFeedbackObserver() {} | 295 virtual ~TransportFeedbackObserver() {} |
310 | 296 |
311 // Note: Transport-wide sequence number as sequence number. Arrival time | 297 // Note: Transport-wide sequence number as sequence number. Arrival time |
312 // must be set to 0. | 298 // must be set to 0. |
313 virtual void AddPacket(uint16_t sequence_number, | 299 virtual void AddPacket(uint16_t sequence_number, |
314 size_t length, | 300 size_t length, |
315 bool was_paced, | 301 bool was_paced) = 0; |
316 int probe_cluster_id) = 0; | |
317 | 302 |
318 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; | 303 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; |
319 }; | 304 }; |
320 | 305 |
321 class RtcpRttStats { | 306 class RtcpRttStats { |
322 public: | 307 public: |
323 virtual void OnRttUpdate(int64_t rtt) = 0; | 308 virtual void OnRttUpdate(int64_t rtt) = 0; |
324 | 309 |
325 virtual int64_t LastProcessedRtt() const = 0; | 310 virtual int64_t LastProcessedRtt() const = 0; |
326 | 311 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 class TransportSequenceNumberAllocator { | 384 class TransportSequenceNumberAllocator { |
400 public: | 385 public: |
401 TransportSequenceNumberAllocator() {} | 386 TransportSequenceNumberAllocator() {} |
402 virtual ~TransportSequenceNumberAllocator() {} | 387 virtual ~TransportSequenceNumberAllocator() {} |
403 | 388 |
404 virtual uint16_t AllocateSequenceNumber() = 0; | 389 virtual uint16_t AllocateSequenceNumber() = 0; |
405 }; | 390 }; |
406 | 391 |
407 } // namespace webrtc | 392 } // namespace webrtc |
408 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ | 393 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ |
OLD | NEW |