Adding a config struct to NetEq

With this change, the parameters sent to the NetEq::Create method are
collected in one NetEq::Config struct. The benefit is that it is easier
to set, change and override default values, and easier to expand with
more parameters in the future.

BUG=3083
R=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5902 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq4/interface/neteq.h b/webrtc/modules/audio_coding/neteq4/interface/neteq.h
index c0f7fd6..0f6f406 100644
--- a/webrtc/modules/audio_coding/neteq4/interface/neteq.h
+++ b/webrtc/modules/audio_coding/neteq4/interface/neteq.h
@@ -67,6 +67,15 @@
 // This is the interface class for NetEq.
 class NetEq {
  public:
+  struct Config {
+    Config()
+        : sample_rate_hz(16000),
+          enable_audio_classifier(false) {}
+
+    int sample_rate_hz;  // Initial vale. Will change with input data.
+    bool enable_audio_classifier;
+  };
+
   enum ReturnCodes {
     kOK = 0,
     kFail = -1,
@@ -105,11 +114,10 @@
   static const int kMaxNumPacketsInBuffer = 50;  // TODO(hlundin): Remove.
   static const int kMaxBytesInBuffer = 113280;  // TODO(hlundin): Remove.
 
-  // Creates a new NetEq object, starting at the sample rate |sample_rate_hz|.
-  // (Note that it will still change the sample rate depending on what payloads
-  // are being inserted; |sample_rate_hz| is just for startup configuration.)
-  static NetEq* Create(int sample_rate_hz,
-                       bool enable_audio_classifier = false);
+  // Creates a new NetEq object, with parameters set in |config|. The |config|
+  // object will only have to be valid for the duration of the call to this
+  // method.
+  static NetEq* Create(const NetEq::Config& config);
 
   virtual ~NetEq() {}