| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2014 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 SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_BEFORE_STREAMING_H_ | |
| 12 #define SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_BEFORE_STREAMING_H_ | |
| 13 | |
| 14 #include <string> | |
| 15 #include "voice_engine/test/auto_test/fixtures/after_initialization_fixture.h" | |
| 16 | |
| 17 // This fixture will, in addition to the work done by its superclasses, | |
| 18 // create a channel and prepare playing a file through the fake microphone | |
| 19 // to simulate microphone input. The purpose is to make it convenient | |
| 20 // to write tests that require microphone input. | |
| 21 class BeforeStreamingFixture : public AfterInitializationFixture { | |
| 22 public: | |
| 23 BeforeStreamingFixture(); | |
| 24 virtual ~BeforeStreamingFixture(); | |
| 25 | |
| 26 protected: | |
| 27 int channel_; | |
| 28 std::string fake_microphone_input_file_; | |
| 29 | |
| 30 // Shuts off the fake microphone for this test. | |
| 31 void SwitchToManualMicrophone(); | |
| 32 | |
| 33 // Restarts the fake microphone if it's been shut off earlier. | |
| 34 void RestartFakeMicrophone(); | |
| 35 | |
| 36 // Stops all sending and playout. | |
| 37 void PausePlaying(); | |
| 38 | |
| 39 // Resumes all sending and playout. | |
| 40 void ResumePlaying(); | |
| 41 | |
| 42 // Waits until packet_count packetes have been processed by recipient. | |
| 43 void WaitForTransmittedPackets(int32_t packet_count); | |
| 44 | |
| 45 private: | |
| 46 void SetUpLocalPlayback(); | |
| 47 | |
| 48 LoopBackTransport* transport_; | |
| 49 }; | |
| 50 | |
| 51 | |
| 52 #endif // SRC_VOICE_ENGINE_MAIN_TEST_AUTO_TEST_STANDARD_BEFORE_STREAMING_H_ | |
| OLD | NEW |