Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] gst1-plugins-imx: add package
@ 2014-10-05 21:47 Gary Bisson
  2014-10-12 14:43 ` Luca Ceresoli
  0 siblings, 1 reply; 13+ messages in thread
From: Gary Bisson @ 2014-10-05 21:47 UTC (permalink / raw)
  To: 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 <bisson.gary@gmail.com>
---

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))
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [Buildroot] [PATCH] gst1-plugins-imx: add package
@ 2014-10-13 22:05 Peter Seiderer
  2014-10-14  7:16 ` Luca Ceresoli
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Seiderer @ 2014-10-13 22:05 UTC (permalink / raw)
  To: buildroot

Hello Gray, Luca,

On Sun, Oct 12, 2014 at 09:18:40PM -0700, Gary Bisson wrote:
> Hi Luca,
> 
> Thanks for your feedback, below are my comments.
> Sorry Peter I didn't see your patch from March.
> 

No problem...

> On 10/12/2014 07:43 AM, Luca Ceresoli wrote:
> >Dear Gary, Peter,
> [...]
> >It would be better to have only one comment showing all the dependencies
> >at once to avoid cluttering the menuconfig screen when the dependencies
> >are not met. Also, please format it according to the guidelines in
> >http://nightly.buildroot.org/manual.html#dependencies-target-toolchain-options
> >
> Ok I can rework those comments.
> >
> >BTW, the last warning should be shown regardless of the value of
> >BR2_PACKAGE_LIBFSLVPUWRAP, nope?
> The goal here was to show only one comment at a time. Both comments
> will be merged in one.
> >[...]
> >According to Gary, (e)glibc is needed. Peter, did you build-test with
> >uClibc (or musl)?

Tested only with glibc...

> Actually this dependency is not required as it is implicit, the real
> eglibc dependency comes from the GPU_VIV package.
> >
> >How about imx-lib, libfslparser and libfslcodec?
> No, Peter's dependencies seem to have some legacy from the old
> gstreamer plugin, see package/gstreamer/gst-fsl-plugins/Config.in.

Yes, you are right ;-)

> Moreover it is missing the GPU_VIV package dependency required to
> have the imxg2d and imxegl plugins and also narrows this plugin to
> iMX6 platforms only.

Yes, right too, tested only on iMX6...

> >
> >It would be great if you could have a list that really matches the
> >package. It's probably going to be a mix of the two, but I don't know
> >exactly which pieces should be picked.
> The best is to compare the dependencies from the Yocto recipe:
> https://github.com/Freescale/meta-fsl-arm/blob/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.9.9.bb
> This is what I've based my package on.
> >[...]
> >Can you merge the two statements?
> I can add the Kernel header comment but regarding the VPU I've
> offered a patch for the firmware to be selected when imx-vpu package
> is enabled:
> http://lists.busybox.net/pipermail/buildroot/2014-October/107894.html
> >[...]
> >Use the github helper macro:
> >http://nightly.buildroot.org/manual.html#github-download-url
> Ok.
> >[...]
> >Peter's version does not depend on host-python, yours does.
> >
> >Actually that dependency is needed becase waf does not work with
> >recent python3 interpreters. That's why all Buildroot packages that use
> >waf (jack2, midori, samba4) depend on it.
> Yes host-python is required.
> >[...]
> >...and you support X11 and Wayland, which is good.
> >
> >Overall your patch looks better, except Peter lists more mandatory
> >dependencies (perhaps some or all are actually neede), has a more
> >informative package description and uses the github helper. Merging
> >the two patches to get the best of each would be good, and it would be
> >great if you could cooperate to do that!
> >
> >I'm afraid I haven't much experience on i.MX to help, but I'll be glad
> >to test your work (but please keep me in Cc:).
> >
> No problem I'll keep you in cc. But what is the plan now? Should I
> offer a v2 or let Peter integrate the remarks above in his patch?

Feel free to use what you find useful from my patch...

And for the naming of the package 'gstreamer1-imx' was suggested
by Peter Korsgaard [1] and has more matching with the upstream name,
'gst1-plugins-imx' fits more with the gstreamer/buldroot plugin
naming schema...

Regards,
Peter

> 
> Thanks,
> Gary
> 

[1] http://lists.busybox.net/pipermail/buildroot/2014-February/090496.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-10-28 15:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-05 21:47 [Buildroot] [PATCH] gst1-plugins-imx: add package Gary Bisson
2014-10-12 14:43 ` Luca Ceresoli
2014-10-13  4:18   ` Gary Bisson
2014-10-13 12:06     ` Luca Ceresoli
2014-10-14 14:31       ` Arnout Vandecappelle
2014-10-14 17:16         ` Gary Bisson
2014-10-14 21:05           ` Arnout Vandecappelle
2014-10-17 21:07             ` Yann E. MORIN
2014-10-17 21:28               ` Gary Bisson
2014-10-17 21:39                 ` Yann E. MORIN
2014-10-28 15:02                   ` Luca Ceresoli
  -- strict thread matches above, loose matches on Subject: below --
2014-10-13 22:05 Peter Seiderer
2014-10-14  7:16 ` Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox