talk: Use NDEBUG macro.

NDEBUG is a standard macro with the semantic "Not Debug" for C89, C99, C++98,
  C++2003, C++2011, C++2014 standards. There are no _DEBUG macros in the
  standards.

_DEBUG is a macro Visual Studio defines when you specify the /MTd or /MDd
option.

http://stackoverflow.com/a/29253284/5237416

This should help fix the TODO in third_party/libjingle/libjingle.gyp

BUG=None
R=sergeyu@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#10377}
diff --git a/talk/app/webrtc/objc/public/RTCLogging.h b/talk/app/webrtc/objc/public/RTCLogging.h
index 5fb3ef0..bcd160d 100644
--- a/talk/app/webrtc/objc/public/RTCLogging.h
+++ b/talk/app/webrtc/objc/public/RTCLogging.h
@@ -81,7 +81,7 @@
 #define RTCLogError(format, ...)                                  \
   RTCLogFormat(kRTCLoggingSeverityError, format, ##__VA_ARGS__)   \
 
-#ifdef _DEBUG
+#if !defined(NDEBUG)
 #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__)
 #else
 #define RTCLogDebug(format, ...) \
diff --git a/talk/media/base/videoframe_unittest.h b/talk/media/base/videoframe_unittest.h
index 2f72935..73d1a2f 100644
--- a/talk/media/base/videoframe_unittest.h
+++ b/talk/media/base/videoframe_unittest.h
@@ -1251,7 +1251,7 @@
   // The following test that Validate crashes if the size is greater than the
   // actual buffer size.
   // TODO(fbarchard): Consider moving a filter into the capturer/plugin.
-#if defined(_MSC_VER) && defined(_DEBUG)
+#if defined(_MSC_VER) && !defined(NDEBUG)
   int ExceptionFilter(unsigned int code, struct _EXCEPTION_POINTERS *ep) {
     if (code == EXCEPTION_ACCESS_VIOLATION) {
       LOG(LS_INFO) << "Caught EXCEPTION_ACCESS_VIOLATION as expected.";
diff --git a/talk/media/base/videorenderer.h b/talk/media/base/videorenderer.h
index 118942e..0a0ee51 100644
--- a/talk/media/base/videorenderer.h
+++ b/talk/media/base/videorenderer.h
@@ -28,9 +28,9 @@
 #ifndef TALK_MEDIA_BASE_VIDEORENDERER_H_
 #define TALK_MEDIA_BASE_VIDEORENDERER_H_
 
-#ifdef _DEBUG
+#if !defined(NDEBUG)
 #include <string>
-#endif  // _DEBUG
+#endif
 
 #include "webrtc/base/sigslot.h"
 
@@ -50,10 +50,10 @@
   // Called when a new frame is available for display.
   virtual bool RenderFrame(const VideoFrame *frame) = 0;
 
-#ifdef _DEBUG
+#if !defined(NDEBUG)
   // Allow renderer dumping out rendered frames.
   virtual bool SetDumpPath(const std::string &path) { return true; }
-#endif  // _DEBUG
+#endif
 };
 
 }  // namespace cricket
diff --git a/talk/session/media/srtpfilter.cc b/talk/session/media/srtpfilter.cc
index 8a95b75..079ddfb 100644
--- a/talk/session/media/srtpfilter.cc
+++ b/talk/session/media/srtpfilter.cc
@@ -57,7 +57,7 @@
 #ifdef  ENABLE_EXTERNAL_AUTH
 #include "talk/session/media/externalhmac.h"
 #endif  // ENABLE_EXTERNAL_AUTH
-#ifdef _DEBUG
+#if !defined(NDEBUG)
 extern "C" debug_module_t mod_srtp;
 extern "C" debug_module_t mod_auth;
 extern "C" debug_module_t mod_cipher;
@@ -92,7 +92,7 @@
 
 void EnableSrtpDebugging() {
 #ifdef HAVE_SRTP
-#ifdef _DEBUG
+#if !defined(NDEBUG)
   debug_on(mod_srtp);
   debug_on(mod_auth);
   debug_on(mod_cipher);