Patch Detail
Show a patch.
GET /api/1.1/patches/18408/?format=api
{ "id": 18408, "url": "https://patchwork.libcamera.org/api/1.1/patches/18408/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18408/", "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": "<20230315102300.2265491-7-chenghaoyang@google.com>", "date": "2023-03-15T10:23:00", "name": "[libcamera-devel,v4,6/6] libcamera: pipeline: virtual: Set camera properties & controls", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "6b8b93c169d73e0f2b8327af54e7f4c28e472756", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/1.1/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18408/mbox/", "series": [ { "id": 3806, "url": "https://patchwork.libcamera.org/api/1.1/series/3806/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3806", "date": "2023-03-15T10:22:54", "name": "Virtual pipeline handler", "version": 4, "mbox": "https://patchwork.libcamera.org/series/3806/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18408/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18408/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 D295AC329F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Mar 2023 10:23:18 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5D1F861ED2;\n\tWed, 15 Mar 2023 11:23:18 +0100 (CET)", "from mail-pl1-x631.google.com (mail-pl1-x631.google.com\n\t[IPv6:2607:f8b0:4864:20::631])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E6F4D62709\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Mar 2023 11:23:14 +0100 (CET)", "by mail-pl1-x631.google.com with SMTP id iw3so2655177plb.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Mar 2023 03:23:14 -0700 (PDT)", "from chenghaoyang-low.c.googlers.com.com\n\t(112.157.221.35.bc.googleusercontent.com. [35.221.157.112])\n\tby smtp.gmail.com with ESMTPSA id\n\tf11-20020a17090274cb00b001a0450da45csm3262786plt.185.2023.03.15.03.23.12\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 15 Mar 2023 03:23:13 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1678875798;\n\tbh=JEB6AEVbGLqmtfC7pHhxD1DmxhBO5vycHkx8UtpTrBI=;\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=UbCtjJujLx2xY0RdZTY1S5Gssji3CrAES+WWaRxQt6DvCDuUdHVgTvdyoKJkaqTSE\n\tCPItN60qzPLh896Tr0+7kVP5S4DSDR0pHff6Qj+STnAF6kog5X0k53wQqwAJ/csjQ3\n\tjev2oM/E9PcEIVqYsR6Zwbs6gGkxfuj1s5qrp+k/sC1sLl6ZFVAZwQhyHzhS7Rpfiv\n\twPZifx6xSiqeISpgfyAWz7kFXtQAZSt+wgHKlcRqlYmbYZAWjoGLIvHTmiwpjHwmMJ\n\tgIGOPypKGsQzcvwLCo6EW0kH1UsEVTHHoEuH7M51SiWcYdI3L/tM5wmCm/AMM40MhS\n\tMysmhCNN24wlA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1678875793;\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=F4wCzmkWS8rqH2a3GVhAhLoS0CEQmFOtFrF1j9+6M9I=;\n\tb=YIm0P+imiQvHQ4hDZcXfgt8SwlzBUp7X9aEFNpnogxVss9nPmBUPmjypOLjFzgCQP6\n\tP9IatL7aPFqBO6UtqVEtInLuC2OmkgKSYeLhX8FhfA/xku6NgYuxfOCOrMrRTqoGu5JK\n\ta1UYvAUs5DNjoACKrBMJt0DG8oY1QXpwpSnhA=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"YIm0P+im\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1678875793;\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=F4wCzmkWS8rqH2a3GVhAhLoS0CEQmFOtFrF1j9+6M9I=;\n\tb=GNAefjdEiE1GTlqhxHbBBRW3WyaUITVvA4IhPq/0uE8tHbcQwPUuWtHJSquuMjUVW/\n\tVaSsTsIUEwZN5Myx3Wb6xOWYwrsEKdiRlDXIZq/M3ZxcsWs+xKjLQjFecj0sbe3/807p\n\tBhpxZY1hmQv0dcv/VzTCtnl/1XPcN1u33F8GKiQKqp7C2sKaMojj2RqVyk7MH7rrmJLK\n\t64+1k3sjnuMQUomDdlbjadCy5IjbKwW9wMxSxLzoW7Yho4PJWLFr/gAkz5VQMO8lINAQ\n\tncyJ+8yMKgm4+xHoQc/UgSK4n+uKwsxbtgi0yfI2sOzogLILakMkC84BtSKF7etKbYcC\n\tm9bQ==", "X-Gm-Message-State": "AO0yUKURRVZfxi2qUAZGy/pn+GWiWDCJJayZIgn4EoC2aXfTBoB9fq15\n\txfWkE9Ts10cSXr9bjqmTwPHjYFKUSLodiBaGGN4=", "X-Google-Smtp-Source": "AK7set9qWcrgogAUOzbaZwf6FG4x0tOeBOyEsM7Gp8O2VRD8/rexPkQadxIrR1to45Xjy+G5PJ/vrw==", "X-Received": "by 2002:a17:902:fa87:b0:19e:2eb5:712d with SMTP id\n\tlc7-20020a170902fa8700b0019e2eb5712dmr1683070plb.25.1678875793217; \n\tWed, 15 Mar 2023 03:23:13 -0700 (PDT)", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 15 Mar 2023 10:23:00 +0000", "Message-Id": "<20230315102300.2265491-7-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.40.0.rc1.284.g88254d51c5-goog", "In-Reply-To": "<20230315102300.2265491-1-chenghaoyang@google.com>", "References": "<20230315102300.2265491-1-chenghaoyang@google.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v4 6/6] 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 b91e7000..f858ed1e 100644\n--- a/src/libcamera/pipeline/virtual/virtual.cpp\n+++ b/src/libcamera/pipeline/virtual/virtual.cpp\n@@ -12,6 +12,7 @@\n #include <libcamera/controls.h>\n #include <libcamera/formats.h>\n #include <libcamera/heap_allocator.h>\n+#include <libcamera/property_ids.h>\n \n #include \"libcamera/internal/camera.h\"\n #include \"libcamera/internal/pipeline_handler.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@@ -270,6 +275,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", "v4", "6/6" ] }