Change VideoSourceInterface::needs_denoising() to return rtc::Optional<bool>

It turns out that it is used as if it has three states: on/off default.
This reverts back to the behaviour prior to https://codereview.webrtc.org/1773993002

BUG=chromium:594434
R=pbos@webrtc.org, pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1842073002 .

Cr-Commit-Position: refs/heads/master@{#12181}
diff --git a/webrtc/api/mediastreaminterface.h b/webrtc/api/mediastreaminterface.h
index 1ea094b..349fcc0 100644
--- a/webrtc/api/mediastreaminterface.h
+++ b/webrtc/api/mediastreaminterface.h
@@ -23,6 +23,7 @@
 #include "webrtc/base/basictypes.h"
 #include "webrtc/base/refcount.h"
 #include "webrtc/base/scoped_ref_ptr.h"
+#include "webrtc/base/optional.h"
 #include "webrtc/media/base/mediachannel.h"
 #include "webrtc/media/base/videosinkinterface.h"
 #include "webrtc/media/base/videosourceinterface.h"
@@ -124,10 +125,12 @@
   // implicit behavior.
   virtual bool is_screencast() const = 0;
 
-  // Indicates that the encoder should denoise the video before encoding it.
+  // Indicates that the encoder should denoise video before encoding it.
+  // If it is not set, the default configuration is used which is different
+  // depending on video codec.
   // TODO(perkj): Remove this once denoising is done by the source, and not by
   // the encoder.
-  virtual bool needs_denoising() const = 0;
+  virtual rtc::Optional<bool> needs_denoising() const = 0;
 
  protected:
   virtual ~VideoTrackSourceInterface() {}