tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

rtcp_nack_stats.h (1212B)


      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 MODULES_RTP_RTCP_SOURCE_RTCP_NACK_STATS_H_
     12 #define MODULES_RTP_RTCP_SOURCE_RTCP_NACK_STATS_H_
     13 
     14 #include <stdint.h>
     15 
     16 namespace webrtc {
     17 
     18 class RtcpNackStats {
     19 public:
     20  RtcpNackStats();
     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_;
     37 };
     38 
     39 }  // namespace webrtc
     40 #endif  // MODULES_RTP_RTCP_SOURCE_RTCP_NACK_STATS_H_