Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8eddf4be authored by Josh Hou's avatar Josh Hou Committed by Lajos Molnar
Browse files

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
parent 6ffdc403
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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 @@ status_t CCodecBufferChannel::renderOutputBuffer(
        }
        return result;
    }

    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);
+7 −1
Original line number Diff line number Diff line
@@ -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 @@ ARTPAssembler::AssemblyStatus AAVCAssembler::addFragmentedNALUnit(
void AAVCAssembler::submitAccessUnit() {
    CHECK(!mNALUnits.empty());

    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();