VT: print debug logs between nalunits -> decoder -> renderer
Use the property to control whether to print FPS information.
1) Following log will be printed for every nal units which are going to be provided to decoder
10-08 15:23:44.660 D 5626 8278 AAVCAssembler: Access unit complete (1 nal units)
10-08 15:23:44.700 D 5626 8278 AAVCAssembler: Access unit complete (1 nal units)
2) Following log will be printed for every frame which is going to be rendered.
10-08 15:23:44.865 D 5626 8282 CCodecBufferChannel: [c2.exynos.h264.decoder#49] queue buffer successful
10-08 15:23:44.865 D 5626 8282 CCodecBufferChannel: [c2.exynos.h264.decoder#49] queue buffer successful
Bug: 179124671
Test: Verify the property works
Change-Id: I0aa848bb75c0db1821c5a40577c5ca90984753e7
Merged-In: I0aa848bb75c0db1821c5a40577c5ca90984753e7
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.cpp b/media/codec2/sfplugin/CCodecBufferChannel.cpp
index 7386c7d..4d2700a 100644
--- a/media/codec2/sfplugin/CCodecBufferChannel.cpp
+++ b/media/codec2/sfplugin/CCodecBufferChannel.cpp
@@ -30,6 +30,7 @@
#include <android/hardware/cas/native/1.0/IDescrambler.h>
#include <android/hardware/drm/1.0/types.h>
+#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <binder/MemoryBase.h>
#include <binder/MemoryDealer.h>
@@ -891,7 +892,12 @@
}
return result;
}
- ALOGV("[%s] queue buffer successful", mName);
+
+ if(android::base::GetBoolProperty("debug.stagefright.fps", false)) {
+ ALOGD("[%s] queue buffer successful", mName);
+ } else {
+ ALOGV("[%s] queue buffer successful", mName);
+ }
int64_t mediaTimeUs = 0;
(void)buffer->meta()->findInt64("timeUs", &mediaTimeUs);