From patchwork Fri Sep 25 08:51:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 9823 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 0512EC3B5C for ; Fri, 25 Sep 2020 08:51:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C993B6303F; Fri, 25 Sep 2020 10:51:36 +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="c3d1EgOG"; dkim-atps=neutral Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0F2B863038 for ; Fri, 25 Sep 2020 10:51:34 +0200 (CEST) Received: by mail-wm1-x343.google.com with SMTP id a9so2387488wmm.2 for ; Fri, 25 Sep 2020 01:51:34 -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=ZganqNCKgpZBIWeH0OLpzeE1oHtR5CBwAEI3tRbcGyI=; b=c3d1EgOGrAssRQ9cWsk0sB3PB54+Md/yxC/IT2hEidYoUFZauqocztnxVhujfSqN7w TNesz9WLnjjscc9b2iHCLvIMDnEoIK0CPUg+vfoUJsIBVzrx3mBURO3wJ3xaFePgf6T/ +4ZfLmSCzTh61XO3u81NOOeH8WlVT8LUAi7pM7LdIAZsSwNRvWBl65iZC2x84uYA/uYk mZBq9Ky+fFDR1sq+BxX4sxuYB1xb2U5UbVwpsqIuZ/BqLaWujkgX08G71rtCb1Q2VEqX GMHaBEnpLlEDQJNYgQVm/zmf/M2oCTHUrejIoP+yW9lNRy/IuWvGotTcLHn5kNFbluaI Gd3g== 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=ZganqNCKgpZBIWeH0OLpzeE1oHtR5CBwAEI3tRbcGyI=; b=sSJ2yh25CVrkbPZUFn0PXEneyx5IaMl0aXAHvcqtlZ/tRrYXgCDMCN970QuzrxWP2U zuDtpg5/BbdFlxI1Br7QPlGMByYuF4W7ugyyAZkEGVNT7goTihfIeCu7MisSx9ee/UJy rTU6L1W5XQmKM6hKWtIAMio1x0jmgkrFS2u6ADUeAUE4g2aDmdfP7D4lpJLYnnVGAnfW kNKlLwVjxLpaUFBDjEQacbBhCB7QM5rKfhwcNIQlJxMyH/xIDh03PwA6jh6a9afJgAD6 Z5uyZPWdcYfNcIoavyLAgV1pd80GKicJAZH9xaCzIBTAmpsxAugtHr71bN3kJN1CmTT1 2CuA== X-Gm-Message-State: AOAM533bDChhx947o3zwL9YXMDixf5VVtquGLvdhXes/4gbQBOLBaYsp BBseNV91G/qgQWp5ZllmQzmRumYP7zkILw== X-Google-Smtp-Source: ABdhPJwzss4To/uK9Tnd5RYAtLCR28Yblb5QgnalDdM/zco6TSKkVb6Htuhdp2+OTo5ZRShETXs1iQ== X-Received: by 2002:a05:600c:21cd:: with SMTP id x13mr1936797wmj.63.1601023893519; Fri, 25 Sep 2020 01:51:33 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id n4sm2001383wrp.61.2020.09.25.01.51.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 01:51:32 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Fri, 25 Sep 2020 09:51:23 +0100 Message-Id: <20200925085127.17214-3-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200925085127.17214-1-david.plowman@raspberrypi.com> References: <20200925085127.17214-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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; }