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

Commit 68db4f6e authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by Ray Essick
Browse files

benchmark: Exclude format delete from deInit time calculation

Time taken to call AMediaFormat_delete() was included in deInitTime
of components in native tests. This is now moved out of the time
computations

Bug: 147385941
Bug: 147158050
Test: builds
Change-Id: I9acad7a3e22379baab8b46f093872db986171a2a
parent 9c41a9f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -225,12 +225,12 @@ int32_t Decoder::decode(uint8_t *inputBuffer, vector<AMediaCodecBufferInfo> &fra
}

void Decoder::deInitCodec() {
    int64_t sTime = mStats->getCurTime();
    if (mFormat) {
        AMediaFormat_delete(mFormat);
        mFormat = nullptr;
    }
    if (!mCodec) return;
    int64_t sTime = mStats->getCurTime();
    AMediaCodec_stop(mCodec);
    AMediaCodec_delete(mCodec);
    int64_t eTime = mStats->getCurTime();
+1 −1
Original line number Diff line number Diff line
@@ -154,12 +154,12 @@ void Encoder::setupEncoder() {
}

void Encoder::deInitCodec() {
    int64_t sTime = mStats->getCurTime();
    if (mFormat) {
        AMediaFormat_delete(mFormat);
        mFormat = nullptr;
    }
    if (!mCodec) return;
    int64_t sTime = mStats->getCurTime();
    AMediaCodec_stop(mCodec);
    AMediaCodec_delete(mCodec);
    int64_t eTime = mStats->getCurTime();
+1 −1
Original line number Diff line number Diff line
@@ -49,12 +49,12 @@ int32_t Muxer::initMuxer(int32_t fd, MUXER_OUTPUT_T outputFormat) {
}

void Muxer::deInitMuxer() {
    int64_t sTime = mStats->getCurTime();
    if (mFormat) {
        AMediaFormat_delete(mFormat);
        mFormat = nullptr;
    }
    if (!mMuxer) return;
    int64_t sTime = mStats->getCurTime();
    AMediaMuxer_stop(mMuxer);
    AMediaMuxer_delete(mMuxer);
    int64_t eTime = mStats->getCurTime();