TwoWayCommunication.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
  3. *
  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. #ifndef MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_
  11. #define MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_
  12. #include <memory>
  13. #include "api/audio_codecs/audio_encoder_factory.h"
  14. #include "api/audio_codecs/audio_format.h"
  15. #include "modules/audio_coding/include/audio_coding_module.h"
  16. #include "modules/audio_coding/test/Channel.h"
  17. #include "modules/audio_coding/test/PCMFile.h"
  18. namespace webrtc {
  19. class TwoWayCommunication {
  20. public:
  21. TwoWayCommunication();
  22. ~TwoWayCommunication();
  23. void Perform();
  24. private:
  25. void SetUpAutotest(AudioEncoderFactory* const encoder_factory,
  26. const SdpAudioFormat& format1,
  27. const int payload_type1,
  28. const SdpAudioFormat& format2,
  29. const int payload_type2);
  30. std::unique_ptr<AudioCodingModule> _acmA;
  31. std::unique_ptr<AudioCodingModule> _acmB;
  32. std::unique_ptr<AudioCodingModule> _acmRefA;
  33. std::unique_ptr<AudioCodingModule> _acmRefB;
  34. Channel* _channel_A2B;
  35. Channel* _channel_B2A;
  36. Channel* _channelRef_A2B;
  37. Channel* _channelRef_B2A;
  38. PCMFile _inFileA;
  39. PCMFile _inFileB;
  40. PCMFile _outFileA;
  41. PCMFile _outFileB;
  42. PCMFile _outFileRefA;
  43. PCMFile _outFileRefB;
  44. };
  45. } // namespace webrtc
  46. #endif // MODULES_AUDIO_CODING_TEST_TWOWAYCOMMUNICATION_H_