From patchwork Sun Oct 5 21:47:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 396705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 871D4140111 for ; Mon, 6 Oct 2014 08:48:02 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C327491EF6; Sun, 5 Oct 2014 21:48:01 +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 KHtMErbylSFc; Sun, 5 Oct 2014 21:47:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id BF2CE91F0F; Sun, 5 Oct 2014 21:47:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 634A01C25C3 for ; Sun, 5 Oct 2014 21:47:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5F58C91E8D for ; Sun, 5 Oct 2014 21:47:56 +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 9W+ZB5k7uRuS for ; Sun, 5 Oct 2014 21:47:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by whitealder.osuosl.org (Postfix) with ESMTPS id A349B91EB6 for ; Sun, 5 Oct 2014 21:47:52 +0000 (UTC) Received: by mail-pd0-f173.google.com with SMTP id g10so2274531pdj.32 for ; Sun, 05 Oct 2014 14:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=3G1pOv+81nOnMu7wtA1iwxNZ6Ig5ZRIB7Lg4LcjoDJA=; b=evWY28DVFvt2W5mQq/kJvEcP2bsA2YvXsGPfEy97ETlvkol/fkWy7PqB1l7GSnx7wX OAxn1jGPLSlIe/keLm2A9OC+X73W2xjzyFatnXK8eTeHguO7jQOKDfLtgdPDyS6YImpW +npa0Q0uox83FK9kL8BO5v2AklAMA2Xe0dSRXcNV7v4R8cO5z0e4F04PqI98xlv1IXjw XsdGyHFKZ+yg9f6MyRmeE/0Fmd8xMURdEkULie292LgkAcxuk234bmGSbkb0ODWFbsFY MD4CFo2UVnRHFrPZ6jT6wFGRWpH01gDThWT1k8V0UhLALns29OpoejdF+u0N3FH8m0Fe iK8g== X-Received: by 10.68.233.197 with SMTP id ty5mr21209927pbc.22.1412545672344; Sun, 05 Oct 2014 14:47:52 -0700 (PDT) Received: from n411z.WORKGROUP. (c-24-22-143-40.hsd1.wa.comcast.net. [24.22.143.40]) by mx.google.com with ESMTPSA id y11sm11545050pbv.54.2014.10.05.14.47.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Oct 2014 14:47:51 -0700 (PDT) From: Gary Bisson To: buildroot@busybox.net Date: Sun, 5 Oct 2014 14:47:08 -0700 Message-Id: <1412545628-12153-1-git-send-email-bisson.gary@gmail.com> X-Mailer: git-send-email 2.1.1 Cc: luca@lucaceresoli.net, Gary Bisson , yann.morin.1998@free.fr Subject: [Buildroot] [PATCH] gst1-plugins-imx: add package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Open-source GStreamer 1.0 plugins for i.MX platforms. More info at https://github.com/Freescale/gstreamer-imx Signed-off-by: Gary Bisson --- This patch has been tested using an i.MX6Q SabreLite (nitrogen6x config) along with the usual Tears of Steel movie in 1080p: http://media.xiph.org/mango/tears_of_steel_1080p.webm Below are the commands used to test the different sinks: $ gst-launch-1.0 playbin uri=file:///root/tears_of_steel_1080p.webm $ gst-launch-1.0 filesrc location=/root/tears_of_steel_1080p.webm ! \ matroskademux ! imxvpudec ! imxipusink $ gst-launch-1.0 filesrc location=/root/tears_of_steel_1080p.webm ! \ matroskademux ! imxvpudec ! imxeglvivsink The toolchain used was the Sourcery CodeBench 2014.05. The video above also requires the following extra configuration in order to demux the content: BR2_PACKAGE_GST1_PLUGINS_GOOD=y BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA=y I'm not fond of all the dependencies of this package but I couldn't seem to find a way to do it differently. A try has been made to select the Vivante package automatically but it requires doing a select of BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q which doesn't work. Let me know if you'd like another mechanism to be able to select this plugin. Thanks, Gary package/gstreamer1/Config.in | 1 + package/gstreamer1/gst1-plugins-imx/Config.in | 35 +++++++++++++ .../gst1-plugins-imx/gst1-plugins-imx.mk | 57 ++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 package/gstreamer1/gst1-plugins-imx/Config.in create mode 100644 package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk diff --git a/package/gstreamer1/Config.in b/package/gstreamer1/Config.in index fe0ad48..d43e4a6 100644 --- a/package/gstreamer1/Config.in +++ b/package/gstreamer1/Config.in @@ -6,6 +6,7 @@ source "package/gstreamer1/gst1-plugins-base/Config.in" source "package/gstreamer1/gst1-plugins-good/Config.in" source "package/gstreamer1/gst1-plugins-bad/Config.in" source "package/gstreamer1/gst1-plugins-ugly/Config.in" +source "package/gstreamer1/gst1-plugins-imx/Config.in" source "package/gstreamer1/gst1-libav/Config.in" source "package/gstreamer1/gst-omx/Config.in" endif diff --git a/package/gstreamer1/gst1-plugins-imx/Config.in b/package/gstreamer1/gst1-plugins-imx/Config.in new file mode 100644 index 0000000..7c8a467 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-imx/Config.in @@ -0,0 +1,35 @@ +comment "gst1-plugins-imx needs an imx-specific Linux kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +comment "gst1-plugins-imx needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC + +comment "gst1-plugins-imx requires Freescale VPU wrapper libraries" + depends on BR2_arm + depends on !BR2_PACKAGE_LIBFSLVPUWRAP + +comment "gst1-plugins-imx requires Freescale GPU libraries for i.MX6" + depends on BR2_arm + depends on BR2_PACKAGE_LIBFSLVPUWRAP + depends on !BR2_PACKAGE_GPU_VIV_BIN_MX6Q + +config BR2_PACKAGE_GST1_PLUGINS_IMX + bool "gst1-plugins-imx" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_GPU_VIV_BIN_MX6Q + depends on BR2_PACKAGE_LIBFSLVPUWRAP + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + This is a set of GStreamer 1.0 plugins for plugins for Freescale's + i.MX platform, with emphasis on video en/decoding using the i.MX + VPU engine. + + Currently, this software has been tested only with the i.MX6 SoC + family. + + The software as a whole is currently in beta stage. + + More info at https://github.com/Freescale/gstreamer-imx diff --git a/package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk b/package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk new file mode 100644 index 0000000..64a1b5b --- /dev/null +++ b/package/gstreamer1/gst1-plugins-imx/gst1-plugins-imx.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# gst1-plugins-imx +# +################################################################################ + +GST1_PLUGINS_IMX_VERSION = 0.9.9 +GST1_PLUGINS_IMX_SITE = https://github.com/Freescale/gstreamer-imx.git +GST1_PLUGINS_IMX_SITE_METHOD = git + +GST1_PLUGINS_IMX_LICENSE = LGPLv2+ +GST1_PLUGINS_IMX_LICENSE_FILES = LICENSE + +GST1_PLUGINS_IMX_INSTALL_STAGING = YES + +GST1_PLUGINS_IMX_DEPENDENCIES += host-pkgconf host-python \ + gpu-viv-bin-mx6q gstreamer1 gst1-plugins-base libfslvpuwrap + +# needs access to imx-specific kernel headers +GST1_PLUGINS_IMX_DEPENDENCIES += linux +GST1_PLUGINS_IMX_CONF_OPTS += --prefix="/usr" \ + --kernel-headers="$(LINUX_DIR)/include" + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GST1_PLUGINS_IMX_DEPENDENCIES += xlib_libX11 +GST1_PLUGINS_IMX_CONF_OPTS += --egl-platform=x11 +else +ifeq ($(BR2_PACKAGE_WAYLAND),y) +GST1_PLUGINS_IMX_DEPENDENCIES += wayland +GST1_PLUGINS_IMX_CONF_OPTS += --egl-platform=wayland +else +GST1_PLUGINS_IMX_CONF_OPTS += --egl-platform=fb +endif +endif + +define GST1_PLUGINS_IMX_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(HOST_DIR)/usr/bin/python2 ./waf configure \ + $(GST1_PLUGINS_IMX_CONF_OPTS) \ + ) +endef + +define GST1_PLUGINS_IMX_BUILD_CMDS + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS) \ + ) +endef + +define GST1_PLUGINS_IMX_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) \ + install \ + ) +endef + +$(eval $(generic-package))