From 1e7ed7afe9e5c64b215a33fa6909e1edac17abd1 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Tue, 5 Feb 2013 21:23:39 +0000 Subject: [PATCH] Use LOG_F interface for unsupported functions. This will provide the function name in the log. BUG=b/8115521 TESTED=enabled ANDROID_NOT_SUPPORTED on Linux and observed log lines as expected Review URL: https://webrtc-codereview.appspot.com/1096005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3474 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/voice_engine/voice_engine_defines.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/webrtc/voice_engine/voice_engine_defines.h b/webrtc/voice_engine/voice_engine_defines.h index c2d9a42801..a542c3e92f 100644 --- a/webrtc/voice_engine/voice_engine_defines.h +++ b/webrtc/voice_engine/voice_engine_defines.h @@ -16,8 +16,9 @@ #ifndef WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H #define WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H -#include "common_types.h" -#include "engine_configurations.h" +#include "webrtc/common_types.h" +#include "webrtc/engine_configurations.h" +#include "webrtc/system_wrappers/interface/logging.h" // ---------------------------------------------------------------------------- // Enumerators @@ -188,6 +189,11 @@ enum { kVoiceEngineMaxRtpExtensionId = 14 }; // Macros // ---------------------------------------------------------------------------- +#define NOT_SUPPORTED(stat) \ + LOG_F(LS_ERROR) << "not supported"; \ + stat.SetLastError(VE_FUNC_NOT_SUPPORTED); \ + return -1; + #if (defined(_DEBUG) && defined(_WIN32) && (_MSC_VER >= 1400)) #include #include @@ -356,10 +362,7 @@ inline int VoEChannelId(const int moduleId) #define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \ GainControl::kAdaptiveDigital - #define ANDROID_NOT_SUPPORTED(stat) \ - stat.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, \ - "API call not supported"); \ - return -1; + #define ANDROID_NOT_SUPPORTED(stat) NOT_SUPPORTED(stat) #else // LINUX PC @@ -455,10 +458,7 @@ inline int VoEChannelId(const int moduleId) #define WEBRTC_VOICE_ENGINE_AGC_DEFAULT_MODE \ GainControl::kAdaptiveDigital - #define IPHONE_NOT_SUPPORTED(stat) \ - stat.SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError, \ - "API call not supported"); \ - return -1; + #define IPHONE_NOT_SUPPORTED(stat) NOT_SUPPORTED(stat) #else // Non-iPhone