Initial upload of NetEq4
This is the first public upload of the new NetEq, version 4. It has been through extensive internal review during the course of the project. TEST=trybots Review URL: https://webrtc-codereview.appspot.com/1073005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3425 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
52
webrtc/modules/audio_coding/neteq4/neteq.cc
Normal file
52
webrtc/modules/audio_coding/neteq4/neteq.cc
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "webrtc/modules/audio_coding/neteq4/interface/neteq.h"
|
||||
|
||||
#include "webrtc/modules/audio_coding/neteq4/buffer_level_filter.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/decoder_database.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/delay_manager.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/delay_peak_detector.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/dtmf_buffer.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/dtmf_tone_generator.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/neteq_impl.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/packet_buffer.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/payload_splitter.h"
|
||||
#include "webrtc/modules/audio_coding/neteq4/timestamp_scaler.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// Creates all classes needed and inject them into a new NetEqImpl object.
|
||||
// Return the new object.
|
||||
NetEq* NetEq::Create(int sample_rate_hz) {
|
||||
BufferLevelFilter* buffer_level_filter = new BufferLevelFilter;
|
||||
DecoderDatabase* decoder_database = new DecoderDatabase;
|
||||
DelayPeakDetector* delay_peak_detector = new DelayPeakDetector;
|
||||
DelayManager* delay_manager = new DelayManager(kMaxNumPacketsInBuffer,
|
||||
delay_peak_detector);
|
||||
DtmfBuffer* dtmf_buffer = new DtmfBuffer(sample_rate_hz);
|
||||
DtmfToneGenerator* dtmf_tone_generator = new DtmfToneGenerator;
|
||||
PacketBuffer* packet_buffer = new PacketBuffer(kMaxNumPacketsInBuffer,
|
||||
kMaxBytesInBuffer);
|
||||
PayloadSplitter* payload_splitter = new PayloadSplitter;
|
||||
TimestampScaler* timestamp_scaler = new TimestampScaler(*decoder_database);
|
||||
return new NetEqImpl(sample_rate_hz,
|
||||
buffer_level_filter,
|
||||
decoder_database,
|
||||
delay_manager,
|
||||
delay_peak_detector,
|
||||
dtmf_buffer,
|
||||
dtmf_tone_generator,
|
||||
packet_buffer,
|
||||
payload_splitter,
|
||||
timestamp_scaler);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
Reference in New Issue
Block a user