[{"id":15729,"web_url":"https://patchwork.libcamera.org/comment/15729/","msgid":"<YFEHTF0amI2qS7yR@pendragon.ideasonboard.com>","date":"2021-03-16T19:30:20","subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Add propagation of sensor\n\tframe interval","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Marian,\n\nOn Tue, Mar 16, 2021 at 04:52:05PM +0100, Marian Cichy wrote:\n> This patch series is meant to demonstrate my use-case and to start a\n> discussion. The main target is to have a mechanism where the\n> application, e.g. libcamerasrc can read out the frame interval set by\n> the driver.\n> \n> It is generally useful for applications to know the framerate, e.g. one\n> can build pipelines with Gstreamer where the framerate is used to\n> pre-allocate a proper amount of memory or to compute the latency. It is\n> also an useful debug-information in general.\n> \n> this approach uses the frame_interval ioctls which is for my driver the\n> only way to get the frame rate. I suspect there is also a different\n> approach using controls::FrameDurations which I find in some parts of\n> libcamera. However, it is not clear to me, how I would use this and what\n> the driver needs to do here or if it even would be the better approach\n> for my use-case. Any comments to this are welcome.\n\nUsing FrameDurations doesn't have any implication on the driver, it's\nonly the API between applications and pipeline handlers. How you\nconfigure the kernel devices is entirely up to the pipeline handler.\n\n> Marian Cichy (6):\n>   libcamera: Add fraction.h\n>   libcamera: stream: Add frame interval attribute\n>   libcamera: v4l2_subdevice: Add methods to get/set frame interval\n>   pipeline: simple: Propagate frame interval through pipeline\n>   pipeline: simple: rename setupFormats to setupStreamProperties\n>   gst: utils: Add framerate to caps\n> \n>  include/libcamera/fraction.h                | 34 ++++++++++++\n>  include/libcamera/internal/v4l2_subdevice.h |  4 ++\n>  include/libcamera/stream.h                  |  2 +\n>  src/gstreamer/gstlibcamera-utils.cpp        |  2 +\n>  src/libcamera/fraction.cpp                  | 60 +++++++++++++++++++++\n>  src/libcamera/meson.build                   |  1 +\n>  src/libcamera/pipeline/simple/simple.cpp    | 31 +++++++++--\n>  src/libcamera/v4l2_subdevice.cpp            | 43 +++++++++++++++\n>  8 files changed, 173 insertions(+), 4 deletions(-)\n>  create mode 100644 include/libcamera/fraction.h\n>  create mode 100644 src/libcamera/fraction.cpp","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 90C8BBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Mar 2021 19:30:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4312A68D4C;\n\tTue, 16 Mar 2021 20:30:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 12ED868D49\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Mar 2021 20:30:57 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A0C8C8CF;\n\tTue, 16 Mar 2021 20:30:56 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"kMVsySGC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615923056;\n\tbh=AjF0FXiSvhj9jqbSGW0qcuX2OoJWL38YgwwBV7zpHUE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=kMVsySGChcv6wWOxym62duj63At01xon2VaBLxUWQ1apRZ7wQ9dHTgvkDrG+Zuoog\n\tv+KghjHgOa5TwIJH64zu3/zSpsjYtDbc7jdHKSYoBVJJcdte7w8z4i3XnPQKi/pW9I\n\tsmE/CmYf1GATpqkS810C7P8Snev3gYGvl12uYKCE=","Date":"Tue, 16 Mar 2021 21:30:20 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Marian Cichy <m.cichy@pengutronix.de>","Message-ID":"<YFEHTF0amI2qS7yR@pendragon.ideasonboard.com>","References":"<20210316155211.6679-1-m.cichy@pengutronix.de>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210316155211.6679-1-m.cichy@pengutronix.de>","Subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Add propagation of sensor\n\tframe interval","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>","Cc":"libcamera-devel@lists.libcamera.org, graphics@pengutronix.de","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]