[{"id":19161,"web_url":"https://patchwork.libcamera.org/comment/19161/","msgid":"<CACGrz-Mk8zqbArb=JZ4g3Xdw6RdBqQdBaAHojFfpXgA9M6viYQ@mail.gmail.com>","date":"2021-08-29T10:13:28","subject":"Re: [libcamera-devel] [PATCH v1] test: gstreamer: Add minimal\n\tvalidation of camera output","submitter":{"id":85,"url":"https://patchwork.libcamera.org/api/people/85/","name":"Vedant Paranjape","email":"vedantparanjape160201@gmail.com"},"content":"Hello Laurent,\nI think this patch should be merged before adding multistream test.\n\nRegards,\n*Vedant Paranjape*\n\nOn Sat, Aug 28, 2021 at 11:48 PM Vedant Paranjape <\nvedantparanjape160201@gmail.com> wrote:\n\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> > I would like some minimal validation. I would expect that after 2s some\n> frames\n> > got \"rendered\" properly. You can read the GstStructure property \"stats\"\n> from\n> > fakevideosink / fakesink, and read the \"rendered\" field. Make sure this\n> not zero\n> > perhaps ?\n>\n> This change was suggested by Nicolas Dufresne <nicolas@ndufresne.ca> in\n> the\n> mailing list\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\n> b/test/gstreamer/gstreamer_single_stream_test.cpp\n> index 4c8d4804..5d56e762 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>                 g_autoptr(GstBus) bus = gst_element_get_bus(pipeline_);\n>                 g_autoptr(GstMessage) msg =\n> gst_bus_timed_pop_filtered(bus, timeout, msgType);\n>\n> +               gint sinkStats;\n> +               g_object_get(sink0_, \"stats\", &sinkStats, NULL);\n> +\n>                 gst_element_set_state(pipeline_, GST_STATE_NULL);\n>\n> +               if (sinkStats <= 0) {\n> +                       return TestFail;\n> +               }\n> +\n>                 /* Parse error message */\n>                 if (msg == NULL)\n>                         return TestPass;\n> --\n> 2.25.1\n>\n>","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 DB08FBD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 29 Aug 2021 10:13:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5835C6916A;\n\tSun, 29 Aug 2021 12:13:43 +0200 (CEST)","from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com\n\t[IPv6:2607:f8b0:4864:20::b29])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A778C68891\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 29 Aug 2021 12:13:42 +0200 (CEST)","by mail-yb1-xb29.google.com with SMTP id e133so6296322ybh.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 29 Aug 2021 03:13:42 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"HUFRnIR7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to;\n\tbh=Tnfoo1AJIQ7ODizBTP+cv3ZJmD+Zl0ozhWdNjfyf8/Q=;\n\tb=HUFRnIR74d2UBI7CeAA2K7fzAmmEleGfvtNMEZdGc595897n1mba73VAns8hHWguJ8\n\tIyaq7pUvGR9N2e9nRPfdYPjC5mq0DLitTrXuTIsLWkIV0UNiEOXaflUcOGkoIIGTB32p\n\tZBsRowGzxPrUneh7ByYSCySxtxs5F0jn8mXXqyvrXsgI/KyYFFXLZnO+ENmgrZNuIklr\n\tuBHRyy2N9Ifikwvk3wL5dqZfyrSKMOEEo8v828GdZfNdehqa3fXULxCyiZYJ5AJrzDGS\n\t3YOWJy2nI99E0jYwVEzkbkVvy0V/i8kAJNzKBgFqMEfkwL7mtOKiupno2uGKi/W/qK1p\n\t5o9Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to;\n\tbh=Tnfoo1AJIQ7ODizBTP+cv3ZJmD+Zl0ozhWdNjfyf8/Q=;\n\tb=kI8dY4lhcbWaPFGVhWdKHaZrvKkPyNTGvk+KTRevVNWn8T3iCQVK0Vi8IAm6EIrOf0\n\t2J7sixWziDKjREQrWZ6i2N7Ca+FiDBTNLE/PAR62gYIcI1Y493MsNBTnCUvH7/PubbQw\n\tLSOnoHdM+pnlKuxmc42GOsqewnOrBpqHqkIim3UDOWhn5+xxFmkE3H8EWdIfUSpfi1OX\n\tbqRyew0jjSQUNfwYEfAf0B6XbGZNlzzvxfRTpz/l41PqTVYSmbMudrnsRrvgbjbp7cOE\n\toccGrxeyItw7f2TZN13VZxEGylQdbo/k5XeGFDbN88WaKTxNHpkjh30F9N0uy2Qrf9FA\n\tYGZQ==","X-Gm-Message-State":"AOAM533dh1NDYBYcppB8GrmbymWS/rFSuaVKqi+Uyu20TWPj6zqpwe++\n\tk9Np9mNAoyR7Sj5kKNAXEEeUyaMGbHt6TDJY/WVc5vh5SKo=","X-Google-Smtp-Source":"ABdhPJyb9JhFDFt4uAgdjlLmlSOW9EpW5oXB6py8QE4i3bepC2j/DpT8pbAmIH1zO0nUEHze/Nw8RDK080hkVVGzOe0=","X-Received":"by 2002:a25:b787:: with SMTP id\n\tn7mr16714743ybh.468.1630232021113; \n\tSun, 29 Aug 2021 03:13:41 -0700 (PDT)","MIME-Version":"1.0","References":"<20210828181824.378795-1-vedantparanjape160201@gmail.com>","In-Reply-To":"<20210828181824.378795-1-vedantparanjape160201@gmail.com>","From":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Date":"Sun, 29 Aug 2021 15:43:28 +0530","Message-ID":"<CACGrz-Mk8zqbArb=JZ4g3Xdw6RdBqQdBaAHojFfpXgA9M6viYQ@mail.gmail.com>","To":"libcamera-devel@lists.libcamera.org, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000851dfd05caaff8bd\"","Subject":"Re: [libcamera-devel] [PATCH v1] 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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]