Allow an external audio processing module to be used in WebRTC

[This CL is a rebase of an original CL by solenberg@:
https://codereview.webrtc.org/2948763002/ which in turn was a
rebase of an original CL by peah@:
https://chromium-review.googlesource.com/c/527032/]

Allow an external audio processing module to be used in WebRTC

This CL adds support for optionally using an externally created audio
processing module in a peerconnection. The ownership is shared
between the peerconnection and the external creator of the module.

As part of this the internal ownership of the audio processing module
is moved from VoiceEngine to WebRtcVoiceEngine.

BUG=webrtc:7775

Review-Url: https://codereview.webrtc.org/2961723004
Cr-Commit-Position: refs/heads/master@{#18837}
This commit is contained in:
peah
2017-06-29 08:32:09 -07:00
committed by Commit Bot
parent 3dbfac3515
commit a9cc40b7d2
53 changed files with 320 additions and 208 deletions

View File

@ -21,6 +21,7 @@
#include "webrtc/base/arraysize.h"
#include "webrtc/base/platform_file.h"
#include "webrtc/base/refcount.h"
#include "webrtc/modules/audio_processing/beamformer/array_util.h"
#include "webrtc/modules/audio_processing/include/config.h"
#include "webrtc/typedefs.h"
@ -233,7 +234,7 @@ struct Intelligibility {
// // Close the application...
// delete apm;
//
class AudioProcessing {
class AudioProcessing : public rtc::RefCountInterface {
public:
// The struct below constitutes the new parameter scheme for the audio
// processing. It is being introduced gradually and until it is fully
@ -300,7 +301,7 @@ class AudioProcessing {
// Only for testing.
static AudioProcessing* Create(const webrtc::Config& config,
NonlinearBeamformer* beamformer);
virtual ~AudioProcessing() {}
~AudioProcessing() override {}
// Initializes internal states, while retaining all user settings. This
// should be called before beginning to process a new audio stream. However,