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
This commit is contained in:
andrew@webrtc.org 2013-02-05 21:23:39 +00:00
parent 959da8d286
commit 1e7ed7afe9

View File

@ -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 <windows.h>
#include <stdio.h>
@ -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