Patch Detail
Show a patch.
GET /api/1.1/patches/12113/?format=api
{ "id": 12113, "url": "https://patchwork.libcamera.org/api/1.1/patches/12113/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12113/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210426105753.3498691-1-hiroh@chromium.org>", "date": "2021-04-26T10:57:53", "name": "[libcamera-devel,v2] android: CameraDevice: factorize reporting a capture result", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "d57755fddc43943e3f676f407876cbf4a31e994c", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12113/mbox/", "series": [ { "id": 1977, "url": "https://patchwork.libcamera.org/api/1.1/series/1977/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1977", "date": "2021-04-26T10:57:53", "name": "[libcamera-devel,v2] android: CameraDevice: factorize reporting a capture result", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1977/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12113/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12113/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 3041FBDC9D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Apr 2021 10:58:03 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7A9E1688AF;\n\tMon, 26 Apr 2021 12:58:02 +0200 (CEST)", "from mail-pl1-x634.google.com (mail-pl1-x634.google.com\n\t[IPv6:2607:f8b0:4864:20::634])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 746E7605BE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Apr 2021 12:58:01 +0200 (CEST)", "by mail-pl1-x634.google.com with SMTP id o16so15119901plg.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Apr 2021 03:58:01 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:a407:b8c2:d8b:a449])\n\tby smtp.gmail.com with ESMTPSA id\n\tms8sm11763564pjb.57.2021.04.26.03.57.57\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Apr 2021 03:57:58 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"RBXVP4wi\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=veNgScwQta2wX7hwbCdzl/M6SS4IJSslKbeysj0Cd0E=;\n\tb=RBXVP4wiP5YZJ7xYGCAxYNzK3s5KlcjySs2XC3ikwmhtA95L+J0NGJKJwDZMnkWsL3\n\tkyDsA5vnMEs5KeoPjD92U9igSsAapwKMlqaHCbOjJb+UzHHNKa+lQSK8rNx8EZPu4jUi\n\t3sCaLD4UDAxaDk4UTIf+WI4KTc7ILIY4i06mw=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=veNgScwQta2wX7hwbCdzl/M6SS4IJSslKbeysj0Cd0E=;\n\tb=LTQlzl/na4BeEaTcHCHFhZkO8ViT+nMoG94F70Q1y9he3ny16MDolwdn382UPBMRmb\n\tioePhUhyWDz6nORPtCk7SFokY1+eKHeMOJYpC4r0K5GSSfLIwHUKQ8OdzE5+gOo6VbJv\n\tFMY23VgOpctGwn8DK306GZZxKLfKD8EYuzm3C/scrc6d8ZNWMAyAp81cZZKFO85Ply2L\n\txbfpMnP8exBy2/t4HyAZNvay8T0bjmXl4DLDQvKDvViNRcGBXdVFxhXy47FLJ2AVeBfc\n\t7qgafpG+uFhVcfFwy2IrrkLYadApdsJFJFAbLCQfsDdIyuueF8L+HwxET4KEAj2+6CIF\n\t6u6Q==", "X-Gm-Message-State": "AOAM531C1CqUVCrvYK6teyI9NTE+dCU+rqI6udbmxLs7LtZMJuxiZV1S\n\tcaO7QX7ihbYrelPqeprtIkyk+tTOLklIvw==", "X-Google-Smtp-Source": "ABdhPJzEdBDmGTA9iR/cIa50JZYyVIpo733jk7Nx4w/liDT3oHrvovcx0NKZdMdud4oiwue5lgozxA==", "X-Received": "by 2002:a17:90b:4a46:: with SMTP id\n\tlb6mr22177015pjb.45.1619434679457; \n\tMon, 26 Apr 2021 03:57:59 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 26 Apr 2021 19:57:53 +0900", "Message-Id": "<20210426105753.3498691-1-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.31.1.498.g6c1eba8ee3d-goog", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2] android: CameraDevice: factorize\n\treporting a capture result", "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": "This factorizes a code of reporting a capture result including\nnotifying either shutter or error. It will be useful to report\ncapture results in other places than\nCameraDevice::reqeustComplete().\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_device.cpp | 22 +++++++++++++++-------\n src/android/camera_device.h | 4 ++++\n 2 files changed, 19 insertions(+), 7 deletions(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex fb89195e..70174a2b 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -2132,7 +2132,20 @@ void CameraDevice::requestComplete(Request *request)\n \t\t\tcameraStream->putBuffer(src);\n \t}\n \n-\t/* Prepare to call back the Android camera stack. */\n+\treportDescriptor(descriptor, status, timestamp,\n+\t\t\t resultMetadata ? resultMetadata->get() : nullptr);\n+}\n+\n+std::string CameraDevice::logPrefix() const\n+{\n+\treturn \"'\" + camera_->id() + \"'\";\n+}\n+\n+void CameraDevice::reportDescriptor(Camera3RequestDescriptor &descriptor,\n+\t\t\t\t camera3_buffer_status status,\n+\t\t\t\t uint64_t timestamp,\n+\t\t\t\t camera_metadata_t *metadata)\n+{\n \tcamera3_capture_result_t captureResult = {};\n \tcaptureResult.frame_number = descriptor.frameNumber_;\n \tcaptureResult.num_output_buffers = descriptor.buffers_.size();\n@@ -2147,7 +2160,7 @@ void CameraDevice::requestComplete(Request *request)\n \t\tnotifyShutter(descriptor.frameNumber_, timestamp);\n \n \t\tcaptureResult.partial_result = 1;\n-\t\tcaptureResult.result = resultMetadata->get();\n+\t\tcaptureResult.result = metadata;\n \t}\n \n \tif (status == CAMERA3_BUFFER_STATUS_ERROR || !captureResult.result) {\n@@ -2164,11 +2177,6 @@ void CameraDevice::requestComplete(Request *request)\n \tcallbacks_->process_capture_result(callbacks_, &captureResult);\n }\n \n-std::string CameraDevice::logPrefix() const\n-{\n-\treturn \"'\" + camera_->id() + \"'\";\n-}\n-\n void CameraDevice::notifyShutter(uint32_t frameNumber, uint64_t timestamp)\n {\n \tcamera3_notify_msg_t notify = {};\ndiff --git a/src/android/camera_device.h b/src/android/camera_device.h\nindex fa652c3c..a42b8dc0 100644\n--- a/src/android/camera_device.h\n+++ b/src/android/camera_device.h\n@@ -101,6 +101,10 @@ private:\n \n \tstd::tuple<uint32_t, uint32_t> calculateStaticMetadataSize();\n \tlibcamera::FrameBuffer *createFrameBuffer(const buffer_handle_t camera3buffer);\n+\tvoid reportDescriptor(Camera3RequestDescriptor &descriptor,\n+\t\t\t camera3_buffer_status status,\n+\t\t\t uint64_t timestamp = 0,\n+\t\t\t camera_metadata_t *metadata = nullptr);\n \tvoid notifyShutter(uint32_t frameNumber, uint64_t timestamp);\n \tvoid notifyError(uint32_t frameNumber, camera3_stream_t *stream);\n \tstd::unique_ptr<CameraMetadata> requestTemplatePreview();\n", "prefixes": [ "libcamera-devel", "v2" ] }