From patchwork Tue Sep 22 10:03:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9700 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 454C5BF01C for ; Tue, 22 Sep 2020 10:04:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 10E3062FD5; Tue, 22 Sep 2020 12:04:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="cZ+2tvux"; dkim-atps=neutral Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F3C7D62FD7 for ; Tue, 22 Sep 2020 12:04:08 +0200 (CEST) Received: by mail-wr1-x442.google.com with SMTP id s12so16365765wrw.11 for ; Tue, 22 Sep 2020 03:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4lH2W2zOi/lSgf+bdq75Jba1fCn8R09Q1otyB8VpLX4=; b=cZ+2tvuxUbwokv0NTu/2TPWUV2YfrZPp8RwoJM5Hi7r8iHLoBNAI+MxxrdVkotdrkx Atzdwmlw1/wOv55r3sXOp2kyu6ZzobxxutDOD+CyZhYCETUC3CxKrqbIXRYFGH2HNVaw iAaJ6gifiqAyGayBjamS/gqwh4ur62WqdIlN/KyTrZB50JtjIhrreHdIx5G0iZfbQbC2 lDYYY++GSTH0HHizfgAXtneALR62qydS9Pi3VFXoYjhO6+vIMpUnhwKvaeUYXLV6Od+4 yYhpUS49DMQ9x8qvPA4Crw8tjdqeJdZ9KhI6Y0j2BVwRrtxzkLhl8iXoJOyrZzVi9Cb3 8KMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4lH2W2zOi/lSgf+bdq75Jba1fCn8R09Q1otyB8VpLX4=; b=MgRkT1MyZ8SWacH46IBFLrqy1xvgg2izoP6ZnQ9IfYGFoakK0wHJ7d49LpJRaReZOm jFMz8AKYNaGrHWM6wciWDrOIYenMA5Tr7qKXumoJz/3NyxTG0gqGoyfnlRKUHXjnoN1J ckxwNz7X4EN3sTeYCxZcVvKdB9QFy5i0ANFcz5ArRK9dduqLaLtPyPYpxNQrq4DLqRIm btbrRohfM0tJmib1l2GYRkJ2dKEg7CYda0xM43pRCDSIKuvTJ65F/13s5f+eImyNYtri 1yNG0wmBogK6ZjrIkNt9lB8WX/vxC95V++gO1e/ON53otxAjE+iPe1KTn8JmPvfSEmdO K4BA== X-Gm-Message-State: AOAM53215M1PlOCDfTJdn1rFrvlS3Xi8XNJyXFwfsGcm74gQLtljdNI0 krTaMX6hscVPrFxXk13xJoGKL+RQVGzT5A== X-Google-Smtp-Source: ABdhPJza+zE+hsj6GpsM5yI2RV3cK3Poz1h/QcTZX3EeZXx4X9GK0YLr4NtkCMQXr3EA1sFMV3bPkg== X-Received: by 2002:a5d:4842:: with SMTP id n2mr4485520wrs.260.1600769048426; Tue, 22 Sep 2020 03:04:08 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id g14sm26369595wrv.25.2020.09.22.03.04.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 03:04:07 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Tue, 22 Sep 2020 11:03:56 +0100 Message-Id: <20200922100400.30766-3-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200922100400.30766-1-david.plowman@raspberrypi.com> References: <20200922100400.30766-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/6] libcamera: Initialise the SensorOutputSize property X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a default initialisation according to the sensor resolution, though it will need updating when the camera mode changes. Signed-off-by: David Plowman Reviewed-by: Jacopo Mondi --- src/libcamera/camera_sensor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index d2679a4..c9a19b0 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -277,6 +277,12 @@ int CameraSensor::init() */ resolution_ = sizes_.back(); + /* + * Set a default value for the SensorOutputSize, though it will have to + * be updated when new camera modes are chosen. + */ + properties_.set(properties::SensorOutputSize, resolution_); + return 0; }