Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: talk/app/webrtc/java/jni/androidmediacodeccommon.h

Issue 1396653002: Use WebRTC logging in MediaCodec JNI code. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: i Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | talk/app/webrtc/java/jni/androidmediadecoder_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/java/jni/androidmediacodeccommon.h
diff --git a/talk/app/webrtc/java/jni/androidmediacodeccommon.h b/talk/app/webrtc/java/jni/androidmediacodeccommon.h
index ca31bfec1c18838204750830385aed17be2a3113..33c5a6d3c0d12e2137cc813efc735d3e94e5ae38 100644
--- a/talk/app/webrtc/java/jni/androidmediacodeccommon.h
+++ b/talk/app/webrtc/java/jni/androidmediacodeccommon.h
@@ -32,6 +32,7 @@
#include <android/log.h>
#include "talk/app/webrtc/java/jni/classreferenceholder.h"
#include "webrtc/base/thread.h"
+#include "webrtc/base/logging.h"
#include "webrtc/system_wrappers/interface/tick_util.h"
namespace webrtc_jni {
@@ -46,9 +47,9 @@ namespace webrtc_jni {
#else
#define ALOGV(...)
#endif
-#define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__)
-#define ALOGW(...) __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__)
-#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__)
+#define ALOGD LOG_TAG(rtc::LS_INFO, TAG)
+#define ALOGW LOG_TAG(rtc::LS_WARNING, TAG)
+#define ALOGE LOG_TAG(rtc::LS_ERROR, TAG)
// Color formats supported by encoder - should mirror supportedColorList
// from MediaCodecVideoEncoder.java
@@ -97,7 +98,7 @@ static inline jobject JavaEnumFromIndex(
// currently thrown exception.
static inline bool CheckException(JNIEnv* jni) {
if (jni->ExceptionCheck()) {
- ALOGE("Java JNI exception.");
+ ALOGE << "Java JNI exception.";
jni->ExceptionDescribe();
jni->ExceptionClear();
return true;
« no previous file with comments | « no previous file | talk/app/webrtc/java/jni/androidmediadecoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698