2013-01-29 12:09:21 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2015-10-29 11:31:02 +01:00
|
|
|
#include "webrtc/modules/audio_coding/neteq/include/neteq.h"
|
2013-01-29 12:09:21 +00:00
|
|
|
|
2016-04-27 01:19:58 -07:00
|
|
|
#include <memory>
|
2015-05-25 16:58:41 +02:00
|
|
|
#include <sstream>
|
|
|
|
|
|
2014-06-09 08:10:28 +00:00
|
|
|
#include "webrtc/modules/audio_coding/neteq/neteq_impl.h"
|
2013-01-29 12:09:21 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2015-05-25 16:58:41 +02:00
|
|
|
std::string NetEq::Config::ToString() const {
|
|
|
|
|
std::stringstream ss;
|
2017-01-06 09:49:47 -08:00
|
|
|
ss << "sample_rate_hz=" << sample_rate_hz
|
2015-11-02 03:25:57 -08:00
|
|
|
<< ", enable_post_decode_vad="
|
|
|
|
|
<< (enable_post_decode_vad ? "true" : "false")
|
2015-05-25 16:58:41 +02:00
|
|
|
<< ", max_packets_in_buffer=" << max_packets_in_buffer
|
|
|
|
|
<< ", background_noise_mode=" << background_noise_mode
|
2015-05-27 14:33:29 +02:00
|
|
|
<< ", playout_mode=" << playout_mode
|
2016-05-12 13:51:28 -07:00
|
|
|
<< ", enable_fast_accelerate="
|
|
|
|
|
<< (enable_fast_accelerate ? " true": "false")
|
|
|
|
|
<< ", enable_muted_state=" << (enable_muted_state ? " true": "false");
|
2015-05-25 16:58:41 +02:00
|
|
|
return ss.str();
|
|
|
|
|
}
|
|
|
|
|
|
2013-01-29 12:09:21 +00:00
|
|
|
// Creates all classes needed and inject them into a new NetEqImpl object.
|
|
|
|
|
// Return the new object.
|
2016-05-25 07:37:43 -07:00
|
|
|
NetEq* NetEq::Create(
|
|
|
|
|
const NetEq::Config& config,
|
|
|
|
|
const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) {
|
|
|
|
|
return new NetEqImpl(config,
|
|
|
|
|
NetEqImpl::Dependencies(config, decoder_factory));
|
2013-01-29 12:09:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|