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

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

Issue 1587943004: Add QP statistics logging to Android HW encoder. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Address comments Created 4 years, 11 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 92ea135f120a78f637641aa778e49f01b9e462f2..6fa1817c7c0ffe667b8dcfc5c19453d524c89c96 100644
--- a/talk/app/webrtc/java/jni/androidmediacodeccommon.h
+++ b/talk/app/webrtc/java/jni/androidmediacodeccommon.h
@@ -41,15 +41,7 @@ namespace webrtc_jni {
// video frame.
//#define TRACK_BUFFER_TIMING
-#define TAG "MediaCodecVideo"
-#ifdef TRACK_BUFFER_TIMING
-#define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__)
-#else
-#define ALOGV(...)
-#endif
-#define ALOGD LOG_TAG(rtc::LS_INFO, TAG)
-#define ALOGW LOG_TAG(rtc::LS_WARNING, TAG)
-#define ALOGE LOG_TAG(rtc::LS_ERROR, TAG)
+#define TAG_COMMON "MediaCodecVideo"
// Color formats supported by encoder - should mirror supportedColorList
// from MediaCodecVideoEncoder.java
@@ -78,6 +70,8 @@ enum { kMaxPendingFramesVp9 = 1 };
enum { kMaxPendingFramesH264 = 30 };
// Maximum amount of decoded frames for which per-frame logging is enabled.
enum { kMaxDecodedLogFrames = 5 };
+// Maximum amount of encoded frames for which per-frame logging is enabled.
+enum { kMaxEncodedLogFrames = 5 };
static inline int64_t GetCurrentTimeMs() {
return webrtc::TickTime::Now().Ticks() / 1000000LL;
@@ -102,7 +96,7 @@ static inline jobject JavaEnumFromIndex(
// currently thrown exception.
static inline bool CheckException(JNIEnv* jni) {
if (jni->ExceptionCheck()) {
- ALOGE << "Java JNI exception.";
+ LOG_TAG(rtc::LS_ERROR, TAG_COMMON) << "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