Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2017 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_NACK_STATS_H_ | |
| 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_NACK_STATS_H_ | |
| 13 | |
| 14 #include <stdint.h> | |
| 15 | |
| 16 namespace webrtc { | |
| 17 | |
| 18 class NackStats { | |
|
nisse-webrtc
2017/02/09 12:16:52
Rename to RtpNackStats or RtcpNackStats (and renam
danilchap
2017/02/09 12:28:16
Done.
| |
| 19 public: | |
| 20 NackStats(); | |
| 21 | |
| 22 // Updates stats with requested sequence number. | |
| 23 // This function should be called for each NACK request to calculate the | |
| 24 // number of unique NACKed RTP packets. | |
| 25 void ReportRequest(uint16_t sequence_number); | |
| 26 | |
| 27 // Gets the number of NACKed RTP packets. | |
| 28 uint32_t requests() const { return requests_; } | |
| 29 | |
| 30 // Gets the number of unique NACKed RTP packets. | |
| 31 uint32_t unique_requests() const { return unique_requests_; } | |
| 32 | |
| 33 private: | |
| 34 uint16_t max_sequence_number_; | |
| 35 uint32_t requests_; | |
| 36 uint32_t unique_requests_; | |
|
nisse-webrtc
2017/02/09 12:16:52
You could consider using a wider type than uint32_
danilchap
2017/02/09 12:28:16
I consciously left the implementation of this clas
nisse-webrtc
2017/02/09 12:34:05
Acknowledged.
| |
| 37 }; | |
| 38 | |
| 39 } // namespace webrtc | |
| 40 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_NACK_STATS_H_ | |
| OLD | NEW |