{"id":14076,"url":"https://patchwork.libcamera.org/api/patches/14076/?format=json","web_url":"https://patchwork.libcamera.org/patch/14076/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211011073505.243864-2-umang.jain@ideasonboard.com>","date":"2021-10-11T07:34:59","name":"[libcamera-devel,v4,1/7] camera_device: Remove private scope of Camera3RequestDescriptor","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"11609354476d2fad2b376b2a29e0239473366335","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/?format=json","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"delegate":{"id":12,"url":"https://patchwork.libcamera.org/api/users/12/?format=json","username":"uajain","first_name":"Umang","last_name":"Jain","email":"umang.jain@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/14076/mbox/","series":[{"id":2611,"url":"https://patchwork.libcamera.org/api/series/2611/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2611","date":"2021-10-11T07:34:58","name":"Async Post Processor","version":4,"mbox":"https://patchwork.libcamera.org/series/2611/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14076/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14076/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id F031EC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Oct 2021 07:35:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B4FA168F52;\n\tMon, 11 Oct 2021 09:35:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF00760502\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Oct 2021 09:35:16 +0200 (CEST)","from perceval.ideasonboard.com (unknown [103.251.226.107])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7D49C2BD;\n\tMon, 11 Oct 2021 09:35:15 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"WNVdFcKf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633937716;\n\tbh=Wsnd15k7VoYwcNktwsbFqnIlixJ3Rcv1vtOYlIgZeoU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=WNVdFcKf8rZZtJmrx+HEcOHVYosh6cby9ydjnLW+kMAGEe7yziiBZ1vTwZmXL4N08\n\tUF/OThMQj5/frE0hZI+yABifCQjbiZJOGvktqEeXhPPUuae4tVpHoQ+vtgacgrDfoo\n\ttvPex9/Co6TZQtVcN0kWgEyrPvDTu3rcBcJt4oNU=","From":"Umang Jain <umang.jain@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 11 Oct 2021 13:04:59 +0530","Message-Id":"<20211011073505.243864-2-umang.jain@ideasonboard.com>","X-Mailer":"git-send-email 2.31.1","In-Reply-To":"<20211011073505.243864-1-umang.jain@ideasonboard.com>","References":"<20211011073505.243864-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 1/7] camera_device: Remove private\n\tscope of Camera3RequestDescriptor","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Camera3RequestDescriptor is a utility structure that groups information\nabout a capture request. It can be and will be extended to preserve the\ncontext of a capture overall. Since the context of a capture needs to\nbe shared among other classes (for e.g. CameraStream) having a private\ndefinition of the struct doesn't help. Hence, de-scope the structure\nso that it can be shared with other components (through references or\npointers).\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_device.cpp |  2 +-\n src/android/camera_device.h   | 51 ++++++++++++++++++-----------------\n 2 files changed, 27 insertions(+), 26 deletions(-)","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex ef4fbab8..48a96d0c 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -220,7 +220,7 @@ bool validateCropRotate(const camera3_stream_configuration_t &streamList)\n  * later re-used at request complete time to notify the framework.\n  */\n \n-CameraDevice::Camera3RequestDescriptor::Camera3RequestDescriptor(\n+Camera3RequestDescriptor::Camera3RequestDescriptor(\n \tCamera *camera, const camera3_capture_request_t *camera3Request)\n {\n \tframeNumber_ = camera3Request->frame_number;\ndiff --git a/src/android/camera_device.h b/src/android/camera_device.h\nindex b7d774fe..26d1c6de 100644\n--- a/src/android/camera_device.h\n+++ b/src/android/camera_device.h\n@@ -34,6 +34,32 @@\n #include \"jpeg/encoder.h\"\n \n struct CameraConfigData;\n+\n+struct Camera3RequestDescriptor {\n+\tenum class Status {\n+\t\tPending,\n+\t\tSuccess,\n+\t\tError,\n+\t};\n+\n+\tCamera3RequestDescriptor() = default;\n+\t~Camera3RequestDescriptor() = default;\n+\tCamera3RequestDescriptor(libcamera::Camera *camera,\n+\t\t\t\t const camera3_capture_request_t *camera3Request);\n+\tCamera3RequestDescriptor &operator=(Camera3RequestDescriptor &&) = default;\n+\n+\tbool isPending() const { return status_ == Status::Pending; }\n+\n+\tuint32_t frameNumber_ = 0;\n+\tstd::vector<camera3_stream_buffer_t> buffers_;\n+\tstd::vector<std::unique_ptr<libcamera::FrameBuffer>> frameBuffers_;\n+\tCameraMetadata settings_;\n+\tstd::unique_ptr<CaptureRequest> request_;\n+\n+\tcamera3_capture_result_t captureResult_ = {};\n+\tStatus status_ = Status::Pending;\n+};\n+\n class CameraDevice : protected libcamera::Loggable\n {\n public:\n@@ -73,31 +99,6 @@ private:\n \n \tCameraDevice(unsigned int id, std::shared_ptr<libcamera::Camera> camera);\n \n-\tstruct Camera3RequestDescriptor {\n-\t\tenum class Status {\n-\t\t\tPending,\n-\t\t\tSuccess,\n-\t\t\tError,\n-\t\t};\n-\n-\t\tCamera3RequestDescriptor() = default;\n-\t\t~Camera3RequestDescriptor() = default;\n-\t\tCamera3RequestDescriptor(libcamera::Camera *camera,\n-\t\t\t\t\t const camera3_capture_request_t *camera3Request);\n-\t\tCamera3RequestDescriptor &operator=(Camera3RequestDescriptor &&) = default;\n-\n-\t\tbool isPending() const { return status_ == Status::Pending; }\n-\n-\t\tuint32_t frameNumber_ = 0;\n-\t\tstd::vector<camera3_stream_buffer_t> buffers_;\n-\t\tstd::vector<std::unique_ptr<libcamera::FrameBuffer>> frameBuffers_;\n-\t\tCameraMetadata settings_;\n-\t\tstd::unique_ptr<CaptureRequest> request_;\n-\n-\t\tcamera3_capture_result_t captureResult_ = {};\n-\t\tStatus status_ = Status::Pending;\n-\t};\n-\n \tenum class State {\n \t\tStopped,\n \t\tFlushing,\n","prefixes":["libcamera-devel","v4","1/7"]}