summaryrefslogtreecommitdiff
path: root/media-plugins/gst-plugins-vaapi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
commite748ba9741f6540f4675c23e3e37b73e822c13a4 (patch)
tree23dece8beabb3a3d7c6c0273b0eb40b21c62a889 /media-plugins/gst-plugins-vaapi
parent908778078736bd36f7a60a2d576d415cb8e000fa (diff)
gentoo resync : 31.05.2021
Diffstat (limited to 'media-plugins/gst-plugins-vaapi')
-rw-r--r--media-plugins/gst-plugins-vaapi/Manifest2
-rw-r--r--media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.18.4.ebuild99
2 files changed, 101 insertions, 0 deletions
diff --git a/media-plugins/gst-plugins-vaapi/Manifest b/media-plugins/gst-plugins-vaapi/Manifest
index dc2fbfb0fe31..c69675e48a6a 100644
--- a/media-plugins/gst-plugins-vaapi/Manifest
+++ b/media-plugins/gst-plugins-vaapi/Manifest
@@ -1,3 +1,5 @@
DIST gstreamer-vaapi-1.16.3.tar.xz 1103784 BLAKE2B 89b4f42a9d04f4a03f171f2d3db81a2122ae64147039053dc508bc70f346c976c42ee60455785c3d35762561fa421af13b8e04dae6bca6d64eacad4ed218a281 SHA512 043a53e9e8c5d66cf955c8bc60236846a4a51793bf467d835c0992f490f4e03f0a7c3430c95641a9c659b0f59ae2f99c48bc54985729b5703fa1ecbc062175a0
+DIST gstreamer-vaapi-1.18.4.tar.xz 783132 BLAKE2B 4ab7910dfc7dddc47dd538ed71a09f54ac217906ecfa3c93c10bfc63d5bab1825ada4c2e6076df35e1a8a4c6f20767fa8e43ea4197363a643d010a93026495a0 SHA512 355f0528929d459c8d0f009e7c8b75718ae175b648abfa1a65ed4a8b90e78a18d202b6a2fde2c5cc027a3321afc5adb90295c4f2635d68ebcedc045ac5f5664f
EBUILD gst-plugins-vaapi-1.16.3.ebuild 4337 BLAKE2B 86d772d6559f7c9c0bcee18d5f864c0fba4bc1b9dd657c6d922df72262c7a9a0561daee23cd66e6cf5622c214b90b7c316ddb5d560c71fa7ea6f094880dcc936 SHA512 2dd4465b37dc236224f37650ca22cd4b4df6cf772c862cfcc52f5979e83714035860d50ca2d3caea0a77b14b8671f57fdb68f71719ba107c4a47935f6243f498
+EBUILD gst-plugins-vaapi-1.18.4.ebuild 4138 BLAKE2B 980a50c4c480bad480a1f253348f628a1a44082ee3bb3065bf01187222972330b5dac858763a4af44249974a1ce19ef7431f221c0ed618cd85c1b23f0df227d7 SHA512 3621fc0c4e5db1fb44411c973c1f7cf566aa2ece258d581c97364f042fce17073d29203441de5fab0b897f42a9c1deac400fbd856911c175772e43ae9b753219
MISC metadata.xml 433 BLAKE2B d46828441b89363cce84ff10747ad13f30329aea96cf2acd2fc7deb786c3f3ec0ec5a86011657d39ac905f9f33a3904b38860b16f53cfb150530cc4142f1beed SHA512 366bbe78a862a65a8b82ee43521508db5766cde3a72f4ad8e7f0b703dc23347589e07dcfdb3f3ec12e62ac91adb38b2a58cee5dff4732069ac2b8724524a405b
diff --git a/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.18.4.ebuild b/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.18.4.ebuild
new file mode 100644
index 000000000000..007d3b157489
--- /dev/null
+++ b/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.18.4.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit gstreamer-meson
+
+MY_PN="gstreamer-vaapi"
+DESCRIPTION="Hardware accelerated video decoding through VA-API plugin for GStreamer"
+HOMEPAGE="https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi"
+SRC_URI="https://gstreamer.freedesktop.org/src/${MY_PN}/${MY_PN}-${PV}.tar.xz"
+
+LICENSE="LGPL-2.1+"
+SLOT="1.0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="+drm +egl gles2 +opengl wayland +X" # Keep default enabled IUSE in sync with gst-plugins-base and libva
+
+# gst-vaapi configure is based around GL platform mainly, unlike gst-plugins-bad that goes by GL API mainly; for less surprises,
+# we design gst-vaapi ebuild in terms of GL API as main choice as well, meaning that USE opengl and/or gles2 is required to
+# enable opengl support at all and choices get chained from there.
+# One or multiple video output are required: drm, x11, glx, egl and/or wayland;
+# but GL API is our main trigger, thus USE=egl should be ineffective if neither gles2 or opengl is enabled;
+# So "|| ( drm egl opengl wayland X )" would be wrong, because egl isn't built with USE="egl -opengl -gles2", ending up with no video outputs.
+# As we ensure at least one working GL output with other REQUIRED_USE, we can put gles2/opengl in REQUIRED_USE instead of egl, solving the issue.
+# gles2 API only supported windowing system (on linux) is EGL, so require it
+# opengl API only supported windowing systems (on linux) are EGL and GLX, so require one of them (glx is enabled with USE="opengl X")
+REQUIRED_USE="
+ || ( drm gles2 opengl wayland X )
+ gles2? ( egl )
+ opengl? ( || ( egl X ) )
+"
+
+# glx doesn't require libva-glx (libva[opengl]) afaics, only by tests/test-display.c
+# USE flag behavior:
+# 'drm' enables vaapi drm support
+# 'egl' enables EGL platform support (but only if also 'opengl||gles2')
+# - 'egl' is exposed as a USE flag mainly to get EGL support instead of or in addition to GLX support with desktop GL while keeping it optional for pure GLX cases;
+# it's always required with USE=gles2, thus USE="gles2 opengl X" will require and build desktop GL EGL platform support as well on top of GLX, which doesn't add extra deps at that point.
+# 'gles2' enables GLESv2 or GLESv3 based GL API support
+# 'opengl' enables desktop OpenGL based GL API support
+# 'wayland' enables non-GL Wayland support; wayland EGL support when combined with 'egl' (but only if also 'opengl||gles2')
+# 'X' enables non-GL X support; GLX support when combined with 'opengl'
+# gst-plugins-bad still needed for codecparsers (GL libraries moved to -base); checked for 1.14 (recheck for 1.16)
+GST_REQ="${PV}"
+GL_DEPS="
+ >=media-libs/gst-plugins-base-${GST_REQ}:${SLOT}[egl?,gles2?,opengl?,wayland?,X?]
+ media-libs/mesa[gles2?,egl?,X?,${MULTILIB_USEDEP}]
+"
+RDEPEND="
+ >=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-base-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}]
+ >=media-libs/gst-plugins-bad-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}]
+ >=x11-libs/libva-1.4.0:=[drm?,wayland?,X?,${MULTILIB_USEDEP}]
+ drm? (
+ >=virtual/libudev-208:=[${MULTILIB_USEDEP}]
+ >=x11-libs/libdrm-2.4.46[${MULTILIB_USEDEP}]
+ )
+ gles2? ( ${GL_DEPS} )
+ opengl? ( ${GL_DEPS} )
+ wayland? ( >=dev-libs/wayland-1.11.0[${MULTILIB_USEDEP}] )
+ X? (
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
+ x11-libs/libXrender[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.12
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# FIXME: "Failed to create vaapipostproc element"
+RESTRICT="test"
+
+multilib_src_configure() {
+ local emesonargs=(
+ -Dwith_encoders=yes
+ -Ddrm=$(usex drm yes no)
+ -Dwith_x11=$(usex X yes no)
+ -Dwith_wayland=$(usex wayland yes no)
+ )
+
+ if use opengl || use gles2; then
+ emesonargs+=( -Dwith_egl=$(usex egl yes no) )
+ else
+ emesonargs+=( -Dwith_egl=no )
+ fi
+
+ if use opengl && use X; then
+ emesonargs+=( -Dwith_glx=yes )
+ else
+ emesonargs+=( -Dwith_glx=no )
+ fi
+
+ # Workaround EGL/eglplatform.h being built with X11 present
+ use X || export CFLAGS="${CFLAGS} -DEGL_NO_X11"
+
+ gstreamer_multilib_src_configure
+}