Changing to using factory methods for some classes in NetEq
In this CL, the Expand, Accelerate and PreemptiveExpand objects are
created using factory methods. The factory methods are injected into
NetEqImpl on creation. This is a step towards implementing a no-decode
operation.
BUG=2776
R=turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/6999005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5382 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq4/neteq.cc b/webrtc/modules/audio_coding/neteq4/neteq.cc
index 1ec71a2..a64f01b 100644
--- a/webrtc/modules/audio_coding/neteq4/neteq.cc
+++ b/webrtc/modules/audio_coding/neteq4/neteq.cc
@@ -10,15 +10,18 @@
#include "webrtc/modules/audio_coding/neteq4/interface/neteq.h"
+#include "webrtc/modules/audio_coding/neteq4/accelerate.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/expand.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/preemptive_expand.h"
#include "webrtc/modules/audio_coding/neteq4/timestamp_scaler.h"
namespace webrtc {
@@ -37,6 +40,10 @@
kMaxBytesInBuffer);
PayloadSplitter* payload_splitter = new PayloadSplitter;
TimestampScaler* timestamp_scaler = new TimestampScaler(*decoder_database);
+ AccelerateFactory* accelerate_factory = new AccelerateFactory;
+ ExpandFactory* expand_factory = new ExpandFactory;
+ PreemptiveExpandFactory* preemptive_expand_factory =
+ new PreemptiveExpandFactory;
return new NetEqImpl(sample_rate_hz,
buffer_level_filter,
decoder_database,
@@ -46,7 +53,10 @@
dtmf_tone_generator,
packet_buffer,
payload_splitter,
- timestamp_scaler);
+ timestamp_scaler,
+ accelerate_factory,
+ expand_factory,
+ preemptive_expand_factory);
}
} // namespace webrtc