Chromium Code Reviews| Index: webrtc/voice_engine/include/voe_base.h |
| diff --git a/webrtc/voice_engine/include/voe_base.h b/webrtc/voice_engine/include/voe_base.h |
| index 91df7d3e4f2c8dd688c2077da24acc0e48cf039c..c7a3f7f51e052fd250e79e2a3cc74c7570de3c59 100644 |
| --- a/webrtc/voice_engine/include/voe_base.h |
| +++ b/webrtc/voice_engine/include/voe_base.h |
| @@ -36,6 +36,7 @@ |
| #include "webrtc/base/scoped_ref_ptr.h" |
| #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" |
| +#include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
| #include "webrtc/common_types.h" |
| namespace webrtc { |
| @@ -43,9 +44,6 @@ namespace webrtc { |
| class AudioDeviceModule; |
| class AudioProcessing; |
| class AudioTransport; |
| -class Config; |
| - |
| -const int kVoEDefault = -1; |
| // VoiceEngineObserver |
| class WEBRTC_DLLEXPORT VoiceEngineObserver { |
| @@ -65,7 +63,6 @@ class WEBRTC_DLLEXPORT VoiceEngine { |
| // Creates a VoiceEngine object, which can then be used to acquire |
| // sub-APIs. Returns NULL on failure. |
| static VoiceEngine* Create(); |
| - static VoiceEngine* Create(const Config& config); |
| // Deletes a created VoiceEngine object and releases the utilized resources. |
| // Note that if there are outstanding references held via other interfaces, |
| @@ -99,6 +96,11 @@ class WEBRTC_DLLEXPORT VoiceEngine { |
| // VoEBase |
| class WEBRTC_DLLEXPORT VoEBase { |
| public: |
| + struct ChannelConfig { |
|
hlundin-webrtc
2016/09/05 11:28:42
We tend to let the Config struct of a class reside
kwiberg-webrtc
2016/09/05 14:36:24
+1
the sun
2016/09/05 15:25:04
Agree in principle, but
-2
The Channel class is
hlundin-webrtc
2016/09/06 12:07:21
Acknowledged.
|
| + AudioCodingModule::Config acm_config; |
| + bool enable_voice_pacing = false; |
| + }; |
| + |
| // Factory for the VoEBase sub-API. Increases an internal reference |
| // counter if successful. Returns NULL if the API is not supported or if |
| // construction fails. |
| @@ -146,11 +148,11 @@ class WEBRTC_DLLEXPORT VoEBase { |
| virtual int Terminate() = 0; |
| // Creates a new channel and allocates the required resources for it. |
| - // One can use |config| to configure the channel. Currently that is used for |
| - // choosing between ACM1 and ACM2, when creating Audio Coding Module. |
| + // The second version accepts a |config| struct which includes an Audio Coding |
| + // Module config and an option to enable voice pacing. |
| // Returns channel ID or -1 in case of an error. |
| virtual int CreateChannel() = 0; |
| - virtual int CreateChannel(const Config& config) = 0; |
| + virtual int CreateChannel(const ChannelConfig& config) = 0; |
| // Deletes an existing channel and releases the utilized resources. |
| // Returns -1 in case of an error, 0 otherwise. |