tor-browser

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

mock_neteq_controller.h (2621B)


      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 MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_NETEQ_CONTROLLER_H_
     12 #define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_NETEQ_CONTROLLER_H_
     13 
     14 #include <cstddef>
     15 #include <cstdint>
     16 #include <optional>
     17 
     18 #include "api/neteq/neteq.h"
     19 #include "api/neteq/neteq_controller.h"
     20 #include "test/gmock.h"
     21 
     22 namespace webrtc {
     23 
     24 class MockNetEqController : public NetEqController {
     25 public:
     26  MockNetEqController() = default;
     27  ~MockNetEqController() override { Die(); }
     28  MOCK_METHOD(void, Die, ());
     29  MOCK_METHOD(void, Reset, (), (override));
     30  MOCK_METHOD(void, SoftReset, (), (override));
     31  MOCK_METHOD(NetEq::Operation,
     32              GetDecision,
     33              (const NetEqStatus& neteq_status, bool* reset_decoder),
     34              (override));
     35  MOCK_METHOD(void, RegisterEmptyPacket, (), (override));
     36  MOCK_METHOD(void,
     37              SetSampleRate,
     38              (int fs_hz, size_t output_size_samples),
     39              (override));
     40  MOCK_METHOD(bool, SetMaximumDelay, (int delay_ms), (override));
     41  MOCK_METHOD(bool, SetMinimumDelay, (int delay_ms), (override));
     42  MOCK_METHOD(bool, SetBaseMinimumDelay, (int delay_ms), (override));
     43  MOCK_METHOD(int, GetBaseMinimumDelay, (), (const, override));
     44  MOCK_METHOD(void, ExpandDecision, (NetEq::Operation operation), (override));
     45  MOCK_METHOD(void, AddSampleMemory, (int32_t value), (override));
     46  MOCK_METHOD(int, TargetLevelMs, (), (const, override));
     47  MOCK_METHOD(std::optional<int>,
     48              PacketArrived,
     49              (int fs_hz,
     50               bool should_update_stats,
     51               const PacketArrivedInfo& info),
     52              (override));
     53  MOCK_METHOD(void, NotifyMutedState, (), (override));
     54  MOCK_METHOD(bool, PeakFound, (), (const, override));
     55  MOCK_METHOD(int, GetFilteredBufferLevel, (), (const, override));
     56  MOCK_METHOD(void, set_sample_memory, (int32_t value), (override));
     57  MOCK_METHOD(size_t, noise_fast_forward, (), (const, override));
     58  MOCK_METHOD(size_t, packet_length_samples, (), (const, override));
     59  MOCK_METHOD(void, set_packet_length_samples, (size_t value), (override));
     60  MOCK_METHOD(void, set_prev_time_scale, (bool value), (override));
     61 };
     62 
     63 }  // namespace webrtc
     64 #endif  // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_NETEQ_CONTROLLER_H_