blob: f9d37f7f77f6d37a0fd5d94661edc68b598dedf8 [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
kjellander3e6db232015-11-26 04:44:54 -080011#ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_
12#define WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
kwiberg37478382016-02-14 20:40:57 -080014#include <memory>
15
kjellander3e6db232015-11-26 04:44:54 -080016#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
17#include "webrtc/modules/audio_coding/test/ACMTest.h"
18#include "webrtc/modules/audio_coding/test/Channel.h"
19#include "webrtc/modules/audio_coding/test/PCMFile.h"
20#include "webrtc/modules/audio_coding/test/utility.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000021
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000022namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000023
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000024class TwoWayCommunication : public ACMTest {
25 public:
henrik.lundin@webrtc.orgadaf8092014-04-17 08:29:10 +000026 explicit TwoWayCommunication(int testMode);
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000027 ~TwoWayCommunication();
niklase@google.com470e71d2011-07-07 08:21:25 +000028
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000029 void Perform();
30 private:
tina.legrand@webrtc.orgee92b662013-08-27 07:33:51 +000031 void ChooseCodec(uint8_t* codecID_A, uint8_t* codecID_B);
32 void SetUp();
33 void SetUpAutotest();
niklase@google.com470e71d2011-07-07 08:21:25 +000034
kwiberg37478382016-02-14 20:40:57 -080035 std::unique_ptr<AudioCodingModule> _acmA;
36 std::unique_ptr<AudioCodingModule> _acmB;
niklase@google.com470e71d2011-07-07 08:21:25 +000037
kwiberg37478382016-02-14 20:40:57 -080038 std::unique_ptr<AudioCodingModule> _acmRefA;
39 std::unique_ptr<AudioCodingModule> _acmRefB;
niklase@google.com470e71d2011-07-07 08:21:25 +000040
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000041 Channel* _channel_A2B;
42 Channel* _channel_B2A;
niklase@google.com470e71d2011-07-07 08:21:25 +000043
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000044 Channel* _channelRef_A2B;
45 Channel* _channelRef_B2A;
niklase@google.com470e71d2011-07-07 08:21:25 +000046
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000047 PCMFile _inFileA;
48 PCMFile _inFileB;
niklase@google.com470e71d2011-07-07 08:21:25 +000049
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000050 PCMFile _outFileA;
51 PCMFile _outFileB;
niklase@google.com470e71d2011-07-07 08:21:25 +000052
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000053 PCMFile _outFileRefA;
54 PCMFile _outFileRefB;
niklase@google.com470e71d2011-07-07 08:21:25 +000055
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000056 int _testMode;
niklase@google.com470e71d2011-07-07 08:21:25 +000057};
58
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000059} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000060
kjellander3e6db232015-11-26 04:44:54 -080061#endif // WEBRTC_MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_