From patchwork Wed Nov 2 13:56:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 17745 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 A404EBD16B for ; Wed, 2 Nov 2022 13:56:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C8DA363077; Wed, 2 Nov 2022 14:56:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1667397385; bh=/5yQiSpukpg87uO1w3Tr+yoLuh5mbQaMmEW6jh5Eyag=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=heKwP/dV5GBslUKrxE/Tcb1qQXcj5C9nwt+jFfh31HSMoEHQ8+4jX2jqySuaHgt9u LJ4oyV7dR9zsnMy7cEE0NQoZ6X/DhClxTrU9HLI1sjvuAEpo57XpACJw0jdbYMNBf1 oJ3fvX5wdj2zgyNpYq+7JlWWiSnv7oR9pOx5ntkvIfx3sqhcKZR14XLM4OEe9WqEgg zDmI2B5V+9MYKPDcoIKIyPuPwWPfDeTAD/fyoLww2IFqEaG8SCnEmffZTbTZraMN7Y ZRrI8bGF0GsUW6dn54wf3C7wTbhqpuyQ7F+vHlK0m5KBjOuEsvwjwet1P7bfBPEQ1r zG23hFFtsThfA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2991E63075 for ; Wed, 2 Nov 2022 14:56:24 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="f817ZnQa"; dkim-atps=neutral Received: from umang.jainideasonboard.com (unknown [103.251.226.107]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1E1AA1226; Wed, 2 Nov 2022 14:56:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1667397383; bh=/5yQiSpukpg87uO1w3Tr+yoLuh5mbQaMmEW6jh5Eyag=; h=From:To:Cc:Subject:Date:From; b=f817ZnQaYLcShsn5KXlAGOflb8cO9JfgwhaInJEhAdd6suNyLevSe4J9mSP+h43eq z+YUA7ySUALtQZoZXlHUeAf51AKDxMPQDOdnmtKgYBPWd9hb1Jnzi5xiGy67yEckBG eFMcD3PaqmPsFfexRFDq0dEg9+J26mPn2llk8jYA= To: libcamera-devel@lists.libcamera.org Date: Wed, 2 Nov 2022 19:26:12 +0530 Message-Id: <20221102135614.657444-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 0/2] Provide framerate support for libcamerasrc 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: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This series aims to add framerate support to libcamerasrc. With this libcamerasrc can negotiate framerate and stream with the requested framerate, provided that the framerate requested is in bounds of the limits supported by the camera. Changes in v6: - Find divide by 0 bug, use 30fps as default fps requested - Remove Span <> cast while populating control list - Shorten names and reflow statement - Simplyify error handling at a few places - Add a few one liner comments for explaination - fix checkstyle issues Testing: The series has been tested with following gst-launch-1.0 ($) gst-launch-1.0 libcamerasrc ! "video/x-raw, framerate=/1" ! fpsdisplaysink Rishikesh Donadkar (2): gstreamer: Do not expose the caps before configuring the camera gstreamer: Provide framerate support for libcamerasrc src/gstreamer/gstlibcamera-utils.cpp | 78 ++++++++++++++++++++++++++++ src/gstreamer/gstlibcamera-utils.h | 6 +++ src/gstreamer/gstlibcamerasrc.cpp | 34 ++++++++---- 3 files changed, 108 insertions(+), 10 deletions(-)