blob: abe0d9b48ac6141a90e6f856057338477654f200 [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
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000022class TwoWayCommunication : public ACMTest {
23 public:
24 TwoWayCommunication(int testMode = 1);
25 ~TwoWayCommunication();
niklase@google.com470e71d2011-07-07 08:21:25 +000026
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000027 void Perform();
28 private:
tina.legrand@webrtc.orgee92b662013-08-27 07:33:51 +000029 void ChooseCodec(uint8_t* codecID_A, uint8_t* codecID_B);
30 void SetUp();
31 void SetUpAutotest();
niklase@google.com470e71d2011-07-07 08:21:25 +000032
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000033 AudioCodingModule* _acmA;
34 AudioCodingModule* _acmB;
niklase@google.com470e71d2011-07-07 08:21:25 +000035
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000036 AudioCodingModule* _acmRefA;
37 AudioCodingModule* _acmRefB;
niklase@google.com470e71d2011-07-07 08:21:25 +000038
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000039 Channel* _channel_A2B;
40 Channel* _channel_B2A;
niklase@google.com470e71d2011-07-07 08:21:25 +000041
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000042 Channel* _channelRef_A2B;
43 Channel* _channelRef_B2A;
niklase@google.com470e71d2011-07-07 08:21:25 +000044
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000045 PCMFile _inFileA;
46 PCMFile _inFileB;
niklase@google.com470e71d2011-07-07 08:21:25 +000047
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000048 PCMFile _outFileA;
49 PCMFile _outFileB;
niklase@google.com470e71d2011-07-07 08:21:25 +000050
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000051 PCMFile _outFileRefA;
52 PCMFile _outFileRefB;
niklase@google.com470e71d2011-07-07 08:21:25 +000053
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000054 int _testMode;
niklase@google.com470e71d2011-07-07 08:21:25 +000055};
56
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000057} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000058
59#endif