tor-browser

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

delay_manager_interface.h (1354B)


      1 /*
      2 *  Copyright (c) 2019 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 API_NETEQ_DELAY_MANAGER_INTERFACE_H_
     12 #define API_NETEQ_DELAY_MANAGER_INTERFACE_H_
     13 
     14 #include "api/neteq/neteq_controller.h"
     15 
     16 namespace webrtc {
     17 
     18 // Interface for the delay manager.
     19 class DelayManagerInterface {
     20 public:
     21  virtual ~DelayManagerInterface() = default;
     22 
     23  // Updates the delay manager that a new packet arrived with delay
     24  // `arrival_delay_ms`. This updates the statistics and a new target buffer
     25  // level is calculated. The `reordered` flag indicates if the packet was
     26  // reordered. The `info` argument contains information about the packet.
     27  virtual void Update(int arrival_delay_ms,
     28                      bool reordered,
     29                      NetEqController::PacketArrivedInfo info) = 0;
     30 
     31  // Resets all state.
     32  virtual void Reset() = 0;
     33 
     34  // Gets the target buffer level in milliseconds.
     35  virtual int TargetDelayMs() const = 0;
     36 };
     37 
     38 }  // namespace webrtc
     39 
     40 #endif  // API_NETEQ_DELAY_MANAGER_INTERFACE_H_