[{"id":3203,"web_url":"https://patchwork.libcamera.org/comment/3203/","msgid":"<20191206223004.GR28879@bigcity.dyn.berto.se>","date":"2019-12-06T22:30:04","subject":"Re: [libcamera-devel] [PATCH v2 08/10] libcamera: camera: Add\n\tCamera properties","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your patch.\n\nOn 2019-12-05 21:43:48 +0100, Jacopo Mondi wrote:\n> Add a method to the Camera class to retrieve the Camera properties\n> registered by the pipeline handler.\n> \n> While at it, reword the Camera::controls() operation documentation to\n> specify that the camera control information are constant during the\n> camera lifetime not their value, while the camera properties value are\n> the actually static information.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  include/libcamera/camera.h |  1 +\n>  src/libcamera/camera.cpp   | 16 +++++++++++++++-\n>  2 files changed, 16 insertions(+), 1 deletion(-)\n> \n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index ef6a37bb142c..72d5d62cc902 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -85,6 +85,7 @@ public:\n>  \tint release();\n>  \n>  \tconst ControlInfoMap &controls();\n> +\tconst ControlList &properties();\n>  \n>  \tconst std::set<Stream *> &streams() const;\n>  \tstd::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles);\n> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> index e810fb725d81..5cbee0feeb96 100644\n> --- a/src/libcamera/camera.cpp\n> +++ b/src/libcamera/camera.cpp\n> @@ -551,7 +551,8 @@ int Camera::release()\n>  /**\n>   * \\brief Retrieve the list of controls supported by the camera\n>   *\n> - * Camera controls remain constant through the lifetime of the camera.\n> + * The list of controls supported by the camera and their associated\n> + * constraints remain constant through the lifetime of the Camera object.\n>   *\n>   * \\return A ControlInfoMap listing the controls supported by the camera\n>   */\n> @@ -560,6 +561,19 @@ const ControlInfoMap &Camera::controls()\n>  \treturn pipe_->controls(this);\n>  }\n>  \n> +/**\n> + * \\brief Retrieve the list of properties of the camera\n> + *\n> + * * Camera properties are static information that describe the capabilities of\n\ns/ * * / * /\n\nWith this fixed,\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> + * the camera. They remain constant through the lifetime of the Camera object.\n> + *\n> + * \\return A ControlList of properties supported by the camera\n> + */\n> +const ControlList &Camera::properties()\n> +{\n> +\treturn pipe_->properties(this);\n> +}\n> +\n>  /**\n>   * \\brief Retrieve all the camera's stream information\n>   *\n> -- \n> 2.23.0\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9F85160BBC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Dec 2019 23:30:06 +0100 (CET)","by mail-lj1-x242.google.com with SMTP id k8so9294864ljh.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 06 Dec 2019 14:30:06 -0800 (PST)","from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159])\n\tby smtp.gmail.com with ESMTPSA id\n\t6sm1836942lft.52.2019.12.06.14.30.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 06 Dec 2019 14:30:05 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=PBKdnKOYQiJl5eS5FZ5kFg9yEJI6fTWiaMVqYQotprs=;\n\tb=CsIvRz1u8xA7iXmHcwAbpK9UADB73HtrqyCbdRJrIJmloa05MVI0g+Sua6q4Itgl0+\n\tQXOlxavcO1qlS7iIF7kPvVVEqboe4sPRGw+pGNiFu5/aBl/6b17qOXJTJMIZy8Dq3O7f\n\trWW0p9eQdI+JWpJjzujXrU8MX/tQhU4ev50QR2lMdN9pqLN6YRzxORWxolcJtptGdEkb\n\tV7JjbuOmYvi4T+L0+2r4o8KWE96kFebASS/UYy7lJLDCCE/O78LDCF8WhNpVLzNiodhK\n\tdE0TV/VdGfrUZzhxLjxIyfv8e/6Mze5SLFkmgBMKPGhvl9ulXrfVAysMO+fSJS2+vhan\n\tQ9ZA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=PBKdnKOYQiJl5eS5FZ5kFg9yEJI6fTWiaMVqYQotprs=;\n\tb=cD5kedoiTPne4VvNe/phTwrwFw6alMMttFS/U9g1yD9gFaDs8fDlmtDiihfTgLQqpy\n\tLjgCH1ICtRhl8fW6xVcuNtEFAg9zg8c5Vw0xZEQCi76BGX56Db1s7PSVXRrIOXLV+XFM\n\tLdSIgMpS+aqWD+hbN7epMCWzfbYMgF3+TBFSX5Vy+Mg9obp3FM9AaYAW9qqHcJ6vl55+\n\tTitgjgXTafmYch21PoD2CKt/jbtiqJI+1cRiQYXv4a3jGi/hOuKsiYrPio+LxfRf8Lmn\n\t/06CQB9jGwzjT0dGGXc6MDlikIb3DLIbT162JSC0ISe1HZp/fzNd4zLpJuJOpa1YzYtz\n\tWEmw==","X-Gm-Message-State":"APjAAAUhETCr49hNWRlLDryIHwbwA+bVr7BNGBHCOchZv5GB7Jc0Z+mz\n\tOiH7enP66ourMnEegj+zmIbWK+h2SuE=","X-Google-Smtp-Source":"APXvYqy4i6NCAbJ+aG3cYSJzV9/SMKtTIxiYJFs0OyBvq1ZLVRxIgmL/BF4w/pvVjMPJDmbqVw1Byg==","X-Received":"by 2002:a2e:9bcc:: with SMTP id\n\tw12mr3619495ljj.105.1575671406103; \n\tFri, 06 Dec 2019 14:30:06 -0800 (PST)","Date":"Fri, 6 Dec 2019 23:30:04 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191206223004.GR28879@bigcity.dyn.berto.se>","References":"<20191205204350.28196-1-jacopo@jmondi.org>\n\t<20191205204350.28196-9-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20191205204350.28196-9-jacopo@jmondi.org>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [PATCH v2 08/10] libcamera: camera: Add\n\tCamera properties","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>","X-List-Received-Date":"Fri, 06 Dec 2019 22:30:06 -0000"}}]