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

Commit fb5ebcc8 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5470312 from d3757001 to qt-release

Change-Id: I6d56d20e314619a82a9c446e6a8ac34911f538b1
parents 258ea574 d3757001
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8311,6 +8311,7 @@ typedef enum acamera_metadata_enum_acamera_info_supported_hardware_level {
     * fire the flash for flash power metering during precapture, and then fire the flash
     * for the final capture, if a flash is available on the device and the AE mode is set to
     * enable the flash.</p>
     * <p>Devices that initially shipped with Android version <a href="https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#Q">Q</a> or newer will not include any LEGACY-level devices.</p>
     *
     * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
     * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ cc_library_shared {
        "C2OMXNode.cpp",
        "CCodec.cpp",
        "CCodecBufferChannel.cpp",
        "CCodecBuffers.cpp",
        "CCodecConfig.cpp",
        "Codec2Buffer.cpp",
        "Codec2InfoBuilder.cpp",
+13 −7
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ status_t C2OMXNode::emptyBuffer(
        return UNKNOWN_ERROR;
    }

    (void)mBufferIdsInUse.emplace(index, buffer);
    mBufferIdsInUse.lock()->emplace(index, buffer);
    return OK;
}

@@ -327,13 +327,19 @@ void C2OMXNode::onInputBufferDone(c2_cntr64_t index) {
        ALOGD("Buffer source not set (index=%llu)", index.peekull());
        return;
    }
    auto it = mBufferIdsInUse.find(index.peeku());
    if (it == mBufferIdsInUse.end()) {

    int32_t bufferId = 0;
    {
        decltype(mBufferIdsInUse)::Locked bufferIds(mBufferIdsInUse);
        auto it = bufferIds->find(index.peeku());
        if (it == bufferIds->end()) {
            ALOGV("Untracked input index %llu (maybe already removed)", index.peekull());
            return;
        }
    (void)mBufferSource->onInputBufferEmptied(it->second, -1);
    (void)mBufferIdsInUse.erase(it);
        bufferId = it->second;
        (void)bufferIds->erase(it);
    }
    (void)mBufferSource->onInputBufferEmptied(bufferId, -1);
}

}  // namespace android
+3 −2
Original line number Diff line number Diff line
@@ -20,9 +20,10 @@
#include <atomic>

#include <android/IOMXBufferSource.h>
#include <codec2/hidl/client.h>
#include <media/stagefright/foundation/Mutexed.h>
#include <media/IOMX.h>
#include <media/OMXBuffer.h>
#include <codec2/hidl/client.h>

namespace android {

@@ -111,7 +112,7 @@ private:
    c2_cntr64_t mPrevInputTimestamp; // input timestamp for previous frame
    c2_cntr64_t mPrevCodecTimestamp; // adjusted (codec) timestamp for previous frame

    std::map<uint64_t, buffer_id> mBufferIdsInUse;
    Mutexed<std::map<uint64_t, buffer_id>> mBufferIdsInUse;
};

}  // namespace android
Loading