1 |
commit: 9b9b34016e9622f6c1561c35f08087cdb47500c9 |
2 |
Author: Igor V. Kovalenko <igor.v.kovalenko <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Aug 26 13:00:18 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 26 13:10:04 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b9b3401 |
7 |
|
8 |
media-plugins/gst-plugins-vaapi: add 1.20.3 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko <AT> gmail.com> |
12 |
|
13 |
media-plugins/gst-plugins-vaapi/Manifest | 1 + |
14 |
.../gst-plugins-vaapi-1.20.3.ebuild | 98 ++++++++++++++++++++++ |
15 |
2 files changed, 99 insertions(+) |
16 |
|
17 |
diff --git a/media-plugins/gst-plugins-vaapi/Manifest b/media-plugins/gst-plugins-vaapi/Manifest |
18 |
index 39600372bbb9..6763297807c1 100644 |
19 |
--- a/media-plugins/gst-plugins-vaapi/Manifest |
20 |
+++ b/media-plugins/gst-plugins-vaapi/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST gstreamer-vaapi-1.20.2.tar.xz 791672 BLAKE2B 05a9491322a5aeeb2b6d6a8fb004c32841a0fbea8bd12e64d6826fdde551a04db8c68360107cd5f2083760201567b61669d7a11d3229b324f059cb0118cf6684 SHA512 df5d510e910350f165b2a7bb0e433bd247608fcc719d0dc2cd72fb1f0a160a1d3c2c9006c8f6ec5d6fa454c4c15a1bb0df061cc9fd5d4e966f05a6d3f39bb491 |
23 |
+DIST gstreamer-vaapi-1.20.3.tar.xz 794840 BLAKE2B d422d982dba11175c57f6b6b329c75cbf96810a8653b028ce43dce8dfad0d474ae56ea7b9bde65e5901fb1453517fc1bd6541c0607d071b5b8444e78f30b355f SHA512 029e3e417c185f7aa8386aa3ce543a14bb7b1145e2386a763e109c636f32547c03cc6382fc45bbf1f5f1aab799b0250b852edbfc30dfb0992bcfd4d20b104a90 |
24 |
|
25 |
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 |
26 |
new file mode 100644 |
27 |
index 000000000000..3e6d8d3bb515 |
28 |
--- /dev/null |
29 |
+++ b/media-plugins/gst-plugins-vaapi/gst-plugins-vaapi-1.20.3.ebuild |
30 |
@@ -0,0 +1,98 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+PYTHON_COMPAT=( python3_{8..10} ) |
36 |
+ |
37 |
+inherit gstreamer-meson python-any-r1 |
38 |
+ |
39 |
+MY_PN="gstreamer-vaapi" |
40 |
+DESCRIPTION="Hardware accelerated video decoding through VA-API plugin for GStreamer" |
41 |
+HOMEPAGE="https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi" |
42 |
+SRC_URI="https://gstreamer.freedesktop.org/src/${MY_PN}/${MY_PN}-${PV}.tar.xz" |
43 |
+ |
44 |
+LICENSE="LGPL-2.1+" |
45 |
+SLOT="1.0" |
46 |
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" |
47 |
+IUSE="+drm +egl gles2 +opengl wayland +X" # Keep default enabled IUSE in sync with gst-plugins-base and libva |
48 |
+ |
49 |
+# gst-vaapi configure is based around GL platform mainly, unlike gst-plugins-bad that goes by GL API mainly; for less surprises, |
50 |
+# 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 |
51 |
+# enable opengl support at all and choices get chained from there. |
52 |
+# One or multiple video output are required: drm, x11, glx, egl and/or wayland; |
53 |
+# but GL API is our main trigger, thus USE=egl should be ineffective if neither gles2 or opengl is enabled; |
54 |
+# 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. |
55 |
+# 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. |
56 |
+# gles2 API only supported windowing system (on linux) is EGL, so require it |
57 |
+# opengl API only supported windowing systems (on linux) are EGL and GLX, so require one of them (glx is enabled with USE="opengl X") |
58 |
+REQUIRED_USE=" |
59 |
+ || ( drm gles2 opengl wayland X ) |
60 |
+ gles2? ( egl ) |
61 |
+ opengl? ( || ( egl X ) ) |
62 |
+" |
63 |
+ |
64 |
+# glx doesn't require libva-glx (libva[opengl]) afaics, only by tests/test-display.c |
65 |
+# USE flag behavior: |
66 |
+# 'drm' enables vaapi drm support |
67 |
+# 'egl' enables EGL platform support (but only if also 'opengl||gles2') |
68 |
+# - '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; |
69 |
+# 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. |
70 |
+# 'gles2' enables GLESv2 or GLESv3 based GL API support |
71 |
+# 'opengl' enables desktop OpenGL based GL API support |
72 |
+# 'wayland' enables non-GL Wayland support; wayland EGL support when combined with 'egl' (but only if also 'opengl||gles2') |
73 |
+# 'X' enables non-GL X support; GLX support when combined with 'opengl' |
74 |
+# gst-plugins-bad still needed for codecparsers (GL libraries moved to -base); checked for 1.14 (recheck for 1.16) |
75 |
+GST_REQ="${PV}" |
76 |
+GL_DEPS=" |
77 |
+ >=media-libs/gst-plugins-base-${GST_REQ}:${SLOT}[egl?,gles2?,opengl?,wayland?,X?] |
78 |
+ media-libs/mesa[gles2?,egl(+)?,X?,${MULTILIB_USEDEP}] |
79 |
+" |
80 |
+RDEPEND=" |
81 |
+ >=media-libs/gst-plugins-base-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}] |
82 |
+ >=media-libs/gst-plugins-bad-${GST_REQ}:${SLOT}[${MULTILIB_USEDEP}] |
83 |
+ >=x11-libs/libva-1.4.0:=[drm(+)?,wayland?,X?,${MULTILIB_USEDEP}] |
84 |
+ drm? ( |
85 |
+ >=virtual/libudev-208:=[${MULTILIB_USEDEP}] |
86 |
+ >=x11-libs/libdrm-2.4.98[${MULTILIB_USEDEP}] |
87 |
+ ) |
88 |
+ gles2? ( ${GL_DEPS} ) |
89 |
+ opengl? ( ${GL_DEPS} ) |
90 |
+ wayland? ( >=dev-libs/wayland-1.11.0[${MULTILIB_USEDEP}] ) |
91 |
+ X? ( |
92 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
93 |
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}] |
94 |
+ x11-libs/libXrender[${MULTILIB_USEDEP}] ) |
95 |
+" |
96 |
+DEPEND="${RDEPEND}" |
97 |
+BDEPEND="${PYTHON_DEPS}" |
98 |
+ |
99 |
+S="${WORKDIR}/${MY_PN}-${PV}" |
100 |
+ |
101 |
+# FIXME: "Failed to create vaapipostproc element" |
102 |
+RESTRICT="test" |
103 |
+ |
104 |
+multilib_src_configure() { |
105 |
+ local emesonargs=( |
106 |
+ -Dwith_encoders=yes |
107 |
+ -Dwith_drm=$(usex drm yes no) |
108 |
+ -Dwith_x11=$(usex X yes no) |
109 |
+ -Dwith_wayland=$(usex wayland yes no) |
110 |
+ ) |
111 |
+ |
112 |
+ if use opengl || use gles2; then |
113 |
+ emesonargs+=( -Dwith_egl=$(usex egl yes no) ) |
114 |
+ else |
115 |
+ emesonargs+=( -Dwith_egl=no ) |
116 |
+ fi |
117 |
+ |
118 |
+ if use opengl && use X; then |
119 |
+ emesonargs+=( -Dwith_glx=yes ) |
120 |
+ else |
121 |
+ emesonargs+=( -Dwith_glx=no ) |
122 |
+ fi |
123 |
+ |
124 |
+ # Workaround EGL/eglplatform.h being built with X11 present |
125 |
+ use X || export CFLAGS="${CFLAGS} -DEGL_NO_X11" |
126 |
+ |
127 |
+ gstreamer_multilib_src_configure |
128 |
+} |