Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_coding / main / test / TwoWayCommunication.h
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_MAIN_TEST_TWOWAYCOMMUNICATION_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_MAIN_TEST_TWOWAYCOMMUNICATION_H_
13
14 #include "webrtc/modules/audio_coding/main/interface/audio_coding_module.h"
15 #include "webrtc/modules/audio_coding/main/test/ACMTest.h"
16 #include "webrtc/modules/audio_coding/main/test/Channel.h"
17 #include "webrtc/modules/audio_coding/main/test/PCMFile.h"
18 #include "webrtc/modules/audio_coding/main/test/utility.h"
19 #include "webrtc/system_wrappers/interface/scoped_ptr.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   scoped_ptr<AudioCodingModule> _acmA;
35   scoped_ptr<AudioCodingModule> _acmB;
36
37   scoped_ptr<AudioCodingModule> _acmRefA;
38   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_MAIN_TEST_TWOWAYCOMMUNICATION_H_