From patchwork Sun Aug 29 11:30:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vedant Paranjape X-Patchwork-Id: 13563 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 0DBF6BDC71 for ; Sun, 29 Aug 2021 11:30:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5EFE96916A; Sun, 29 Aug 2021 13:30:31 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="d4ssuVJ/"; dkim-atps=neutral Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0C18B68891 for ; Sun, 29 Aug 2021 13:30:30 +0200 (CEST) Received: by mail-pf1-x42d.google.com with SMTP id m26so9884471pff.3 for ; Sun, 29 Aug 2021 04:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RfWP4L6oVdwdQSW2c6p6xSWG1DBCHa86c4KeFSwcT7A=; b=d4ssuVJ/lFJMjbD/y3ZAPjRN4q/cAf4AUBRGSdIA1kHS5HWhGmufq8e1PW8iOjvPO4 B14obpzZr8/L0FnI5R+LYqR25iK/wIx/sG9Pn6oeizyN6rRzZgUUhsrbdFRZUiJcs8Yv Sx+ektUkmL+XEZQwHK6e//OUg+Z9UHH91Y5qAp3Kq6l3hBaKJEm0KOAQlfmZ4XGQ6pdq 0qTE4ghYa8X5nc8pEgyRHbPuZgHSQjdeknnVXDO0ysYpPHaOwumzV8500ZkCCqo5uNeL mKn5AvoXXt5gE/IWKv6hndIN8OEU9iEGxHXluux1fDf62YAHnahepYfa5aresfQIk+cF f0pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RfWP4L6oVdwdQSW2c6p6xSWG1DBCHa86c4KeFSwcT7A=; b=UyxU9qx5BNEIQX0YkBfofMz5B6JYDtAy7QnJ+8hLxObqKkw0ppjh82+JA/pFk8i5JV GDC2LkgkzdOrXeDtfwlUbN8RL34OeqpLe7nHDf5per0Qitw5q4Q1/P+KnDAEsfc2m31T tMdaOvkVh0JpS5Fj5LdvKiTj/xIFPG5mKQt3MX4ryHgXo9exVIZIwlWD/zm8rMvjtgWj JU5T3/ds8DqIIvijZlHa0pjCUHppoFlQPCwNPrZtbOZyNwnn+KSaAAxn9QIJtuNhscvg nzVIyYOVuJsAcMVhzoukL5v9gUykVHyKSsfwHPgZY9CVRuVtaaFuyUBpW0t8umPUF6+l u/Zg== X-Gm-Message-State: AOAM531oe2Sz2nRs8vKy0BW2bllefDhIwHdahxcp3+fkv09vrKF3Bkfl +nuy6wj0saIEf+Hc810owf07qxXQ/IsoFw== X-Google-Smtp-Source: ABdhPJwEJFkuE9I+eAx8V0rpQs0Wbps3MY3ROOHO01GaPdB6JNk51IMxe+dKuJR3JztQJ2v7xAExMQ== X-Received: by 2002:a65:62c4:: with SMTP id m4mr16846489pgv.453.1630236628009; Sun, 29 Aug 2021 04:30:28 -0700 (PDT) Received: from localhost.localdomain ([1.186.166.201]) by smtp.googlemail.com with ESMTPSA id n3sm11538285pfo.101.2021.08.29.04.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Aug 2021 04:30:27 -0700 (PDT) From: Vedant Paranjape To: libcamera-devel@lists.libcamera.org Date: Sun, 29 Aug 2021 17:00:12 +0530 Message-Id: <20210829113012.525417-1-vedantparanjape160201@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] test: gstreamer: Add minimal validation of camera output 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: Vedant Paranjape Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Read stats property of fakesink which has Sink Statistics, It is expected to be a non-zero number after running gstreamer element for two seconds. Signed-off-by: Vedant Paranjape --- test/gstreamer/gstreamer_single_stream_test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp index 4c8d4804..6d977262 100644 --- a/test/gstreamer/gstreamer_single_stream_test.cpp +++ b/test/gstreamer/gstreamer_single_stream_test.cpp @@ -134,8 +134,15 @@ protected: g_autoptr(GstBus) bus = gst_element_get_bus(pipeline_); g_autoptr(GstMessage) msg = gst_bus_timed_pop_filtered(bus, timeout, msgType); + gint sinkStats; + g_object_get(sink0_, "stats", &sinkStats, NULL); + gst_element_set_state(pipeline_, GST_STATE_NULL); + if (sinkStats == 0) { + return TestFail; + } + /* Parse error message */ if (msg == NULL) return TestPass;