blob: f955f3e29e77c672349358cb66a549c2eb7587c6 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
andrew@webrtc.orgd7a71d02012-08-01 01:40:02 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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 TWO_WAY_COMMUNICATION_H
12#define TWO_WAY_COMMUNICATION_H
13
14#include "ACMTest.h"
15#include "Channel.h"
16#include "PCMFile.h"
17#include "audio_coding_module.h"
18#include "utility.h"
19
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000020namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000021
22class TwoWayCommunication : public ACMTest
23{
24public:
25 TwoWayCommunication(int testMode = 1);
26 ~TwoWayCommunication();
27
28 void Perform();
29private:
pbos@webrtc.org0946a562013-04-09 00:28:06 +000030 uint8_t ChooseCodec(uint8_t* codecID_A, uint8_t* codecID_B);
31 int16_t SetUp();
32 int16_t SetUpAutotest();
niklase@google.com470e71d2011-07-07 08:21:25 +000033
34 AudioCodingModule* _acmA;
35 AudioCodingModule* _acmB;
36
37 AudioCodingModule* _acmRefA;
38 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
niklase@google.com470e71d2011-07-07 08:21:25 +000055 int _testMode;
56};
57
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000058} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000059
60#endif