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

Commit 051238c2 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

CCodec: pass video scaling param to CCodecConfig

Bug: 331913507
Bug: 34159087
Test: manual
Test: presubmit
Change-Id: I6ce9b39e4850bea0ad7259d48ef289395917bce4
parent 48adf671
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2633,6 +2633,15 @@ void CCodec::signalSetParameters(const sp<AMessage> &msg) {
    if (config->mInputSurface == nullptr
            && (property_get_bool("debug.stagefright.ccodec_delayed_params", false)
                    || comp->getName().find("c2.android.") == 0)) {
        std::vector<std::unique_ptr<C2Param>> localConfigUpdate;
        for (const std::unique_ptr<C2Param> &param : configUpdate) {
            if (param && param->coreIndex().coreIndex() == C2StreamSurfaceScalingInfo::CORE_INDEX) {
                localConfigUpdate.push_back(C2Param::Copy(*param));
            }
        }
        if (!localConfigUpdate.empty()) {
            (void)config->setParameters(comp, localConfigUpdate, C2_MAY_BLOCK);
        }
        mChannel->setParameters(configUpdate);
    } else {
        sp<AMessage> outputFormat = config->mOutputFormat;