[{"id":19162,"web_url":"https://patchwork.libcamera.org/comment/19162/","msgid":"<YSu7fH+nGWLOOCQS@pendragon.ideasonboard.com>","date":"2021-08-29T16:53:16","subject":"Re: [libcamera-devel] [PATCH v2] test: gstreamer: Add minimal\n\tvalidation of camera output","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"i\nHi Vedant,\n\nThank you for the patch.\n\nOn Sun, Aug 29, 2021 at 05:00:12PM +0530, Vedant Paranjape wrote:\n> Read stats property of fakesink which has Sink Statistics, It is\n> expected to be a non-zero number after running gstreamer element\n> for two seconds.\n> \n> Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n> ---\n>  test/gstreamer/gstreamer_single_stream_test.cpp | 7 +++++++\n>  1 file changed, 7 insertions(+)\n> \n> diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\n> index 4c8d4804..6d977262 100644\n> --- a/test/gstreamer/gstreamer_single_stream_test.cpp\n> +++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n> @@ -134,8 +134,15 @@ protected:\n>  \t\tg_autoptr(GstBus) bus = gst_element_get_bus(pipeline_);\n>  \t\tg_autoptr(GstMessage) msg = gst_bus_timed_pop_filtered(bus, timeout, msgType);\n>  \n> +\t\tgint sinkStats;\n> +\t\tg_object_get(sink0_, \"stats\", &sinkStats, NULL);\n> +\n>  \t\tgst_element_set_state(pipeline_, GST_STATE_NULL);\n>  \n> +\t\tif (sinkStats == 0) {\n\nThis should print an error message, as a failure without a clear message\nwill be confusing.\n\n> +\t\t\treturn TestFail;\n> +\t\t}\n> +\n>  \t\t/* Parse error message */\n>  \t\tif (msg == NULL)\n>  \t\t\treturn TestPass;","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 54D28BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 29 Aug 2021 16:53:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 315A968933;\n\tSun, 29 Aug 2021 18:53:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D30568891\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 29 Aug 2021 18:53:30 +0200 (CEST)","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 E5FF13D7;\n\tSun, 29 Aug 2021 18:53:29 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"J8gGtO11\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1630256010;\n\tbh=e5RLQPobewDmKFhbWMMbcJsDkKEsORbImFRaQ4w8BOI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=J8gGtO11CKCIjI3gwhgYPVS6VIqPm8syfTkLpgPPV15rrLWj3KPCx/IJ0O6Ms+GOD\n\tLu4IJhuto8LPkd+Sw5g/wFyIXE2K8HKmnxSNWDNeVF6G6OzRjvO3vg0JQPQQnQgwdp\n\tHudqc5xh2VfcdYLGuBx24NxYSckdt0fyH21OIbA8=","Date":"Sun, 29 Aug 2021 19:53:16 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Message-ID":"<YSu7fH+nGWLOOCQS@pendragon.ideasonboard.com>","References":"<20210829113012.525417-1-vedantparanjape160201@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210829113012.525417-1-vedantparanjape160201@gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v2] test: gstreamer: Add minimal\n\tvalidation of camera output","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]