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