From patchwork Tue Mar 16 15:52:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marian Cichy X-Patchwork-Id: 11597 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 B11D9C32E2 for ; Tue, 16 Mar 2021 15:52:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D24A368D57; Tue, 16 Mar 2021 16:52:33 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 02C7668D4F for ; Tue, 16 Mar 2021 16:52:27 +0100 (CET) Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMBzf-0000V6-2Y; Tue, 16 Mar 2021 16:52:27 +0100 Received: from mci by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lMBze-0003E2-K4; Tue, 16 Mar 2021 16:52:26 +0100 From: Marian Cichy To: libcamera-devel@lists.libcamera.org Date: Tue, 16 Mar 2021 16:52:11 +0100 Message-Id: <20210316155211.6679-7-m.cichy@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210316155211.6679-1-m.cichy@pengutronix.de> References: <20210316155211.6679-1-m.cichy@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mci@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [RFC PATCH 6/6] gst: utils: Add framerate to caps 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: , Cc: graphics@pengutronix.de, Marian Cichy Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The framerate of a stream is the inverse of the frame interval from the stream configuration. Signed-off-by: Marian Cichy --- src/gstreamer/gstlibcamera-utils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp index 61370d5f..7516f84a 100644 --- a/src/gstreamer/gstlibcamera-utils.cpp +++ b/src/gstreamer/gstlibcamera-utils.cpp @@ -125,6 +125,8 @@ gst_libcamera_stream_configuration_to_caps(const StreamConfiguration &stream_cfg gst_structure_set(s, "width", G_TYPE_INT, stream_cfg.size.width, "height", G_TYPE_INT, stream_cfg.size.height, + "framerate", GST_TYPE_FRACTION, stream_cfg.frameInterval.denominator, + stream_cfg.frameInterval.numerator, nullptr); gst_caps_append_structure(caps, s);