blob: a679732bffc415b6f256409510c7450988b9e8e6 [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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_
12#define 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
Karl Wiberg91957c12018-09-26 11:22:50 +020016#include "api/audio_codecs/audio_encoder_factory.h"
17#include "api/audio_codecs/audio_format.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020018#include "modules/audio_coding/include/audio_coding_module.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020019#include "modules/audio_coding/test/Channel.h"
20#include "modules/audio_coding/test/PCMFile.h"
21#include "modules/audio_coding/test/utility.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000022
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000023namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000024
Karl Wiberg3ff52ff2018-10-01 12:31:22 +020025class TwoWayCommunication {
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000026 public:
Karl Wiberg3a6b6bd2018-09-26 10:38:45 +020027 TwoWayCommunication();
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000028 ~TwoWayCommunication();
niklase@google.com470e71d2011-07-07 08:21:25 +000029
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000030 void Perform();
Yves Gerey665174f2018-06-19 15:03:05 +020031
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000032 private:
Karl Wiberg91957c12018-09-26 11:22:50 +020033 void SetUpAutotest(AudioEncoderFactory* const encoder_factory,
34 const SdpAudioFormat& format1,
35 const int payload_type1,
36 const SdpAudioFormat& format2,
37 const int payload_type2);
niklase@google.com470e71d2011-07-07 08:21:25 +000038
kwiberg37478382016-02-14 20:40:57 -080039 std::unique_ptr<AudioCodingModule> _acmA;
40 std::unique_ptr<AudioCodingModule> _acmB;
niklase@google.com470e71d2011-07-07 08:21:25 +000041
kwiberg37478382016-02-14 20:40:57 -080042 std::unique_ptr<AudioCodingModule> _acmRefA;
43 std::unique_ptr<AudioCodingModule> _acmRefB;
niklase@google.com470e71d2011-07-07 08:21:25 +000044
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000045 Channel* _channel_A2B;
46 Channel* _channel_B2A;
niklase@google.com470e71d2011-07-07 08:21:25 +000047
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000048 Channel* _channelRef_A2B;
49 Channel* _channelRef_B2A;
niklase@google.com470e71d2011-07-07 08:21:25 +000050
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000051 PCMFile _inFileA;
52 PCMFile _inFileB;
niklase@google.com470e71d2011-07-07 08:21:25 +000053
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000054 PCMFile _outFileA;
55 PCMFile _outFileB;
niklase@google.com470e71d2011-07-07 08:21:25 +000056
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000057 PCMFile _outFileRefA;
58 PCMFile _outFileRefB;
niklase@google.com470e71d2011-07-07 08:21:25 +000059};
60
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000061} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000062
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020063#endif // MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_