Patch Detail
Show a patch.
GET /api/patches/18095/?format=api
{ "id": 18095, "url": "https://patchwork.libcamera.org/api/patches/18095/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18095/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20230105043726.679968-10-chenghaoyang@google.com>", "date": "2023-01-05T04:37:26", "name": "[libcamera-devel,v3,9/9] libcamera: pipeline: virtual: Set camera properties & controls", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "3d227fed819ee86e2040d2f3f1c5e19f24029598", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18095/mbox/", "series": [ { "id": 3700, "url": "https://patchwork.libcamera.org/api/series/3700/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3700", "date": "2023-01-05T04:37:17", "name": "Virtual pipeline handler", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3700/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18095/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18095/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 CE0F3C3292\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 5 Jan 2023 04:38:08 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 82307625FD;\n\tThu, 5 Jan 2023 05:38:08 +0100 (CET)", "from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com\n\t[IPv6:2607:f8b0:4864:20::102b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B6552625E0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 5 Jan 2023 05:38:05 +0100 (CET)", "by mail-pj1-x102b.google.com with SMTP id q64so209644pjq.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 04 Jan 2023 20:38:05 -0800 (PST)", "from chenghaoyang-low.c.googlers.com.com\n\t(46.165.189.35.bc.googleusercontent.com. [35.189.165.46])\n\tby smtp.gmail.com with ESMTPSA id\n\tx23-20020a170902b41700b00188c5f0f9e9sm25015200plr.199.2023.01.04.20.38.02\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 04 Jan 2023 20:38:03 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1672893488;\n\tbh=CkyxTn6n0AAiFnrLaW8GKfez29P9A54x6SYJExejOi8=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=tESrlmipitcSczRytIDNxe48RRPrdb/G3R9+VoHslbGeW65+ntOmaLNTn5yYpQk4S\n\tz0MqSHjlQn9Kw0SAdFN/6juLdko3yQKdvFrSgkdflRsrCdJcH5AOXvW5AtU37EO2IW\n\tzW+y5GPVSA5gusbkj+4rCAjt4zbOK9upvgCqAvr60RrDGwj+LGU2WZjkfth9JW30NM\n\txr6/I/WK1Lhkf+7FE8K6IIeZKjTJO6XqI8hoZ+aFHpfhUoRRHnNmVPCe8KJ2n9yGAP\n\tWfhvyRB85zMXlnHzeVd9lRnva7qfqPhL9VIPjx32vpDda39CkHc5qvHqYfxyQZC0PQ\n\tRP/53nX0x8zHA==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=rtUHUJiSnMDtdnPKjGrXewZAUK+DgyGNd3X25jltl2g=;\n\tb=T6JohQQMeHEIMcOvMl/ZkK8spCppWZZQzl9j+v2HUyl+qcXnV4M/acUasBTJBtUtP4\n\tmWDSp3kI+OYWsvOQgXIkQSn9ttywIhNOlRp/Z9f8c9OhRF2FBJKeZrpE9rrNtu6HtTqM\n\tLovOaAh3dbcdbT4iWnZiQkDK04D+wbhTGs0Wc=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"T6JohQQM\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=rtUHUJiSnMDtdnPKjGrXewZAUK+DgyGNd3X25jltl2g=;\n\tb=Lt9zcJBMmoImtlRkIMboJ+Xmu2YKvbGfcO9CUDzz98SPn4D6Q/pBAV8axNYBoe6lEg\n\tezekf3zS+XE5FRyjIdlvXefYG0L3D4Wct1HizQsPqQi9KvSNyrNctfIaw5Poc2Fmuf9s\n\t8b9LdonuyJvX9c8kn6CASMhPr0CV0KEKFioMfZZBjxFXMXi0UJYbYElOWlVoywGdX2Co\n\t6++NoDecqXEC0UOLkwLV6Ezs2rQ2chd9RhmnTdmUAI6aFDJYxHjw7r958tm7YcsdlBFU\n\tJIX5s5X7zluvlHIRNcdKh3+lFk2awk7F8bYTkpXQXsOBEFsPEhw1qstrhN9a0lt0oNVj\n\tmBJA==", "X-Gm-Message-State": "AFqh2krEr24BC5sTs2JSPDwRNs6KoVdsYrluq9UWjKnZDVQPmwRGkEoF\n\tVDscLcjkTjpZOuqyxpMKdCEzoerAExOp9PvE", "X-Google-Smtp-Source": "AMrXdXtZCFrJ/K5cGmK5YRegqrARLHLek9MGmFIBNK5uV6f8XFqsGZNbTptog3hExRoBjtNn4BlqFQ==", "X-Received": "by 2002:a17:903:264b:b0:185:441e:90b4 with SMTP id\n\tje11-20020a170903264b00b00185441e90b4mr44776090plb.26.1672893483887; \n\tWed, 04 Jan 2023 20:38:03 -0800 (PST)", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 5 Jan 2023 04:37:26 +0000", "Message-Id": "<20230105043726.679968-10-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.39.0.314.g84b9a713c41-goog", "In-Reply-To": "<20230105043726.679968-1-chenghaoyang@google.com>", "References": "<20230105043726.679968-1-chenghaoyang@google.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 9/9] libcamera: pipeline: virtual: Set\n\tcamera properties & controls", "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>", "From": "Harvey Yang via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Harvey Yang <chenghaoyang@chromium.org>", "Cc": "Harvey Yang <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Initialize the CameraData properties with Location, Model, and\nPixelArrayActiveAreas, and the control attribute: FrameDurationLimits.\n\nUpdating `/etc/camera/libcamera/camera_hal.yaml` on a chromebook DUT is\nrequired to find the virtual camera with id `Virtual0`.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n src/libcamera/pipeline/virtual/virtual.cpp | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)", "diff": "diff --git a/src/libcamera/pipeline/virtual/virtual.cpp b/src/libcamera/pipeline/virtual/virtual.cpp\nindex db6fe14c..d56989b2 100644\n--- a/src/libcamera/pipeline/virtual/virtual.cpp\n+++ b/src/libcamera/pipeline/virtual/virtual.cpp\n@@ -11,6 +11,7 @@\n #include <libcamera/control_ids.h>\n #include <libcamera/controls.h>\n #include <libcamera/formats.h>\n+#include <libcamera/property_ids.h>\n \n #include \"libcamera/internal/camera.h\"\n #include \"libcamera/internal/media_device_virtual.h\"\n@@ -20,6 +21,10 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(VIRTUAL)\n \n+static const ControlInfoMap::Map VirtualControls = {\n+\t{ &controls::draft::PipelineDepth, ControlInfo(2, 3) },\n+};\n+\n uint64_t CurrentTimestamp()\n {\n \tstruct timespec ts;\n@@ -272,6 +277,16 @@ bool PipelineHandlerVirtual::match(DeviceEnumerator *enumerator)\n \tdata->supportedResolutions_[0] = { .size = Size(1920, 1080), .frame_rates = { 30 }, .formats = { \"YCbCr_420_888\" } };\n \tdata->supportedResolutions_[1] = { .size = Size(1280, 720), .frame_rates = { 30, 60 }, .formats = { \"YCbCr_420_888\" } };\n \n+\tdata->properties_.set(properties::Location, properties::CameraLocationFront);\n+\tdata->properties_.set(properties::Model, \"Virtual Video Device\");\n+\tdata->properties_.set(properties::PixelArrayActiveAreas, { Rectangle(Size(1920, 1080)) });\n+\n+\t// TODO: Set FrameDurationLimits based on config.\n+\tControlInfoMap::Map controls = VirtualControls;\n+\tint64_t min_frame_duration = 30, max_frame_duration = 60;\n+\tcontrols[&controls::FrameDurationLimits] = ControlInfo(min_frame_duration, max_frame_duration);\n+\tdata->controlInfo_ = ControlInfoMap(std::move(controls), controls::controls);\n+\n \t/* Create and register the camera. */\n \tstd::set<Stream *> streams{ &data->stream_ };\n \tconst std::string id = \"Virtual0\";\n", "prefixes": [ "libcamera-devel", "v3", "9/9" ] }