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
This commit is contained in:
@ -58,27 +58,29 @@ enum NetEqPlayoutMode {
|
||||
kPlayoutStreaming
|
||||
};
|
||||
|
||||
enum NetEqBackgroundNoiseMode {
|
||||
kBgnOn, // Default behavior with eternal noise.
|
||||
kBgnFade, // Noise fades to zero after some time.
|
||||
kBgnOff // Background noise is always zero.
|
||||
};
|
||||
|
||||
// This is the interface class for NetEq.
|
||||
class NetEq {
|
||||
public:
|
||||
enum BackgroundNoiseMode {
|
||||
kBgnOn, // Default behavior with eternal noise.
|
||||
kBgnFade, // Noise fades to zero after some time.
|
||||
kBgnOff // Background noise is always zero.
|
||||
};
|
||||
|
||||
struct Config {
|
||||
Config()
|
||||
: sample_rate_hz(16000),
|
||||
enable_audio_classifier(false),
|
||||
max_packets_in_buffer(50),
|
||||
// |max_delay_ms| has the same effect as calling SetMaximumDelay().
|
||||
max_delay_ms(2000) {}
|
||||
max_delay_ms(2000),
|
||||
background_noise_mode(kBgnOn) {}
|
||||
|
||||
int sample_rate_hz; // Initial vale. Will change with input data.
|
||||
bool enable_audio_classifier;
|
||||
int max_packets_in_buffer;
|
||||
int max_delay_ms;
|
||||
BackgroundNoiseMode background_noise_mode;
|
||||
};
|
||||
|
||||
enum ReturnCodes {
|
||||
@ -259,12 +261,6 @@ class NetEq {
|
||||
virtual int DecodedRtpInfo(int* sequence_number,
|
||||
uint32_t* timestamp) const = 0;
|
||||
|
||||
// Sets the background noise mode.
|
||||
virtual void SetBackgroundNoiseMode(NetEqBackgroundNoiseMode mode) = 0;
|
||||
|
||||
// Gets the background noise mode.
|
||||
virtual NetEqBackgroundNoiseMode BackgroundNoiseMode() const = 0;
|
||||
|
||||
protected:
|
||||
NetEq() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user