summaryrefslogtreecommitdiff
path: root/voice_engine
diff options
context:
space:
mode:
authorandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-02-05 21:23:39 +0000
committerandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-02-05 21:23:39 +0000
commit81b54fe4e262b6051a30acd464a6c8271ca51802 (patch)
tree4c37257499044a4179a3bba6fabaa9ba2978f8b8 /voice_engine
parent6030fcf96c2b92be45e8029cbb6100d8780e2e15 (diff)
downloadwebrtc-81b54fe4e262b6051a30acd464a6c8271ca51802.tar.gz
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/webrtc@3474 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine')
-rw-r--r--voice_engine/voice_engine_defines.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/voice_engine/voice_engine_defines.h b/voice_engine/voice_engine_defines.h
index c2d9a428..a542c3e9 100644
--- a/voice_engine/voice_engine_defines.h
+++ b/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 <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