Reland (rev 7259) "Convert AcmReceiverTest to new AudioCoding interface"

Was reverted by mistake in 7260. Actual culprit was 7258.

BUG=3520
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/22719004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7272 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andresp@webrtc.org
2014-09-23 11:37:57 +00:00
parent ea29787df0
commit 4f6f22f0c6
6 changed files with 431 additions and 24 deletions

View File

@ -1015,6 +1015,14 @@ class AudioCoding {
playout_channels(1),
playout_frequency_hz(32000) {}
AudioCodingModule::Config ToOldConfig() const {
AudioCodingModule::Config old_config;
old_config.id = 0;
old_config.neteq_config = neteq_config;
old_config.clock = clock;
return old_config;
}
NetEq::Config neteq_config;
Clock* clock;
AudioPacketizationCallback* transport;
@ -1046,6 +1054,9 @@ class AudioCoding {
// codec that was registered in the latest call to RegisterSendCodec().
virtual const AudioEncoder* GetSenderInfo() const = 0;
// Temporary solution to be used during refactoring.
virtual const CodecInst* GetSenderCodecInst() = 0;
// Adds 10 ms of raw (PCM) audio data to the encoder. If the sampling
// frequency of the audio does not match the sampling frequency of the
// current encoder, ACM will resample the audio.
@ -1139,6 +1150,22 @@ class AudioCoding {
// Disables NACK.
virtual void DisableNack() = 0;
// Temporary solution to be used during refactoring.
// If DTX is enabled and the codec does not have internal DTX/VAD
// WebRtc VAD will be automatically enabled and |enable_vad| is ignored.
//
// If DTX is disabled but VAD is enabled no DTX packets are sent,
// regardless of whether the codec has internal DTX/VAD or not. In this
// case, WebRtc VAD is running to label frames as active/in-active.
//
// NOTE! VAD/DTX is not supported when sending stereo.
//
// Return true if successful, false otherwise.
virtual bool SetVad(bool enable_dtx,
bool enable_vad,
ACMVADMode vad_mode) = 0;
// Returns a list of packets to request retransmission of.
// |round_trip_time_ms| is an estimate of the round-trip-time (in
// milliseconds). Missing packets which will be decoded sooner than the