blob: fe0ed2a24bbb8717bf62121e5c2542f3ab12cb67 [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
andrew@webrtc.org89df0922013-09-12 01:27:43 +000014#include "webrtc/system_wrappers/interface/scoped_ptr.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000015#include "ACMTest.h"
16#include "Channel.h"
17#include "PCMFile.h"
18#include "audio_coding_module.h"
19#include "utility.h"
20
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000021namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000022
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000023class TwoWayCommunication : public ACMTest {
24 public:
25 TwoWayCommunication(int testMode = 1);
26 ~TwoWayCommunication();
niklase@google.com470e71d2011-07-07 08:21:25 +000027
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000028 void Perform();
29 private:
tina.legrand@webrtc.orgee92b662013-08-27 07:33:51 +000030 void ChooseCodec(uint8_t* codecID_A, uint8_t* codecID_B);
31 void SetUp();
32 void SetUpAutotest();
niklase@google.com470e71d2011-07-07 08:21:25 +000033
andrew@webrtc.org89df0922013-09-12 01:27:43 +000034 scoped_ptr<AudioCodingModule> _acmA;
35 scoped_ptr<AudioCodingModule> _acmB;
niklase@google.com470e71d2011-07-07 08:21:25 +000036
andrew@webrtc.org89df0922013-09-12 01:27:43 +000037 scoped_ptr<AudioCodingModule> _acmRefA;
38 scoped_ptr<AudioCodingModule> _acmRefB;
niklase@google.com470e71d2011-07-07 08:21:25 +000039
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000040 Channel* _channel_A2B;
41 Channel* _channel_B2A;
niklase@google.com470e71d2011-07-07 08:21:25 +000042
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000043 Channel* _channelRef_A2B;
44 Channel* _channelRef_B2A;
niklase@google.com470e71d2011-07-07 08:21:25 +000045
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000046 PCMFile _inFileA;
47 PCMFile _inFileB;
niklase@google.com470e71d2011-07-07 08:21:25 +000048
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000049 PCMFile _outFileA;
50 PCMFile _outFileB;
niklase@google.com470e71d2011-07-07 08:21:25 +000051
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000052 PCMFile _outFileRefA;
53 PCMFile _outFileRefB;
niklase@google.com470e71d2011-07-07 08:21:25 +000054
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000055 int _testMode;
niklase@google.com470e71d2011-07-07 08:21:25 +000056};
57
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000058} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000059
60#endif