2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-08-01 01:40:02 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef TWO_WAY_COMMUNICATION_H
|
|
|
|
|
#define TWO_WAY_COMMUNICATION_H
|
|
|
|
|
|
2013-09-12 01:27:43 +00:00
|
|
|
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
#include "ACMTest.h"
|
|
|
|
|
#include "Channel.h"
|
|
|
|
|
#include "PCMFile.h"
|
|
|
|
|
#include "audio_coding_module.h"
|
|
|
|
|
#include "utility.h"
|
|
|
|
|
|
2011-12-16 10:09:04 +00:00
|
|
|
namespace webrtc {
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
class TwoWayCommunication : public ACMTest {
|
|
|
|
|
public:
|
|
|
|
|
TwoWayCommunication(int testMode = 1);
|
|
|
|
|
~TwoWayCommunication();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
void Perform();
|
|
|
|
|
private:
|
2013-08-27 07:33:51 +00:00
|
|
|
void ChooseCodec(uint8_t* codecID_A, uint8_t* codecID_B);
|
|
|
|
|
void SetUp();
|
|
|
|
|
void SetUpAutotest();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-09-12 01:27:43 +00:00
|
|
|
scoped_ptr<AudioCodingModule> _acmA;
|
|
|
|
|
scoped_ptr<AudioCodingModule> _acmB;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-09-12 01:27:43 +00:00
|
|
|
scoped_ptr<AudioCodingModule> _acmRefA;
|
|
|
|
|
scoped_ptr<AudioCodingModule> _acmRefB;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
Channel* _channel_A2B;
|
|
|
|
|
Channel* _channel_B2A;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
Channel* _channelRef_A2B;
|
|
|
|
|
Channel* _channelRef_B2A;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
PCMFile _inFileA;
|
|
|
|
|
PCMFile _inFileB;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
PCMFile _outFileA;
|
|
|
|
|
PCMFile _outFileB;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
PCMFile _outFileRefA;
|
|
|
|
|
PCMFile _outFileRefB;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
int _testMode;
|
2011-07-07 08:21:25 +00:00
|
|
|
};
|
|
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
#endif
|