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 74480b8..44ebf84 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>
@@ -895,7 +896,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);
diff --git a/media/libstagefright/rtsp/AAVCAssembler.cpp b/media/libstagefright/rtsp/AAVCAssembler.cpp
index cccb63a..72a377d 100644
--- a/media/libstagefright/rtsp/AAVCAssembler.cpp
+++ b/media/libstagefright/rtsp/AAVCAssembler.cpp
@@ -28,6 +28,8 @@
#include <media/stagefright/foundation/avc_utils.h>
#include <media/stagefright/foundation/hexdump.h>
+#include <android-base/properties.h>
+
#include <stdint.h>
namespace android {
@@ -513,7 +515,11 @@
void AAVCAssembler::submitAccessUnit() {
CHECK(!mNALUnits.empty());
- ALOGV("Access unit complete (%zu nal units)", mNALUnits.size());
+ if(android::base::GetBoolProperty("debug.stagefright.fps", false)) {
+ ALOGD("Access unit complete (%zu nal units)", mNALUnits.size());
+ } else {
+ ALOGV("Access unit complete (%zu nal units)", mNALUnits.size());
+ }
size_t totalSize = 0;
for (List<sp<ABuffer> >::iterator it = mNALUnits.begin();