From patchwork Tue Sep 29 16:39: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: 9865 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 508D0C3B5B for ; Tue, 29 Sep 2020 16:40:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D2DEC621D4; Tue, 29 Sep 2020 18:40:09 +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="S6wQbgQ2"; 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 24F95621DA for ; Tue, 29 Sep 2020 18:40:07 +0200 (CEST) Received: by mail-wr1-x442.google.com with SMTP id s12so6127962wrw.11 for ; Tue, 29 Sep 2020 09:40:07 -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=UHcAEvjMSMHLSIvS9uZ3RdWwkxfjBYL70NVjYWLjY38=; b=S6wQbgQ2eO4EEY8198pr9znjyVhVJVYINwjV8jZLgQxm6pA/bm+Rcnr466ycVuXTkq evtseh7DnjKUU8tLQfG+Dj8/HIiHY9TJwWPzAzRliaLuaj/hEoJpmbUbGEqbdWKXatOr RPXWOSpXNdxQjNju6OU/SPV6NdBw9JW6Qljm7HRt/AIPro6ezJq9e1e+G9oRNS9teYfa OfqqtGFTR0yuNG80q7Hk1nBUuaWk5QaQQJecPwQW3Xp6e9HyqFiRMC5lRddbJrKJHxug OEqczTIAC867EphXubVbGOdiHnMN5AHt5CFoLSaZ6bMWlbusrHHsMUtOZikaK7KrmP52 g+TQ== 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=UHcAEvjMSMHLSIvS9uZ3RdWwkxfjBYL70NVjYWLjY38=; b=L9Vo6fXjsTSgJyo+pKthbsUQqTFCUXeNRkcm7fMAdkVhFSsYk3S5uRHWC0rZhd57en 9+yi4flFCg9Sr67mr1E3YUyIoA1rD+cbFKrlAdo19v1Uq1FvKeWCG33fHTLK0uLMIQ+R OI6S2eiMg04d4O1m/3X5dRFocXVBnH5HLeUHLFBM1artl0/vvwikP1G4LZ45WeEEtbrZ a3rbKmAZlkulxeqTzuX1r2ziZst8P5b6Ona56rcCmRO+Z3wl34Kki+aoolJRFfnNZgmi zWcMwCj7ePol/DkbzBUasyBhcnaAbN6g3LgBJfPrPbBtFp9jO9lhPDogz0iOMveKg+gw w5nA== X-Gm-Message-State: AOAM533hKUlzHUmSLWud9KWYvD3tdT7/KRS7vWes9GDPPpE2gvt/cD0h 8iQuu7XqY19W1lVBzqkvzP4Psw2J+0O0+A== X-Google-Smtp-Source: ABdhPJzdkpBGw7dxIcgwsT5ph3DnPirE5948LQrMFohhZm8dipfKzYIdRSThNoAZeJAPktd2G/+n8A== X-Received: by 2002:adf:e802:: with SMTP id o2mr5242799wrm.309.1601397606523; Tue, 29 Sep 2020 09:40:06 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id q12sm6977393wrs.48.2020.09.29.09.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 09:40:05 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Tue, 29 Sep 2020 17:39:56 +0100 Message-Id: <20200929164000.15429-3-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200929164000.15429-1-david.plowman@raspberrypi.com> References: <20200929164000.15429-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 d2679a4b..c9a19b02 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; }