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

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

release-request-66ee9889-2756-44aa-9b4c-91e7b5c1058c-for-git_oc-dr1-release-39...

release-request-66ee9889-2756-44aa-9b4c-91e7b5c1058c-for-git_oc-dr1-release-3988462 snap-temp-L14700000061937187

Change-Id: I72b5349769ed6c1816982feb77a2f99570f19556
parents 76c1071c c65e23d4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1547,6 +1547,7 @@ typedef enum acamera_metadata_tag {
     * <code>false</code> if present.</p>
     * <p>For applications targeting SDK versions older than O, the value of enableZsl in all
     * capture templates is always <code>false</code> if present.</p>
     * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
     *
     * @see ACAMERA_CONTROL_CAPTURE_INTENT
     * @see ACAMERA_SENSOR_TIMESTAMP
+30 −0
Original line number Diff line number Diff line
@@ -1063,6 +1063,34 @@ status_t ACodec::setupNativeWindowSizeFormatAndUsage(
        return err;
    }

    OMX_INDEXTYPE index;
    err = mOMXNode->getExtensionIndex(
            "OMX.google.android.index.AndroidNativeBufferConsumerUsage",
            &index);

    if (err != OK) {
        // allow failure
        err = OK;
    } else {
        int usageBits = 0;
        if (nativeWindow->query(
                nativeWindow,
                NATIVE_WINDOW_CONSUMER_USAGE_BITS,
                &usageBits) == OK) {
            OMX_PARAM_U32TYPE params;
            InitOMXParams(&params);
            params.nPortIndex = kPortIndexOutput;
            params.nU32 = (OMX_U32)usageBits;

            err = mOMXNode->setParameter(index, &params, sizeof(params));

            if (err != OK) {
                ALOGE("Fail to set AndroidNativeBufferConsumerUsage: %d", err);
                return err;
            }
        }
    }

    OMX_U32 usage = 0;
    err = mOMXNode->getGraphicBufferUsage(kPortIndexOutput, &usage);
    if (err != 0) {
@@ -5401,6 +5429,8 @@ bool ACodec::BaseState::onMessageReceived(const sp<AMessage> &msg) {
            ALOGE_IF("[%s] failed to release codec instance: err=%d",
                       mCodec->mComponentName.c_str(), err);
            mCodec->mCallback->onReleaseCompleted();

            mCodec->changeState(mCodec->mUninitializedState);
            break;
        }

+4 −4
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ status_t SoftAACEncoder::setAudioParams() {
    // We call this whenever sample rate, number of channels or bitrate change
    // in reponse to setParameter calls.

    ALOGV("setAudioParams: %lu Hz, %lu channels, %lu bps",
    ALOGV("setAudioParams: %u Hz, %u channels, %u bps",
         mSampleRate, mNumChannels, mBitRate);

    status_t err = setAudioSpecificConfigData();
@@ -387,12 +387,12 @@ status_t SoftAACEncoder::setAudioSpecificConfigData() {
    int32_t index;
    status_t err = getSampleRateTableIndex(mSampleRate, index);
    if (err != OK) {
        ALOGE("Unsupported sample rate (%lu Hz)", mSampleRate);
        ALOGE("Unsupported sample rate (%u Hz)", mSampleRate);
        return err;
    }

    if (mNumChannels > 2 || mNumChannels <= 0) {
        ALOGE("Unsupported number of channels(%lu)", mNumChannels);
        ALOGE("Unsupported number of channels(%u)", mNumChannels);
        return UNKNOWN_ERROR;
    }

@@ -403,7 +403,7 @@ status_t SoftAACEncoder::setAudioSpecificConfigData() {
    return OK;
}

void SoftAACEncoder::onQueueFilled(OMX_U32 portIndex) {
void SoftAACEncoder::onQueueFilled(OMX_U32 /*portIndex*/) {
    if (mSignalledError) {
        return;
    }