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

Commit 96a76d64 authored by Henry Fang's avatar Henry Fang Committed by Automerger Merge Worker
Browse files

Merge "support changing audio-hw-sync-id during playback." am: 2f844ad4 am: 39740706

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1648029

Change-Id: If7d8b675d5e2d680fef9298747a0426e21f533ae
parents cfc0479b 39740706
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1894,6 +1894,12 @@ void CCodec::signalSetParameters(const sp<AMessage> &msg) {
        params->removeEntryAt(params->findEntryByName(KEY_BIT_RATE));
    }

    int32_t syncId = 0;
    if (params->findInt32("audio-hw-sync", &syncId)
            || params->findInt32("hw-av-sync-id", &syncId)) {
        configureTunneledVideoPlayback(comp, nullptr, params);
    }

    Mutexed<std::unique_ptr<Config>>::Locked configLocked(mConfig);
    const std::unique_ptr<Config> &config = *configLocked;

@@ -2217,6 +2223,10 @@ status_t CCodec::configureTunneledVideoPlayback(
        return UNKNOWN_ERROR;
    }

    if (sidebandHandle == nullptr) {
        return OK;
    }

    std::vector<std::unique_ptr<C2Param>> params;
    c2err = comp->query({}, {C2PortTunnelHandleTuning::output::PARAM_TYPE}, C2_DONT_BLOCK, &params);
    if (c2err == C2_OK && params.size() == 1u) {