summaryrefslogtreecommitdiff
path: root/media-plugins/gst-plugins-vaapi
diff options
context:
space:
mode:
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.20.3.ebuild98
2 files changed, 100 insertions, 0 deletions
diff --git a/media-plugins/gst-plugins-vaapi/Manifest b/media-plugins/gst-plugins-vaapi/Manifest
index 8ed3602d5d52..ee3a13bcf4bb 100644
--- a/media-plugins/gst-plugins-vaapi/Manifest
+++ b/media-plugins/gst-plugins-vaapi/Manifest
@@ -1,3 +1,5 @@
DIST gstreamer-vaapi-1.20.2.tar.xz 791672 BLAKE2B 05a9491322a5aeeb2b6d6a8fb004c32841a0fbea8bd12e64d6826fdde551a04db8c68360107cd5f2083760201567b61669d7a11d3229b324f059cb0118cf6684 SHA512 df5d510e910350f165b2a7bb0e433bd247608fcc719d0dc2cd72fb1f0a160a1d3c2c9006c8f6ec5d6fa454c4c15a1bb0df061cc9fd5d4e966f05a6d3f39bb491
+DIST gstreamer-vaapi-1.20.3.tar.xz 794840 BLAKE2B d422d982dba11175c57f6b6b329c75cbf96810a8653b028ce43dce8dfad0d474ae56ea7b9bde65e5901fb1453517fc1bd6541c0607d071b5b8444e78f30b355f SHA512 029e3e417c185f7aa8386aa3ce543a14bb7b1145e2386a763e109c636f32547c03cc6382fc45bbf1f5f1aab799b0250b852edbfc30dfb0992bcfd4d20b104a90
EBUILD gst-plugins-vaapi-1.20.2.ebuild 4152 BLAKE2B 529621b5fddbff7ab23451b60f45c196856dcb938011d04e630de7136e0ebc137f87d46aa09ccfaf87e269b1d33105ea993fd302cae76792a09e3a8a64cde5c3 SHA512 9df46842aa130a9a10070a348cce91c5edff5077bc9ae9f932a66f102159ebc043150425c3fbdcbd32cee8737c6c92520fab0b44f5e5ef1ea42d33f08ab10c54
+EBUILD gst-plugins-vaapi-1.20.3.ebuild 4156 BLAKE2B b0bfe46d74089168d2eefa349e048358c797a5b33c132a90b8bd53034f3bd49c0e7e0f3897c5b7cb00c1962ba526da978792ea171898330e70874a781a2fefbf SHA512 49381da69d6345d45f76ae7bf44842c72398f19c1a8d13962e4f14752ca16497be81f22f99eb29d888976c5595d7cbfe84663a750b28212d0066127d87fb5981
MISC metadata.xml 434 BLAKE2B bbc974951dbeb5b15d6c1aef4d79f0df6a9fb66ddcb370170deba060ea0c39be3d58dee5605de2c1cae8758621c548a4aff9fd26e59e6abe6aaedf7c33349cfb SHA512 64878569d6579302a606f6f9ef13cba96dcd950116653be2d1e7cdba51ae02d50b73ffb3f222ef9a009b720a425061cf3768eca8141b98dfb9513ee11cc9135b
diff --git a/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.20.3.ebuild b/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.20.3.ebuild
new file mode 100644
index 000000000000..3e6d8d3bb515
--- /dev/null
+++ b/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.20.3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit gstreamer-meson python-any-r1
+
+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 ~riscv ~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="
+ >=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.98[${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}"
+BDEPEND="${PYTHON_DEPS}"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# FIXME: "Failed to create vaapipostproc element"
+RESTRICT="test"
+
+multilib_src_configure() {
+ local emesonargs=(
+ -Dwith_encoders=yes
+ -Dwith_drm=$(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
+}