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

Commit 39740706 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

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

Change-Id: Ia0bdd7231e0e7b71e7e2926c12a47312c96d96b4
parents c15cd2e4 2f844ad4
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) {