From patchwork Tue Mar 24 17:38:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1260842 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=guhstPMo; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mz5752J4z9sPR for ; Wed, 25 Mar 2020 04:39:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 191448869F; Tue, 24 Mar 2020 17:39:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VXCBgJPNpcrT; Tue, 24 Mar 2020 17:39:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E66AC88650; Tue, 24 Mar 2020 17:39:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 58C4E1BF344 for ; Tue, 24 Mar 2020 17:39:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 560D984789 for ; Tue, 24 Mar 2020 17:39:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VfSIVtJwyoL3 for ; Tue, 24 Mar 2020 17:38:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 254E5844B7 for ; Tue, 24 Mar 2020 17:38:59 +0000 (UTC) Received: by mail-pj1-f65.google.com with SMTP id mj6so1891950pjb.5 for ; Tue, 24 Mar 2020 10:38:59 -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=j1aBhpPreuw4ql1KSrnAuf9ntkbEqNkvBjKrSVCFFik=; b=guhstPMol3x8D6y+iuwQdm64M/IQpv0dpa5ejnTMsYzTmO1qIFN8EqIimolmlCwCFa YPqoxZc7wKnLm1t6BdEMYIPHcrTY5sh1Ysr/Xa/AnOT2E6FRqJTQWjJ0ikILcXr9sbWw oGIZsKDK/wgkn7NVD50gEadq6BK1dU3tM2JQ2lTQ9gskOLam6GPorSyL0VGfFztmLxCo p37ZBcUriXQLq1+vHYcCHQJWk6M9/1MQ3JFxzv9TGyo+MeYWs+qq8xbiNqD+g54dgsKO b8gBeiwUm9o6yBdIAjm/hDaf09JOuJbIH0mJnp7e8o+nVVmMrp8aDZ3w/Cp85iFUCGPd NRPg== 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=j1aBhpPreuw4ql1KSrnAuf9ntkbEqNkvBjKrSVCFFik=; b=lxBZsq1CCrjcaTaxcxIUMZISnyGShQ7eI+AXO1KR6jD3DbM46+cbxncbWnOQiEszFo neBv8i6KkJstugT3r3wu/iPOlGcI8KF+2ogAnGEbDZdwmWrUJ79vb6+RAQYMnE7nhVd7 HnEXQacgk2SXi6GxBqA91EOjFzInM4ydTIazesKitbGsMNPk6T1EPSPbwOPGnMvSvsd9 CHRUo4w/we6qqIMFId2GKkBd5Qgx/FEgBgdQJ2n+C6BUeL4MKNBh+DEm70SdzpsG6+Dm 9C+TqXRLpTx0f/+QB7SfOR2l9nkjlvdqo865oC6Mr9lyMI6iUcq12EmgKPKkznt6zOaj lH6A== X-Gm-Message-State: ANhLgQ2csQl5um/6gNlgbNWZtJNmPgwz7WvwhPxIVUoJj5JWQ3lqvGjt cCmqPkB3QWC7HKWZWn070jlJ7nLa X-Google-Smtp-Source: ADFU+vtLDW9C4z7Lh4BAJ0bhY9gTidgA/II0iLh0jPxAnO0wshVZ8A6O2H0LJAyRUunWpJs/K6Fnfw== X-Received: by 2002:a17:902:b785:: with SMTP id e5mr11320300pls.175.1585071538155; Tue, 24 Mar 2020 10:38:58 -0700 (PDT) Received: from localhost.localdomain ([47.149.8.172]) by smtp.gmail.com with ESMTPSA id v25sm12194425pgl.55.2020.03.24.10.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 10:38:57 -0700 (PDT) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Tue, 24 Mar 2020 10:38:52 -0700 Message-Id: <20200324173855.747054-1-aduskett@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/3] package/gstreamer1/gst1-python: fix libpython-dir path X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett , Ricardo Martincoski Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Due to the CONF_ENV options set in the gst1-python.mk file, libpython-dir must be set manually or else the error: "Python dynamic library path could not be determined" occurs. Previously the libpython-dir option was set to $(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR), however, this breaks the resulting .so because the above full path is baked into the resulting .so. which results in the error: Couldn't g_module_open libpython. Reason: /full/path/to/host/lib/python3.8/libpython3.8.so: cannot open shared object file: No such file or directory To fix this error, set the libpython-dir to /usr/lib. Because we provide PYTHONPATH=$(PYTHON3_PATH) in the GST1_PYTHON_CONF_ENV, the logic in the meson file uses the above python3 provided by the PYTHONPATH variable to determine /usr/lib/ has the proper python$(PYTHON3_VERSION_MAJOR).so file. Because Buildroot provides the appropriate paths, the meson file finds the correct .so file and the resulting compiled library has the appropriate path of /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so This change has been tested on the following distributions: - Debian 9 and 10 - Debian 9 without python3 installed on the host. - Centos7 - Fedora 31 Signed-off-by: Adam Duskett --- package/gstreamer1/gst1-python/gst1-python.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/package/gstreamer1/gst1-python/gst1-python.mk b/package/gstreamer1/gst1-python/gst1-python.mk index 23b4bbd900..122c3dd997 100644 --- a/package/gstreamer1/gst1-python/gst1-python.mk +++ b/package/gstreamer1/gst1-python/gst1-python.mk @@ -23,10 +23,16 @@ GST1_PYTHON_CONF_ENV += \ _PYTHON_SYSCONFIGDATA_NAME=$(PKG_PYTHON_SYSCONFIGDATA_NAME) \ PYTHONPATH=$(PYTHON3_PATH) -# Due to the CONF_ENV options, libpython-dir must be set to the host directory +# Due to the CONF_ENV options, libpython-dir must be set manually # or else the error: "Python dynamic library path could not be determined" -# will occure +# occurs. We set the libpython-dir to /usr/lib as this path is hard-coded +# into the resulting .so file as /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so. +# Because we provide PYTHONPATH=$(PYTHON3_PATH) above, the logic in the meson +# file uses the above python path to determine if /usr/lib/ has the proper .so +# file. Because Buildroot provides the appropriate paths, the meson file finds +# the correct .so file, and the resulting compiled library has the appropriate +# path of /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so GST1_PYTHON_CONF_OPTS += \ - -Dlibpython-dir=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR) + -Dlibpython-dir=/usr/lib/ $(eval $(meson-package)) From patchwork Tue Mar 24 17:38:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1260843 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=DEaK0uXY; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mz5F1JLyz9sRN for ; Wed, 25 Mar 2020 04:39:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 42C6288C8E; Tue, 24 Mar 2020 17:39:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FTt7vKV9M0BA; Tue, 24 Mar 2020 17:39:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7FFE588689; Tue, 24 Mar 2020 17:39:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C6FEC1BF344 for ; Tue, 24 Mar 2020 17:39:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C37AD84B88 for ; Tue, 24 Mar 2020 17:39:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iWCcO9zGMDYO for ; Tue, 24 Mar 2020 17:39:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3FEAF84B39 for ; Tue, 24 Mar 2020 17:39:00 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id o12so1785540pjs.2 for ; Tue, 24 Mar 2020 10:39:00 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=DK4ok5K7l/BRgYkeApymhO36ozPULNKG4LvGKD7uL3E=; b=DEaK0uXYY+tKv63Vh0Sl7+Wv+9TYnfzQOHQE3XgkQG9UqIpPDOHgIgfB7UnDIcudiu VCVVEEa56PdQP3Bkyml4uMuTEuYo5Ypgkm1PavsX0fYcEV5YjNvBcnzs76t92ORsHE+O 1h9Boj3PBHy8yxu68I9GNzxTqeAs19tDnVkc8V8XFrWcWhkBKobXftcdCZV43gLHL6Vw I/cZI92eOBYynpmjTFK2UxVxNak5Dpqb1OV8/EVNSexC67BdmaSrex89QCN3vOtSjcy9 VwmL4JHAuYWL9C8NUqiDfMAH+5LJwvAugXqjXRQ2RGhd41229SPLCAO2V4Xp42+3PhKm 2+eg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=DK4ok5K7l/BRgYkeApymhO36ozPULNKG4LvGKD7uL3E=; b=GxuRPcbChBhEF2LoE/IBVIGjngYEdlruui4FDhnS++UOtv5t6zcylSEPzpWz4wYfq2 Aaq/sZ9OIRSOKO4L5jcVqMU6k6dKU7T+Y4lCKf14MkjkwPzE90YGiIRjlTPzbWxXWCMA 2weym8vK0WinNaCXmKjchURwnTu97B+EJYsWKcWv+azs0XHohRXnfJcM+KCW40t42psM 1mudXoJrb7654HeIz2Tl7nGe5Lu1P6IKiCpRUR88JVXE3jNb09LKHLdmWBx+L41Ilkkp gaUKwkKrnG2kNTAQWTOygsCzrdzf48sjhe8NBSMp0XMLwS3azDbuni41bfQ386Nj6i43 xntg== X-Gm-Message-State: ANhLgQ337BbH0tsjUN7VcDgiLQ4JcXfnLURS+tx+iu9zZMAeLyDKQZK3 g/k7AgPbgSZB4MfA2pQ4O0ogMDvq X-Google-Smtp-Source: ADFU+vtVFVDdJFppKFNKZ4u6BON9h+1M7qFeDGY3cFqCN/JrFFi69FzQX65xDd7gqDIAPaKqfDamEg== X-Received: by 2002:a17:902:7c84:: with SMTP id y4mr28573266pll.30.1585071539507; Tue, 24 Mar 2020 10:38:59 -0700 (PDT) Received: from localhost.localdomain ([47.149.8.172]) by smtp.gmail.com with ESMTPSA id v25sm12194425pgl.55.2020.03.24.10.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 10:38:59 -0700 (PDT) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Tue, 24 Mar 2020 10:38:53 -0700 Message-Id: <20200324173855.747054-2-aduskett@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200324173855.747054-1-aduskett@gmail.com> References: <20200324173855.747054-1-aduskett@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/3] support/testing/tests/package/test_gst1_python.py: fix config and timeout X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett , Ricardo Martincoski Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett The config is missing the following packages: - BR2_PACKAGE_GST1_PLUGINS_BASE - This is needed for the videotestsrc plugin which provides videotestsrc. - BR2_PACKAGE_GST1_PLUGINS_BAD - This is needed for the debugutils plugin which provides fakevideosink. - BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC - videotestsrcplugin used by the example pipeline. - BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS - fakevideosink plugin used by the example pipeline. In addition, the default timeout is set to low and will result in a test failure, this has been changed to 200 seconds. Signed-off-by: Adam Duskett --- support/testing/tests/package/test_gst1_python.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/support/testing/tests/package/test_gst1_python.py b/support/testing/tests/package/test_gst1_python.py index 469e0f392d..c6b337dd04 100644 --- a/support/testing/tests/package/test_gst1_python.py +++ b/support/testing/tests/package/test_gst1_python.py @@ -14,6 +14,10 @@ class TestGst1Python(TestPythonPackageBase): BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM=y BR2_PACKAGE_GOBJECT_INTROSPECTION=y BR2_PACKAGE_GSTREAMER1=y + BR2_PACKAGE_GST1_PLUGINS_BASE=y + BR2_PACKAGE_GST1_PLUGINS_BAD=y + BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC=y + BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS=y BR2_PACKAGE_GST1_PYTHON=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_GOBJECT=y @@ -26,3 +30,4 @@ class TestGst1Python(TestPythonPackageBase): options=["-initrd", cpio_file]) self.emulator.login() sample_scripts = ["tests/package/sample_gst1_python.py"] + timeout = 200 From patchwork Tue Mar 24 17:38:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1260844 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Rl0UkNS9; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mz5H51ysz9sPR for ; Wed, 25 Mar 2020 04:39:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7E98B88650; Tue, 24 Mar 2020 17:39:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uhay2l9fkLI7; Tue, 24 Mar 2020 17:39:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B984288683; Tue, 24 Mar 2020 17:39:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 3BC731BF344 for ; Tue, 24 Mar 2020 17:39:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 32D7A88689 for ; Tue, 24 Mar 2020 17:39:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d0NjqAJLYMg2 for ; Tue, 24 Mar 2020 17:39:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by hemlock.osuosl.org (Postfix) with ESMTPS id C29B188353 for ; Tue, 24 Mar 2020 17:39:01 +0000 (UTC) Received: by mail-pl1-f175.google.com with SMTP id a23so7701276plm.1 for ; Tue, 24 Mar 2020 10:39:01 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=kIVeYKp/COPLY74sxYwoo/E4GwRZsjbStIKL/EQ3ODU=; b=Rl0UkNS9Ny93mOD6kbgiwfWETqfgjfEXIC1wbTVMtlvPlxWTH49xG7LuX9jMf7WKJL H8QiL0V3lXLBCWh/gjEOTg/SLVESSOrWmESY5MMS9gUG4GtvrjCHya9RD/L3LfPbTvP3 IKjIHJgMRMFoKm61cqvzFaEhZKuWknqZoflT96a0WCh1LHQIsWq6tbMP9HfIiEkjYMgh HsMzikgD4go/CPIRM7jToy7GeGOGRrH/3vDxwuWZV1Zf5UWpNUDNbLLFHqx792M8J6Mx iqu4vkmWCiA/yH9ZjqhIuZ02sbSdi6Cn2Mn6XgHb3HAPPEzTqfNu1rT1Yz+kHLCxykQ1 B9FA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=kIVeYKp/COPLY74sxYwoo/E4GwRZsjbStIKL/EQ3ODU=; b=cQHa0RYmfGszgjhO3CUbDd8MhXaJUzOlcMgMCWqsoDIlEubFbgvDwbkBZvcIt8t2qL SoXh/4ifupkJMwAaL4TR+2LESBj6c0vEJ0P05nskKz4UvYi6vl0T1D6Gx0bkGXLwQzkI +1Am24kW41g75EV16ifSkfGwbIQJH5SfxW/qK+4MKnOrWprscHwgeqXnREcTAYs6V+Qd ETQUH5KXKZpGiANvV5nsi2Yrp355pn0xBTSMzXS+DfVhk9uYFNBDg3FTlx+tKG6ElTlE HC0wZpCSMl1bAWDpkB4dHa0BxRCLIRBatijGV3Tt0vQptscohbR2jNQqdwIzO3StpnQW FLwA== X-Gm-Message-State: ANhLgQ1X7HwD8/1EVmIg0yBk9d6ylWMad1V8BHVFu8aMSZy+pojg/Eso lhDyT/C0TCa8//HNulpqYIQKWSzQ X-Google-Smtp-Source: ADFU+vu8BDXDrWXUayaOoJ5VfCG4mgygkW1wfMnzFycoijUznpjNXjPRVlpeK0XtpmzCnu5hVD2hKg== X-Received: by 2002:a17:90a:fc8c:: with SMTP id ci12mr6596259pjb.152.1585071541049; Tue, 24 Mar 2020 10:39:01 -0700 (PDT) Received: from localhost.localdomain ([47.149.8.172]) by smtp.gmail.com with ESMTPSA id v25sm12194425pgl.55.2020.03.24.10.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 10:39:00 -0700 (PDT) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Tue, 24 Mar 2020 10:38:54 -0700 Message-Id: <20200324173855.747054-3-aduskett@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200324173855.747054-1-aduskett@gmail.com> References: <20200324173855.747054-1-aduskett@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/3] support/testing/tests/package/sample_gst1_python.py: fix test X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Duskett , Ricardo Martincoski Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett This commit fixes the following issues: - No call to main. - using autovideosink instead of fakevideosink. Using Fakevideoskink is preferred because its primary purpose is for debugging and sample pipelines. Autovideosink does not work because there is no video output device. - No function on_message. Without this function, the script fails because of the missing function. - The script sets the pipeline to Gst.State.EOS instead of Gst.State.NULL which results in a failed pipeline state. When the state is set to NULL, gstreamer automatically calls EOS. Manually setting the pipeline state to EOS results in the following error: Trying to dispose element sink, but it is in PLAYING instead of the NULL state. You need to explicitly set elements to the NULL state before dropping the final reference, to allow them to clean up. A refcounting bug may also cause this problem in the application or some element. These issues are now properly fixed, and the sample script passes. Signed-off-by: Adam Duskett --- .../tests/package/sample_gst1_python.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/support/testing/tests/package/sample_gst1_python.py b/support/testing/tests/package/sample_gst1_python.py index 39107616ed..6ed57a168b 100644 --- a/support/testing/tests/package/sample_gst1_python.py +++ b/support/testing/tests/package/sample_gst1_python.py @@ -1,20 +1,31 @@ #!/usr/bin/env python -"""A simple test that uses gst1-python to run a fake videotestsrc for 100 frames""" +"""A simple test that uses gst1-python to run a fake videotestsrc for 100 +frames +""" import sys import gi gi.require_version('Gst', '1.0') from gi.repository import Gst, GLib # noqa: E402 +def on_message(bus: Gst.Bus, message: Gst.Message, loop: GLib.MainLoop): + if message.type == Gst.MessageType.EOS: + loop.quit() + return True + + def main(): # Initializes Gstreamer Gst.init(sys.argv) - pipeline = Gst.parse_launch("videotestsrc num-buffers=100 ! autovideosink") + pipeline = Gst.parse_launch("videotestsrc num-buffers=100 ! fakevideosink") bus = pipeline.get_bus() bus.add_signal_watch() pipeline.set_state(Gst.State.PLAYING) loop = GLib.MainLoop() bus.connect("message", on_message, loop) loop.run() - pipeline.set_state(Gst.State.EOS) - exit(0) + pipeline.set_state(Gst.State.NULL) + + +if __name__ == '__main__': + main()