1 /* 2 * Copyright (c) 2012 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 WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_ 13 14 #include <memory> 15 16 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 17 #include "webrtc/modules/audio_coding/test/ACMTest.h" 18 #include "webrtc/modules/audio_coding/test/Channel.h" 19 #include "webrtc/modules/audio_coding/test/PCMFile.h" 20 #include "webrtc/modules/audio_coding/test/utility.h" 21 22 namespace webrtc { 23 24 class TwoWayCommunication : public ACMTest { 25 public: 26 explicit TwoWayCommunication(int testMode); 27 ~TwoWayCommunication(); 28 29 void Perform(); 30 private: 31 void ChooseCodec(uint8_t* codecID_A, uint8_t* codecID_B); 32 void SetUp(); 33 void SetUpAutotest(); 34 35 std::unique_ptr<AudioCodingModule> _acmA; 36 std::unique_ptr<AudioCodingModule> _acmB; 37 38 std::unique_ptr<AudioCodingModule> _acmRefA; 39 std::unique_ptr<AudioCodingModule> _acmRefB; 40 41 Channel* _channel_A2B; 42 Channel* _channel_B2A; 43 44 Channel* _channelRef_A2B; 45 Channel* _channelRef_B2A; 46 47 PCMFile _inFileA; 48 PCMFile _inFileB; 49 50 PCMFile _outFileA; 51 PCMFile _outFileB; 52 53 PCMFile _outFileRefA; 54 PCMFile _outFileRefB; 55 56 int _testMode; 57 }; 58 59 } // namespace webrtc 60 61 #endif // WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_ 62