blob: c2a0cb66d15fd3ae27c4e232ec5ec14f01108372 [file] [log] [blame]
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +00001/*
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
Henrik Kjellander74640892015-10-29 11:31:02 +010011#include "webrtc/modules/audio_coding/neteq/include/neteq.h"
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000012
Henrik Lundin905495c2015-05-25 16:58:41 +020013#include <sstream>
14
henrik.lundin@webrtc.org9c55f0f2014-06-09 08:10:28 +000015#include "webrtc/modules/audio_coding/neteq/neteq_impl.h"
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000016
17namespace webrtc {
18
Henrik Lundin905495c2015-05-25 16:58:41 +020019std::string NetEq::Config::ToString() const {
20 std::stringstream ss;
21 ss << "sample_rate_hz=" << sample_rate_hz << ", enable_audio_classifier="
22 << (enable_audio_classifier ? "true" : "false")
henrik.lundin9bc26672015-11-02 03:25:57 -080023 << ", enable_post_decode_vad="
24 << (enable_post_decode_vad ? "true" : "false")
Henrik Lundin905495c2015-05-25 16:58:41 +020025 << ", max_packets_in_buffer=" << max_packets_in_buffer
26 << ", background_noise_mode=" << background_noise_mode
Henrik Lundincf808d22015-05-27 14:33:29 +020027 << ", playout_mode=" << playout_mode
28 << ", enable_fast_accelerate=" << enable_fast_accelerate;
Henrik Lundin905495c2015-05-25 16:58:41 +020029 return ss.str();
30}
31
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000032// Creates all classes needed and inject them into a new NetEqImpl object.
33// Return the new object.
henrik.lundin@webrtc.org35ead382014-04-14 18:49:17 +000034NetEq* NetEq::Create(const NetEq::Config& config) {
henrik.lundin1d9061e2016-04-26 12:19:34 -070035 return new NetEqImpl(config, NetEqImpl::Dependencies(config));
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000036}
37
38} // namespace webrtc