diff mbox

[1/1] gst1-vaapi: new package

Message ID 1481813631-23515-1-git-send-email-jbb@gamblify.com
State Superseded
Headers show

Commit Message

Jesper Baekdahl Dec. 15, 2016, 2:53 p.m. UTC
Signed-off-by: Jesper Bækdahl <jbb@gamblify.com>
---
 package/gstreamer1/Config.in                  |  1 +
 package/gstreamer1/gst1-vaapi/Config.in       | 11 +++++++++++
 package/gstreamer1/gst1-vaapi/gst1-vaapi.hash |  2 ++
 package/gstreamer1/gst1-vaapi/gst1-vaapi.mk   | 14 ++++++++++++++
 4 files changed, 28 insertions(+)
 create mode 100644 package/gstreamer1/gst1-vaapi/Config.in
 create mode 100644 package/gstreamer1/gst1-vaapi/gst1-vaapi.hash
 create mode 100644 package/gstreamer1/gst1-vaapi/gst1-vaapi.mk

Comments

Thomas Petazzoni Dec. 15, 2016, 8:47 p.m. UTC | #1
Hello,

Thanks for this contribution!

On Thu, 15 Dec 2016 15:53:51 +0100, Jesper Bækdahl wrote:
> --- /dev/null
> +++ b/package/gstreamer1/gst1-vaapi/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_GST1_VAAPI
> +	bool "gst1-vaapi"
> +	select BR2_PACKAGE_GST1_PLUGINS_BASE
> +	select BR2_PACKAGE_GST1_PLUGINS_BAD

Are you sure you need those set of plugins to be built to build the
gst1-vaapi plugin? I'm not too familiar with GStreamer, so maybe this
is correct, but it looks strange.

> +	select BR2_PACKAGE_GST1_PLUGINS_LIBVA
> +	select BR2_PACKAGE_GST1_PLUGINS_LIBDRM

These two lines however are clearly wrong: those symbols don't exist in
Buildroot. And your .mk file has a dependency on libva and libdrm
instead. So these should be:

	select BR2_PACKAGE_LIBVA
	select BR2_PACKAGE_LIBDRM

However, you need to inherit the dependencies of those packages:

        depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm/libpthread-stubs
        depends on !BR2_STATIC_LIBS

Thanks,

Thomas
Peter Korsgaard Dec. 15, 2016, 9:08 p.m. UTC | #2
>>>>> "Jesper" == Jesper Bækdahl <jbb@gamblify.com> writes:

 > Signed-off-by: Jesper Bækdahl <jbb@gamblify.com>

Thanks for the patch. Besides the feedback Thomas already provided:

> +################################################################################
 > +#
 > +# gst1-vaapi
 > +#
 > +################################################################################
 > +
 > +GST1_VAAPI_VERSION = 1.10.2
 > +GST1_VAAPI_SOURCE = gstreamer-vaapi-$(GST1_VAAPI_VERSION).tar.xz
 > +GST1_VAAPI_SITE = https://gstreamer.freedesktop.org/src/gstreamer-vaapi
 > +GST1_VAAPI_DEPENDENCIES = gstreamer1 gst1-plugins-base gst1-plugins-bad libva libdrm
 > +GST1_VAAPI_LICENSE = GPLv2+
 > +GST1_VAAPI_LICENSE_FILES = COPYING

That is not correct. The tarball doesn't even have a COPYING file. It
should be:

GST1_VAAPI_LICENSE = LGPLv2.1+
GST1_VAAPI_LICENSE_FILES = COPYING.LIB
Jesper Baekdahl Dec. 16, 2016, 1:59 p.m. UTC | #3
On 15 December 2016 at 21:47, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>> --- /dev/null
>> +++ b/package/gstreamer1/gst1-vaapi/Config.in
>> @@ -0,0 +1,11 @@
>> +config BR2_PACKAGE_GST1_VAAPI
>> +     bool "gst1-vaapi"
>> +     select BR2_PACKAGE_GST1_PLUGINS_BASE
>> +     select BR2_PACKAGE_GST1_PLUGINS_BAD
>
> Are you sure you need those set of plugins to be built to build the
> gst1-vaapi plugin? I'm not too familiar with GStreamer, so maybe this
> is correct, but it looks strange.

I added them based on the requirements section found here:
https://github.com/01org/gstreamer-vaapi

>> +     select BR2_PACKAGE_GST1_PLUGINS_LIBVA
>> +     select BR2_PACKAGE_GST1_PLUGINS_LIBDRM
>
> These two lines however are clearly wrong: those symbols don't exist in
> Buildroot. And your .mk file has a dependency on libva and libdrm
> instead. So these should be:
>
>         select BR2_PACKAGE_LIBVA
>         select BR2_PACKAGE_LIBDRM

Will fix this.

> However, you need to inherit the dependencies of those packages:
>
>         depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm/libpthread-stubs
>         depends on !BR2_STATIC_LIBS

I will add those as dependencies too.


Best Regards,

Jesper Bækdahl
Hardware/Software Developer
Gamblify
Thomas Petazzoni Dec. 16, 2016, 2:44 p.m. UTC | #4
Hello,


> > Are you sure you need those set of plugins to be built to build the
> > gst1-vaapi plugin? I'm not too familiar with GStreamer, so maybe this
> > is correct, but it looks strange.  
> 
> I added them based on the requirements section found here:
> https://github.com/01org/gstreamer-vaapi

OK. The configure.ac script indeed checks for plugins-base, but not for
plugins-bad.

Could you have a look at the configure.ac script? It seems like it
supports multiple renderers, not only DRM. If you don't want to support
all of them because you don't use them, that's fine. But you should
then use the appropriate --enable/--disable options to enable the right
renderer, and disable the other ones.

Thanks!

Thomas
Jesper Baekdahl Jan. 3, 2017, 9:56 a.m. UTC | #5
> OK. The configure.ac script indeed checks for plugins-base, but not for
> plugins-bad.

In configure.ac line 245 we have:
AG_GST_CHECK_MODULES([GST_CODEC_PARSERS],
  [gstreamer-codecparsers-$GST_API_VERSION], [$GST_PBADREQ], [yes])

which is checking for gstreamer-codecparsers that is part of plugins-bad?

> Could you have a look at the configure.ac script? It seems like it
> supports multiple renderers, not only DRM. If you don't want to support
> all of them because you don't use them, that's fine. But you should
> then use the appropriate --enable/--disable options to enable the right
> renderer, and disable the other ones.

I can add conditional CONF_OPTS that adds --enable/--disable based on
which renderers can be built e.g.:
ifeq ($(BR2_PACKAGE_LIBDRM),y)
GST1_VAAPI_CONF_OPTS += --enable-drm
else
GST1_VAAPI_CONF_OPTS += --disable-drm
endif


Best Regards,

Jesper Bækdahl
Hardware/Software Developer
Gamblify
Thomas Petazzoni Jan. 3, 2017, 12:37 p.m. UTC | #6
Hello,

On Tue, 3 Jan 2017 10:56:45 +0100, Jesper Bækdahl wrote:
> > OK. The configure.ac script indeed checks for plugins-base, but not for
> > plugins-bad.  
> 
> In configure.ac line 245 we have:
> AG_GST_CHECK_MODULES([GST_CODEC_PARSERS],
>   [gstreamer-codecparsers-$GST_API_VERSION], [$GST_PBADREQ], [yes])
> 
> which is checking for gstreamer-codecparsers that is part of plugins-bad?

Hum, ok. I haven't checked myself, but if you say so, fine :-)

> > Could you have a look at the configure.ac script? It seems like it
> > supports multiple renderers, not only DRM. If you don't want to support
> > all of them because you don't use them, that's fine. But you should
> > then use the appropriate --enable/--disable options to enable the right
> > renderer, and disable the other ones.  
> 
> I can add conditional CONF_OPTS that adds --enable/--disable based on
> which renderers can be built e.g.:
> ifeq ($(BR2_PACKAGE_LIBDRM),y)
> GST1_VAAPI_CONF_OPTS += --enable-drm
> else
> GST1_VAAPI_CONF_OPTS += --disable-drm
> endif

You can do that, *or* if you don't need those renderers, simply disable
them unconditionally for now. The next user interested in one renderer
or the other can tweak the .mk file and send a follow-up patch.

Thanks!

Thomas
Thomas Petazzoni March 12, 2017, 8:53 p.m. UTC | #7
Hello,

On Thu, 15 Dec 2016 15:53:51 +0100, Jesper Bækdahl wrote:
> Signed-off-by: Jesper Bækdahl <jbb@gamblify.com>

I have applied a similar patch from Adam Duskett:

  https://git.buildroot.org/buildroot/commit/?id=c1e4e8545dad4d587c6739d7f9942c5e21e7490d
  https://git.buildroot.org/buildroot/commit/?id=d5c7f009875683a2c310478f846ddeb12d862d0c

Best regards,

Thomas
diff mbox

Patch

diff --git a/package/gstreamer1/Config.in b/package/gstreamer1/Config.in
index 23862bd..0297851 100644
--- a/package/gstreamer1/Config.in
+++ b/package/gstreamer1/Config.in
@@ -9,6 +9,7 @@  source "package/gstreamer1/gst1-plugins-ugly/Config.in"
 source "package/gstreamer1/gst1-imx/Config.in"
 source "package/gstreamer1/gst1-libav/Config.in"
 source "package/gstreamer1/gst1-rtsp-server/Config.in"
+source "package/gstreamer1/gst1-vaapi/Config.in"
 source "package/gstreamer1/gst1-validate/Config.in"
 source "package/gstreamer1/gst-omx/Config.in"
 endif
diff --git a/package/gstreamer1/gst1-vaapi/Config.in b/package/gstreamer1/gst1-vaapi/Config.in
new file mode 100644
index 0000000..56d63f4
--- /dev/null
+++ b/package/gstreamer1/gst1-vaapi/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_GST1_VAAPI
+	bool "gst1-vaapi"
+	select BR2_PACKAGE_GST1_PLUGINS_BASE
+	select BR2_PACKAGE_GST1_PLUGINS_BAD
+	select BR2_PACKAGE_GST1_PLUGINS_LIBVA
+	select BR2_PACKAGE_GST1_PLUGINS_LIBDRM
+	help
+	  gstreamer-vaapi consists in a collection of VA-API based plugins for
+	  GStreamer and helper libraries.
+
+	  http://gstreamer.freedesktop.org/
diff --git a/package/gstreamer1/gst1-vaapi/gst1-vaapi.hash b/package/gstreamer1/gst1-vaapi/gst1-vaapi.hash
new file mode 100644
index 0000000..21032ca
--- /dev/null
+++ b/package/gstreamer1/gst1-vaapi/gst1-vaapi.hash
@@ -0,0 +1,2 @@ 
+# From https://gstreamer.freedesktop.org/src/gstreamer-vaapi/gstreamer-vaapi-1.10.2.tar.xz.sha256sum
+sha256 9e31d2b85b2f30caa6b0cc1c6be10b96e1376668f13faa6a0f577d3693547fa9  gstreamer-vaapi-1.10.2.tar.xz
diff --git a/package/gstreamer1/gst1-vaapi/gst1-vaapi.mk b/package/gstreamer1/gst1-vaapi/gst1-vaapi.mk
new file mode 100644
index 0000000..d66018d
--- /dev/null
+++ b/package/gstreamer1/gst1-vaapi/gst1-vaapi.mk
@@ -0,0 +1,14 @@ 
+################################################################################
+#
+# gst1-vaapi
+#
+################################################################################
+
+GST1_VAAPI_VERSION = 1.10.2
+GST1_VAAPI_SOURCE = gstreamer-vaapi-$(GST1_VAAPI_VERSION).tar.xz
+GST1_VAAPI_SITE = https://gstreamer.freedesktop.org/src/gstreamer-vaapi
+GST1_VAAPI_DEPENDENCIES = gstreamer1 gst1-plugins-base gst1-plugins-bad libva libdrm
+GST1_VAAPI_LICENSE = GPLv2+
+GST1_VAAPI_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))