tor-browser

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

audio_end_to_end_test.h (2235B)


      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 #ifndef AUDIO_TEST_AUDIO_END_TO_END_TEST_H_
     11 #define AUDIO_TEST_AUDIO_END_TO_END_TEST_H_
     12 
     13 #include <cstddef>
     14 #include <memory>
     15 #include <vector>
     16 
     17 #include "api/audio/audio_device.h"
     18 #include "call/audio_receive_stream.h"
     19 #include "call/audio_send_stream.h"
     20 #include "modules/audio_device/include/test_audio_device.h"
     21 #include "test/call_test.h"
     22 
     23 namespace webrtc {
     24 namespace test {
     25 
     26 class AudioEndToEndTest : public test::EndToEndTest {
     27 public:
     28  AudioEndToEndTest();
     29 
     30 protected:
     31  AudioDeviceModule* send_audio_device() { return send_audio_device_; }
     32  const AudioSendStream* send_stream() const { return send_stream_; }
     33  const AudioReceiveStreamInterface* receive_stream() const {
     34    return receive_stream_;
     35  }
     36 
     37  size_t GetNumVideoStreams() const override;
     38  size_t GetNumAudioStreams() const override;
     39  size_t GetNumFlexfecStreams() const override;
     40 
     41  std::unique_ptr<TestAudioDeviceModule::Capturer> CreateCapturer() override;
     42  std::unique_ptr<TestAudioDeviceModule::Renderer> CreateRenderer() override;
     43 
     44  void OnFakeAudioDevicesCreated(AudioDeviceModule* send_audio_device,
     45                                 AudioDeviceModule* recv_audio_device) override;
     46 
     47  void ModifyAudioConfigs(AudioSendStream::Config* send_config,
     48                          std::vector<AudioReceiveStreamInterface::Config>*
     49                              receive_configs) override;
     50  void OnAudioStreamsCreated(AudioSendStream* send_stream,
     51                             const std::vector<AudioReceiveStreamInterface*>&
     52                                 receive_streams) override;
     53 
     54 private:
     55  AudioDeviceModule* send_audio_device_ = nullptr;
     56  AudioSendStream* send_stream_ = nullptr;
     57  AudioReceiveStreamInterface* receive_stream_ = nullptr;
     58 };
     59 
     60 }  // namespace test
     61 }  // namespace webrtc
     62 
     63 #endif  // AUDIO_TEST_AUDIO_END_TO_END_TEST_H_