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

Commit d6628ebe authored by Xiao Huang's avatar Xiao Huang Committed by Automerger Merge Worker
Browse files

Merge "change ALOGD() to ALOGV() in onWorkDone() when tunneled" am: b416f3bb

parents 929c9a2f b416f3bb
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1586,7 +1586,8 @@ status_t CCodecBufferChannel::start(
        watcher->inputDelay(inputDelayValue)
        watcher->inputDelay(inputDelayValue)
                .pipelineDelay(pipelineDelayValue)
                .pipelineDelay(pipelineDelayValue)
                .outputDelay(outputDelayValue)
                .outputDelay(outputDelayValue)
                .smoothnessFactor(kSmoothnessFactor);
                .smoothnessFactor(kSmoothnessFactor)
                .tunneled(mTunneled);
        watcher->flush();
        watcher->flush();
    }
    }


+12 −2
Original line number Original line Diff line number Diff line
@@ -45,6 +45,11 @@ PipelineWatcher &PipelineWatcher::smoothnessFactor(uint32_t value) {
    return *this;
    return *this;
}
}


PipelineWatcher &PipelineWatcher::tunneled(bool value) {
    mTunneled = value;
    return *this;
}

void PipelineWatcher::onWorkQueued(
void PipelineWatcher::onWorkQueued(
        uint64_t frameIndex,
        uint64_t frameIndex,
        std::vector<std::shared_ptr<C2Buffer>> &&buffers,
        std::vector<std::shared_ptr<C2Buffer>> &&buffers,
@@ -87,8 +92,13 @@ void PipelineWatcher::onWorkDone(uint64_t frameIndex) {
    ALOGV("onWorkDone(frameIndex=%llu)", (unsigned long long)frameIndex);
    ALOGV("onWorkDone(frameIndex=%llu)", (unsigned long long)frameIndex);
    auto it = mFramesInPipeline.find(frameIndex);
    auto it = mFramesInPipeline.find(frameIndex);
    if (it == mFramesInPipeline.end()) {
    if (it == mFramesInPipeline.end()) {
        if (!mTunneled) {
            ALOGD("onWorkDone: frameIndex not found (%llu); ignored",
            ALOGD("onWorkDone: frameIndex not found (%llu); ignored",
                  (unsigned long long)frameIndex);
                  (unsigned long long)frameIndex);
        } else {
            ALOGV("onWorkDone: frameIndex not found (%llu); ignored",
                  (unsigned long long)frameIndex);
        }
        return;
        return;
    }
    }
    (void)mFramesInPipeline.erase(it);
    (void)mFramesInPipeline.erase(it);
+9 −1
Original line number Original line Diff line number Diff line
@@ -37,7 +37,8 @@ public:
        : mInputDelay(0),
        : mInputDelay(0),
          mPipelineDelay(0),
          mPipelineDelay(0),
          mOutputDelay(0),
          mOutputDelay(0),
          mSmoothnessFactor(0) {}
          mSmoothnessFactor(0),
          mTunneled(false) {}
    ~PipelineWatcher() = default;
    ~PipelineWatcher() = default;


    /**
    /**
@@ -64,6 +65,12 @@ public:
     */
     */
    PipelineWatcher &smoothnessFactor(uint32_t value);
    PipelineWatcher &smoothnessFactor(uint32_t value);


    /**
     * \param value the new tunneled value
     * \return  this object
     */
    PipelineWatcher &tunneled(bool value);

    /**
    /**
     * Client queued a work item to the component.
     * Client queued a work item to the component.
     *
     *
@@ -122,6 +129,7 @@ private:
    uint32_t mPipelineDelay;
    uint32_t mPipelineDelay;
    uint32_t mOutputDelay;
    uint32_t mOutputDelay;
    uint32_t mSmoothnessFactor;
    uint32_t mSmoothnessFactor;
    bool mTunneled;


    struct Frame {
    struct Frame {
        Frame(std::vector<std::shared_ptr<C2Buffer>> &&b,
        Frame(std::vector<std::shared_ptr<C2Buffer>> &&b,