| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 274 |
| 275 virtual void OnReceivedRtcpReceiverReport( | 275 virtual void OnReceivedRtcpReceiverReport( |
| 276 const ReportBlockList& report_blocks, | 276 const ReportBlockList& report_blocks, |
| 277 int64_t rtt, | 277 int64_t rtt, |
| 278 int64_t now_ms) = 0; | 278 int64_t now_ms) = 0; |
| 279 | 279 |
| 280 virtual ~RtcpBandwidthObserver() {} | 280 virtual ~RtcpBandwidthObserver() {} |
| 281 }; | 281 }; |
| 282 | 282 |
| 283 struct PacketInfo { | 283 struct PacketInfo { |
| 284 PacketInfo(int64_t arrival_time_ms, uint16_t sequence_number) |
| 285 : PacketInfo(-1, arrival_time_ms, -1, sequence_number, 0, false) {} |
| 286 |
| 284 PacketInfo(int64_t arrival_time_ms, | 287 PacketInfo(int64_t arrival_time_ms, |
| 285 int64_t send_time_ms, | 288 int64_t send_time_ms, |
| 286 uint16_t sequence_number, | 289 uint16_t sequence_number, |
| 287 size_t payload_size, | 290 size_t payload_size, |
| 288 bool was_paced) | 291 bool was_paced) |
| 289 : arrival_time_ms(arrival_time_ms), | 292 : PacketInfo(-1, |
| 293 arrival_time_ms, |
| 294 send_time_ms, |
| 295 sequence_number, |
| 296 payload_size, |
| 297 was_paced) {} |
| 298 |
| 299 PacketInfo(int64_t creation_time_ms, |
| 300 int64_t arrival_time_ms, |
| 301 int64_t send_time_ms, |
| 302 uint16_t sequence_number, |
| 303 size_t payload_size, |
| 304 bool was_paced) |
| 305 : creation_time_ms(creation_time_ms), |
| 306 arrival_time_ms(arrival_time_ms), |
| 290 send_time_ms(send_time_ms), | 307 send_time_ms(send_time_ms), |
| 291 sequence_number(sequence_number), | 308 sequence_number(sequence_number), |
| 292 payload_size(payload_size), | 309 payload_size(payload_size), |
| 293 was_paced(was_paced) {} | 310 was_paced(was_paced) {} |
| 311 |
| 312 // Time corresponding to when this object was created. |
| 313 int64_t creation_time_ms; |
| 294 // Time corresponding to when the packet was received. Timestamped with the | 314 // Time corresponding to when the packet was received. Timestamped with the |
| 295 // receiver's clock. | 315 // receiver's clock. |
| 296 int64_t arrival_time_ms; | 316 int64_t arrival_time_ms; |
| 297 // Time corresponding to when the packet was sent, timestamped with the | 317 // Time corresponding to when the packet was sent, timestamped with the |
| 298 // sender's clock. | 318 // sender's clock. |
| 299 int64_t send_time_ms; | 319 int64_t send_time_ms; |
| 300 // Packet identifier, incremented with 1 for every packet generated by the | 320 // Packet identifier, incremented with 1 for every packet generated by the |
| 301 // sender. | 321 // sender. |
| 302 uint16_t sequence_number; | 322 uint16_t sequence_number; |
| 303 // Size of the packet excluding RTP headers. | 323 // Size of the packet excluding RTP headers. |
| 304 size_t payload_size; | 324 size_t payload_size; |
| 305 // True if the packet was paced out by the pacer. | 325 // True if the packet was paced out by the pacer. |
| 306 bool was_paced; | 326 bool was_paced; |
| 307 }; | 327 }; |
| 308 | 328 |
| 309 class TransportFeedbackObserver { | 329 class TransportFeedbackObserver { |
| 310 public: | 330 public: |
| 311 TransportFeedbackObserver() {} | 331 TransportFeedbackObserver() {} |
| 312 virtual ~TransportFeedbackObserver() {} | 332 virtual ~TransportFeedbackObserver() {} |
| 313 | 333 |
| 314 // Note: Transport-wide sequence number as sequence number. Arrival time | 334 // Note: Transport-wide sequence number as sequence number. Arrival time |
| 315 // must be set to 0. | 335 // must be set to 0. |
| 316 virtual void OnSentPacket(const PacketInfo& info) = 0; | 336 virtual void AddPacket(uint16_t sequence_number, |
| 337 size_t length, |
| 338 bool was_paced) = 0; |
| 317 | 339 |
| 318 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; | 340 virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; |
| 319 }; | 341 }; |
| 320 | 342 |
| 321 class RtcpRttStats { | 343 class RtcpRttStats { |
| 322 public: | 344 public: |
| 323 virtual void OnRttUpdate(int64_t rtt) = 0; | 345 virtual void OnRttUpdate(int64_t rtt) = 0; |
| 324 | 346 |
| 325 virtual int64_t LastProcessedRtt() const = 0; | 347 virtual int64_t LastProcessedRtt() const = 0; |
| 326 | 348 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 class TransportSequenceNumberAllocator { | 431 class TransportSequenceNumberAllocator { |
| 410 public: | 432 public: |
| 411 TransportSequenceNumberAllocator() {} | 433 TransportSequenceNumberAllocator() {} |
| 412 virtual ~TransportSequenceNumberAllocator() {} | 434 virtual ~TransportSequenceNumberAllocator() {} |
| 413 | 435 |
| 414 virtual uint16_t AllocateSequenceNumber() = 0; | 436 virtual uint16_t AllocateSequenceNumber() = 0; |
| 415 }; | 437 }; |
| 416 | 438 |
| 417 } // namespace webrtc | 439 } // namespace webrtc |
| 418 #endif // WEBRTC_MODULES_RTP_RTCP_INTERFACE_RTP_RTCP_DEFINES_H_ | 440 #endif // WEBRTC_MODULES_RTP_RTCP_INTERFACE_RTP_RTCP_DEFINES_H_ |
| OLD | NEW |