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

Commit 0b5003b7 authored by Zhijun He's avatar Zhijun He Committed by Android (Google) Code Review
Browse files

Merge "Camera1: Don't send partial results to ZSL clients"

parents 4ce87ac0 25a0aef1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1674,8 +1674,8 @@ int Camera2Client::getZslStreamId() const {
}

status_t Camera2Client::registerFrameListener(int32_t minId, int32_t maxId,
        wp<camera2::FrameProcessor::FilteredListener> listener) {
    return mFrameProcessor->registerListener(minId, maxId, listener);
        wp<camera2::FrameProcessor::FilteredListener> listener, bool sendPartials) {
    return mFrameProcessor->registerListener(minId, maxId, listener, sendPartials);
}

status_t Camera2Client::removeFrameListener(int32_t minId, int32_t maxId,
+2 −1
Original line number Diff line number Diff line
@@ -117,7 +117,8 @@ public:
    int getZslStreamId() const;

    status_t registerFrameListener(int32_t minId, int32_t maxId,
            wp<camera2::FrameProcessor::FilteredListener> listener);
            wp<camera2::FrameProcessor::FilteredListener> listener,
            bool sendPartials = true);
    status_t removeFrameListener(int32_t minId, int32_t maxId,
            wp<camera2::FrameProcessor::FilteredListener> listener);

+10 −2
Original line number Diff line number Diff line
@@ -350,8 +350,10 @@ CaptureSequencer::CaptureState CaptureSequencer::manageZslStart(
        return DONE;
    }

    // We don't want to get partial results for ZSL capture.
    client->registerFrameListener(mCaptureId, mCaptureId + 1,
            this);
            this,
            /*sendPartials*/false);

    // TODO: Actually select the right thing here.
    res = processor->pushToReprocess(mCaptureId);
@@ -393,8 +395,14 @@ CaptureSequencer::CaptureState CaptureSequencer::manageStandardStart(

    bool isAeConverged = false;
    // Get the onFrameAvailable callback when the requestID == mCaptureId
    // We don't want to get partial results for normal capture, as we need
    // Get ANDROID_SENSOR_TIMESTAMP from the capture result, but partial
    // result doesn't have to have this metadata available.
    // TODO: Update to use the HALv3 shutter notification for remove the
    // need for this listener and make it faster. see bug 12530628.
    client->registerFrameListener(mCaptureId, mCaptureId + 1,
            this);
            this,
            /*sendPartials*/false);

    {
        Mutex::Autolock l(mInputMutex);
+2 −1
Original line number Diff line number Diff line
@@ -202,7 +202,8 @@ status_t ZslProcessor::updateStream(const Parameters &params) {
    }
    client->registerFrameListener(Camera2Client::kPreviewRequestIdStart,
            Camera2Client::kPreviewRequestIdEnd,
            this);
            this,
            /*sendPartials*/false);

    return OK;
}
+2 −1
Original line number Diff line number Diff line
@@ -148,7 +148,8 @@ status_t ZslProcessor3::updateStream(const Parameters &params) {
    }
    client->registerFrameListener(Camera2Client::kPreviewRequestIdStart,
            Camera2Client::kPreviewRequestIdEnd,
            this);
            this,
            /*sendPartials*/false);

    return OK;
}
Loading