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

Commit 603789e0 authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by Android (Google) Code Review
Browse files

Merge "camera2 vndk: Clarify documentation around ACameraDevice::allocateCaptureRequest."

parents 51e42f42 ece71b2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -289,7 +289,7 @@ camera_status_t CameraDevice::updateOutputConfigurationLocked(ACaptureSessionOut
}

camera_status_t
CameraDevice::allocateCaptureRequest(
CameraDevice::allocateCaptureRequestLocked(
        const ACaptureRequest* request, /*out*/sp<CaptureRequest> &outReq) {
    sp<CaptureRequest> req(new CaptureRequest());
    req->mCaptureRequest.physicalCameraSettings.resize(1);
+6 −1
Original line number Diff line number Diff line
@@ -169,7 +169,12 @@ class CameraDevice final : public RefBase {

    camera_status_t updateOutputConfigurationLocked(ACaptureSessionOutput *output);

    camera_status_t allocateCaptureRequest(
    // Since this writes to ICameraDeviceUser's fmq, clients must take care that:
    //   a) This function is called serially.
    //   b) This function is called in accordance with ICameraDeviceUser.submitRequestList,
    //      otherwise, the wrong capture request might have the wrong settings
    //      metadata associated with it.
    camera_status_t allocateCaptureRequestLocked(
            const ACaptureRequest* request, sp<CaptureRequest>& outReq);

    static ACaptureRequest* allocateACaptureRequest(sp<CaptureRequest>& req);
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ camera_status_t CameraDevice::submitRequestsLocked(
    requestsV.setCapacity(numRequests);
    for (int i = 0; i < numRequests; i++) {
        sp<CaptureRequest> req;
        ret = allocateCaptureRequest(requests[i], req);
        ret = allocateCaptureRequestLocked(requests[i], req);
        // We need to call this method since after submitRequestList is called,
        // the request metadata queue might have removed the capture request
        // metadata. Therefore we simply add the metadata to its wrapper class,