{"id":11361,"url":"https://patchwork.libcamera.org/api/1.1/patches/11361/?format=json","web_url":"https://patchwork.libcamera.org/patch/11361/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20210222105222.393677-6-jacopo@jmondi.org>","date":"2021-02-22T10:52:22","name":"[libcamera-devel,v3,5/5] android: camera_device: Return AE FPS range","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"9df36fe0e39da10b5384c60a91889638fa336aeb","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11361/mbox/","series":[{"id":1717,"url":"https://patchwork.libcamera.org/api/1.1/series/1717/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1717","date":"2021-02-22T10:52:17","name":"android: Report frame durations","version":3,"mbox":"https://patchwork.libcamera.org/series/1717/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11361/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11361/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 66CC5BD224\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 22 Feb 2021 10:52:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0751468A1C;\n\tMon, 22 Feb 2021 11:52:04 +0100 (CET)","from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C77CF68A0F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Feb 2021 11:51:59 +0100 (CET)","from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 92F5210000B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Feb 2021 10:51:59 +0000 (UTC)"],"From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 22 Feb 2021 11:52:22 +0100","Message-Id":"<20210222105222.393677-6-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.30.0","In-Reply-To":"<20210222105222.393677-1-jacopo@jmondi.org>","References":"<20210222105222.393677-1-jacopo@jmondi.org>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v3 5/5] android: camera_device: Return AE\n\tFPS range","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The result metadata reports an arbitrary {30, 30} FPS range for the\nAE algorithm.\n\nThe actual FPS range should be returned in the Request::metadata, but\nas libcamera currently does not support that feature temporarily work\naround the issue and return the FPS range requested by the camera\nframework.\n\nWhile at it, create a 'settings' reference to descriptor->settings_\nand use it in multiple locations.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 11 ++++++++---\n 1 file changed, 8 insertions(+), 3 deletions(-)","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex c0939eaf27ac..c2fe2787fa74 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -2093,9 +2093,14 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,\n \tvalue = ANDROID_CONTROL_AE_MODE_ON;\n \tresultMetadata->addEntry(ANDROID_CONTROL_AE_MODE, &value, 1);\n \n-\tstd::vector<int32_t> aeFpsTarget = { 30, 30 };\n-\tresultMetadata->addEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE,\n-\t\t\t\t aeFpsTarget.data(), aeFpsTarget.size());\n+\tif (settings.getEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE, &entry))\n+\t\t/*\n+\t\t * \\todo Retrieve the AE FPS range from the libcamera metadata.\n+\t\t * As libcamera does not support that control, as a temporary\n+\t\t * workaround return what the framework asked.\n+\t\t */\n+\t\tresultMetadata->addEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE,\n+\t\t\t\t\t entry.data.i32, 2);\n \n \tvalue = ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE;\n \tfound = settings.getEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, &entry);\n","prefixes":["libcamera-devel","v3","5/5"]}