Change how background noise mode in NetEq is set
This change prepares for switching default background noise (bgn) mode
from on to off. The actual switch will be done later.
In this change, the bgn mode is included as a setting in NetEq's config
struct. We're also removing the connection between playout modes and
bgn modes in ACM. In practice this means that bgn mode will change from
off to on for streaming mode, but since the playout modes are not used
it does not matter.
BUG=3519
R=tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/21749004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6843 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.h b/webrtc/modules/audio_coding/neteq/neteq_impl.h
index e92babd..bc7734b 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.h
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.h
@@ -58,7 +58,7 @@
public:
// Creates a new NetEqImpl object. The object will assume ownership of all
// injected dependencies, and will delete them when done.
- NetEqImpl(int fs,
+ NetEqImpl(const NetEq::Config& config,
BufferLevelFilter* buffer_level_filter,
DecoderDatabase* decoder_database,
DelayManager* delay_manager,
@@ -191,12 +191,6 @@
// This method is to facilitate NACK.
virtual int DecodedRtpInfo(int* sequence_number, uint32_t* timestamp) const;
- // Sets background noise mode.
- virtual void SetBackgroundNoiseMode(NetEqBackgroundNoiseMode mode);
-
- // Gets background noise mode.
- virtual NetEqBackgroundNoiseMode BackgroundNoiseMode() const;
-
// This accessor method is only intended for testing purposes.
virtual const SyncBuffer* sync_buffer_for_test() const;
@@ -387,6 +381,7 @@
bool first_packet_ GUARDED_BY(crit_sect_);
int error_code_ GUARDED_BY(crit_sect_); // Store last error code.
int decoder_error_code_ GUARDED_BY(crit_sect_);
+ const BackgroundNoiseMode background_noise_mode_ GUARDED_BY(crit_sect_);
// These values are used by NACK module to estimate time-to-play of
// a missing packet. Occasionally, NetEq might decide to decode more