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

Commit cc50ca89 authored by Wonsik Kim's avatar Wonsik Kim Committed by Android (Google) Code Review
Browse files

Merge "CCodec: handle delay config update" into qt-dev

parents c9992148 5ecf383e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1724,8 +1724,11 @@ void CCodec::onMessageReceived(const sp<AMessage> &msg) {
                            & C2FrameData::FLAG_DISCARD_FRAME) == 0) {

                // copy buffer info to config
                std::vector<std::unique_ptr<C2Param>> updates =
                    std::move(work->worklets.front()->output.configUpdate);
                std::vector<std::unique_ptr<C2Param>> updates;
                for (const std::unique_ptr<C2Param> &param
                        : work->worklets.front()->output.configUpdate) {
                    updates.push_back(C2Param::Copy(*param));
                }
                unsigned stream = 0;
                for (const std::shared_ptr<C2Buffer> &buf : work->worklets.front()->output.buffers) {
                    for (const std::shared_ptr<const C2Info> &info : buf->info()) {
+195 −80

File changed.

Preview size limit exceeded, changes collapsed.

+18 −5
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ private:

    void feedInputBufferIfAvailable();
    void feedInputBufferIfAvailableInternal();
    status_t queueInputBufferInternal(const sp<MediaCodecBuffer> &buffer);
    status_t queueInputBufferInternal(sp<MediaCodecBuffer> buffer);
    bool handleWork(
            std::unique_ptr<C2Work> work, const sp<AMessage> &outputFormat,
            const C2StreamInitDataInfo::output *initData);
@@ -228,13 +228,26 @@ private:
    QueueSync mQueueSync;
    std::vector<std::unique_ptr<C2Param>> mParamsToBeSet;

    size_t mNumInputSlots;
    size_t mNumOutputSlots;
    size_t mDelay;

    Mutexed<std::unique_ptr<InputBuffers>> mInputBuffers;
    struct Input {
        Input();

        std::unique_ptr<InputBuffers> buffers;
        size_t numSlots;
        FlexBuffersImpl extraBuffers;
        size_t numExtraSlots;
        uint32_t inputDelay;
        uint32_t pipelineDelay;
    };
    Mutexed<Input> mInput;
    struct Output {
        std::unique_ptr<OutputBuffers> buffers;
        size_t numSlots;
        uint32_t outputDelay;
    };
    Mutexed<Output> mOutput;
    Mutexed<std::list<sp<ABuffer>>> mFlushedConfigs;
    Mutexed<std::unique_ptr<OutputBuffers>> mOutputBuffers;

    std::atomic_uint64_t mFrameIndex;
    std::atomic_uint64_t mFirstValidFrameIndex;
+157 −65

File changed.

Preview size limit exceeded, changes collapsed.

+85 −21

File changed.

Preview size limit exceeded, changes collapsed.

Loading