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

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

Snap for 7310088 from a1335e1a to sc-release

Change-Id: Ia69bdc114fd93fe12440340bbaffeff1dc0e9e24
parents 10b8cdf3 a1335e1a
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -3578,7 +3578,7 @@ typedef enum acamera_metadata_tag {
     * android.scaler.availableInputOutputFormatsMap.</p>
     * <p>The following table describes the minimum required output stream
     * configurations based on the hardware level
     * (ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL):</p>
     * (ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL), prior to Android 12:</p>
     * <p>Format         | Size                                         | Hardware Level | Notes
     * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
     * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
@@ -3589,6 +3589,21 @@ typedef enum acamera_metadata_tag {
     * YUV_420_888    | all output sizes available for JPEG          | FULL           |
     * YUV_420_888    | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
     * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
     * <p>Starting from Android 12, the camera device may not support JPEG sizes smaller than the
     * minimum of 1080p and the camera sensor active array size. The requirements for
     * IMPLEMENTATION_DEFINED and YUV_420_888 stay the same. This new minimum required output
     * stream configurations are illustrated by the table below:</p>
     * <p>Format         | Size                                         | Hardware Level | Notes
     * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
     * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
     * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
     * YUV_420_888    | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | FULL           |
     * YUV_420_888    | 1920x1080 (1080p)                            | FULL           | if 1080p &lt;= activeArraySize
     * YUV_420_888    | 1280x720 (720)                               | FULL           | if 720p &lt;= activeArraySize
     * YUV_420_888    | 640x480 (480p)                               | FULL           | if 480p &lt;= activeArraySize
     * YUV_420_888    | 320x240 (240p)                               | FULL           | if 240p &lt;= activeArraySize
     * YUV_420_888    | all output sizes available for FULL hardware level, up to the maximum video size | LIMITED        |
     * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
     * <p>Refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES for additional
     * mandatory stream configurations on a per-capability basis.</p>
     * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
+8 −0
Original line number Diff line number Diff line
@@ -90,6 +90,10 @@ public:
        }
    }

    void setPriority(int priority) {
        androidSetThreadPriority(getTid(), priority);
    }

protected:
    bool threadLoop() override {
        constexpr nsecs_t kIntervalNs = nsecs_t(10) * 1000 * 1000;  // 10ms
@@ -529,4 +533,8 @@ android_dataspace C2OMXNode::getDataspace() {
    return *mDataspace.lock();
}

void C2OMXNode::setPriority(int priority) {
    mQueueThread->setPriority(priority);
}

}  // namespace android
+5 −0
Original line number Diff line number Diff line
@@ -98,6 +98,11 @@ struct C2OMXNode : public BnOMXNode {
     */
    android_dataspace getDataspace();

    /**
     * Sets priority of the queue thread.
     */
    void setPriority(int priority);

private:
    std::weak_ptr<Codec2Client::Component> mComp;
    sp<IOMXBufferSource> mBufferSource;
+19 −0
Original line number Diff line number Diff line
@@ -397,6 +397,14 @@ public:

        // consumer usage is queried earlier.

        // priority
        if (mConfig.mPriority != config.mPriority) {
            if (config.mPriority != INT_MAX) {
                mNode->setPriority(config.mPriority);
            }
            mConfig.mPriority = config.mPriority;
        }

        if (status.str().empty()) {
            ALOGD("ISConfig not changed");
        } else {
@@ -944,6 +952,7 @@ void CCodec::configure(const sp<AMessage> &msg) {
                }
            }
            config->mISConfig->mUsage = 0;
            config->mISConfig->mPriority = INT_MAX;
        }

        /*
@@ -1135,6 +1144,16 @@ void CCodec::configure(const sp<AMessage> &msg) {
            configUpdate.push_back(std::move(qp));
        }

        int32_t background = 0;
        if ((config->mDomain & Config::IS_VIDEO)
                && msg->findInt32("android._background-mode", &background)
                && background) {
            androidSetThreadPriority(gettid(), ANDROID_PRIORITY_BACKGROUND);
            if (config->mISConfig) {
                config->mISConfig->mPriority = ANDROID_PRIORITY_BACKGROUND;
            }
        }

        err = config->setParameters(comp, configUpdate, C2_DONT_BLOCK);
        if (err != OK) {
            ALOGW("failed to configure c2 params");
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ public:
        float mFixedAdjustedFps = 0.0; // fixed fps via PTS manipulation
        float mMinAdjustedFps = 0.0; // minimum fps via PTS manipulation
        uint64_t mUsage = 0; // consumer usage
        int mPriority = INT_MAX; // priority of queue thread (if any); INT_MAX for no-op
    };

    /**
Loading