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

Commit 160e69bf authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "RELAND CCodec: don't drop metadata for output with flag FLAG_DROP_FRAME."

parents cde72466 ec585c3e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1400,6 +1400,10 @@ void CCodec::configure(const sp<AMessage> &msg) {
            }
        }

        if (config->mTunneled) {
            config->mOutputFormat->setInt32("android._tunneled", 1);
        }

        ALOGD("setup formats input: %s",
                config->mInputFormat->debugString().c_str());
        ALOGD("setup formats output: %s",
+20 −3
Original line number Diff line number Diff line
@@ -1358,6 +1358,12 @@ status_t CCodecBufferChannel::start(
                }
            }
        }

        int32_t tunneled = 0;
        if (!outputFormat->findInt32("android._tunneled", &tunneled)) {
            tunneled = 0;
        }
        mTunneled = (tunneled != 0);
    }

    // Set up pipeline control. This has to be done after mInputBuffers and
@@ -1853,11 +1859,22 @@ bool CCodecBufferChannel::handleWork(
        }
    }

    bool drop = false;
    if (worklet->output.flags & C2FrameData::FLAG_DROP_FRAME) {
        ALOGV("[%s] onWorkDone: drop buffer but keep metadata", mName);
        drop = true;
    }

    if (notifyClient && !buffer && !flags) {
        if (mTunneled && drop && outputFormat) {
            ALOGV("[%s] onWorkDone: Keep tunneled, drop frame with format change (%lld)",
                  mName, work->input.ordinal.frameIndex.peekull());
        } else {
            ALOGV("[%s] onWorkDone: Not reporting output buffer (%lld)",
                  mName, work->input.ordinal.frameIndex.peekull());
            notifyClient = false;
        }
    }

    if (buffer) {
        for (const std::shared_ptr<const C2Info> &info : buffer->info()) {
+2 −0
Original line number Diff line number Diff line
@@ -323,6 +323,8 @@ private:
        return mCrypto != nullptr || mDescrambler != nullptr;
    }
    std::atomic_bool mSendEncryptedInfoBuffer;

    std::atomic_bool mTunneled;
};

// Conversion of a c2_status_t value to a status_t value may depend on the