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

Commit 357d2592 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9095712 from cbbb6a56 to tm-qpr1-release

Change-Id: I556ad5379e8f58469666e97f31b7ac51503232ab
parents 11bf3048 cbbb6a56
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1613,6 +1613,7 @@ bool parseParamsBlob(std::vector<C2Param*> *params, const hidl_vec<uint8_t> &blo
    // assuming blob is const here
    size_t size = blob.size();
    size_t ix = 0;
    size_t old_ix = 0;
    const uint8_t *data = blob.data();
    C2Param *p = nullptr;

@@ -1620,8 +1621,13 @@ bool parseParamsBlob(std::vector<C2Param*> *params, const hidl_vec<uint8_t> &blo
        p = C2ParamUtils::ParseFirst(data + ix, size - ix);
        if (p) {
            params->emplace_back(p);
            old_ix = ix;
            ix += p->size();
            ix = align(ix, PARAMS_ALIGNMENT);
            if (ix <= old_ix || ix > size) {
                android_errorWriteLog(0x534e4554, "238083570");
                break;
            }
        }
    } while (p);

+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@
#define AMEDIAMETRICS_PROP_PREFIX_EFFECTIVE "effective."
#define AMEDIAMETRICS_PROP_PREFIX_HAL       "hal."
#define AMEDIAMETRICS_PROP_PREFIX_HAPTIC    "haptic."
#define AMEDIAMETRICS_PROP_PREFIX_LAST      "last."
#define AMEDIAMETRICS_PROP_PREFIX_SERVER    "server."

// Properties within mediametrics are string constants denoted by
+8 −1
Original line number Diff line number Diff line
@@ -148,7 +148,14 @@ private:
            item.set(AMEDIAMETRICS_PROP_CUMULATIVETIMENS, mCumulativeTimeNs)
                .set(AMEDIAMETRICS_PROP_DEVICETIMENS, mDeviceTimeNs)
                .set(AMEDIAMETRICS_PROP_EVENT, eventName)
                .set(AMEDIAMETRICS_PROP_INTERVALCOUNT, (int32_t)mIntervalCount);
                .set(AMEDIAMETRICS_PROP_INTERVALCOUNT, (int32_t)mIntervalCount)
                // we set "last" device to indicate the device the group was
                // associated with (because a createPatch which is logged in ThreadMetrics
                // could have changed the device).
                .set(mIsOut
                        ? AMEDIAMETRICS_PROP_PREFIX_LAST AMEDIAMETRICS_PROP_OUTPUTDEVICES
                        : AMEDIAMETRICS_PROP_PREFIX_LAST AMEDIAMETRICS_PROP_INPUTDEVICES,
                        mDevices.c_str());
            if (mDeviceLatencyMs.getN() > 0) {
                item.set(AMEDIAMETRICS_PROP_DEVICELATENCYMS, mDeviceLatencyMs.getMean());
            }
+12 −2
Original line number Diff line number Diff line
@@ -41,8 +41,10 @@ Camera3IOStreamBase::Camera3IOStreamBase(int id, camera_stream_type_t type,
                physicalCameraId, sensorPixelModesUsed, setId, isMultiResolution,
                dynamicRangeProfile, streamUseCase, deviceTimeBaseIsRealtime, timestampBase),
        mTotalBufferCount(0),
        mMaxCachedBufferCount(0),
        mHandoutTotalBufferCount(0),
        mHandoutOutputBufferCount(0),
        mCachedOutputBufferCount(0),
        mFrameCount(0),
        mLastTimestamp(0) {

@@ -95,8 +97,8 @@ void Camera3IOStreamBase::dump(int fd, const Vector<String16> &args) const {
    lines.appendFormat("      Timestamp base: %d\n", getTimestampBase());
    lines.appendFormat("      Frames produced: %d, last timestamp: %" PRId64 " ns\n",
            mFrameCount, mLastTimestamp);
    lines.appendFormat("      Total buffers: %zu, currently dequeued: %zu\n",
            mTotalBufferCount, mHandoutTotalBufferCount);
    lines.appendFormat("      Total buffers: %zu, currently dequeued: %zu, currently cached: %zu\n",
            mTotalBufferCount, mHandoutTotalBufferCount, mCachedOutputBufferCount);
    write(fd, lines.string(), lines.size());

    Camera3Stream::dump(fd, args);
@@ -135,6 +137,14 @@ size_t Camera3IOStreamBase::getHandoutInputBufferCountLocked() {
    return (mHandoutTotalBufferCount - mHandoutOutputBufferCount);
}

size_t Camera3IOStreamBase::getCachedOutputBufferCountLocked() const {
    return mCachedOutputBufferCount;
}

size_t Camera3IOStreamBase::getMaxCachedOutputBuffersLocked() const {
    return mMaxCachedBufferCount;
}

status_t Camera3IOStreamBase::disconnectLocked() {
    switch (mState) {
        case STATE_IN_RECONFIG:
+10 −0
Original line number Diff line number Diff line
@@ -56,11 +56,18 @@ class Camera3IOStreamBase :
    int              getMaxTotalBuffers() const { return mTotalBufferCount; }
  protected:
    size_t            mTotalBufferCount;
    // The maximum number of cached buffers allowed for this stream
    size_t            mMaxCachedBufferCount;

    // sum of input and output buffers that are currently acquired by HAL
    size_t            mHandoutTotalBufferCount;
    // number of output buffers that are currently acquired by HAL. This will be
    // Redundant when camera3 streams are no longer bidirectional streams.
    size_t            mHandoutOutputBufferCount;
    // number of cached output buffers that are currently queued in the camera
    // server but not yet queued to the buffer queue.
    size_t            mCachedOutputBufferCount;

    uint32_t          mFrameCount;
    // Last received output buffer's timestamp
    nsecs_t           mLastTimestamp;
@@ -97,6 +104,9 @@ class Camera3IOStreamBase :

    virtual size_t   getHandoutInputBufferCountLocked();

    virtual size_t   getCachedOutputBufferCountLocked() const;
    virtual size_t   getMaxCachedOutputBuffersLocked() const;

    virtual status_t getEndpointUsage(uint64_t *usage) const = 0;

    status_t getBufferPreconditionCheckLocked() const;
Loading