From patchwork Wed Dec 6 21:05:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19300 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 A22CBC32BE for ; Wed, 6 Dec 2023 21:05:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3228F62B3E; Wed, 6 Dec 2023 22:05:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701896728; bh=NZkiQNMfUta8JuleftDajQUrje2fpiQJko7TJilAfEI=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vgHP6EpCW3/7ACRaYcNarSEAgHJCsb4zs4ukJP0UcK3DFb3w+/4LI/bx6JkmCQa+J Ji1dUKCn/tkIHO/PxbCdBfSoVAnd6jHM+ybjwSFITaZGZerLhfg1xMSiDiWIvvwzRi VH/WP0rDjXT3UY9oYSKPZxNWA69HnFESszdVOb4dp6+oeCop7vJxmBlYgJKD/wBVbh 1hS7surRYPradOdi5tACndB4QkjCLM4rQfFPiRwGPiLBH52+uwqGlTI6Sl9Fku1KLh dPgiXhR/6J5pmv1wcwmmnXhpNy07mekbeUJs/T+ggXPGy1cfaLY8Wst16EUp2zfikZ h6rQ7LZqIj6hA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 458AC62B32 for ; Wed, 6 Dec 2023 22:05:26 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hESmuzcT"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3E3FAE45 for ; Wed, 6 Dec 2023 22:04:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701896685; bh=NZkiQNMfUta8JuleftDajQUrje2fpiQJko7TJilAfEI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hESmuzcTwMfsTZ9LjF5JVFO/dfLtuJMnPX1AlK6jDhsJvXawqxjHpptLBSUzoydRL 4OoLYieeHDn0oGr2vRRFg77viujC4dpWn08fKvpQVyfiJohPHq8DHxxCxcN5avQnpq hKkTlLTr1x9cp1W1vvLoLxcAbg57mE40e7AfG7dU= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 23:05:24 +0200 Message-ID: <20231206210524.20974-7-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231206210524.20974-1-laurent.pinchart@ideasonboard.com> References: <20231206210524.20974-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 6/6] test: gstreamer: Remove videoconvert element from pipeline 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: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The GStreamer single stream test uses the following pipeline: libcamerasrc ! videoconvert ! fakesink The videoconvert element isn't useful as the data is thrown away by the fakesink anyway. We can shorten the pipeline to libcamerasrc ! fakesink to save CPU time and to avoid depending on the gstreamer1.0-plugins-base package to run the unit tests. The test could be further simplified by replacing gst_parse_bin_from_description_full() with gst_element_factory_make(), now that we only add one element to the bin. The extra cost incurred by the bin only impacts initialization time, and using a bin will make it easier to add other elements in the future if needed. Keep the bin, and only drop the videoconvert element. Signed-off-by: Laurent Pinchart Reviewed-by: Nicolas Dufresne Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- test/gstreamer/gstreamer_single_stream_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp index a0dd12cfea84..301e4a935a37 100644 --- a/test/gstreamer/gstreamer_single_stream_test.cpp +++ b/test/gstreamer/gstreamer_single_stream_test.cpp @@ -29,7 +29,7 @@ protected: if (status_ != TestPass) return status_; - const gchar *streamDescription = "videoconvert ! fakesink"; + const gchar *streamDescription = "fakesink"; g_autoptr(GError) error0 = NULL; stream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE, NULL,