summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTNE2021-10-10 01:11:38 +0200
committerTNE2021-10-10 01:11:38 +0200
commit2ced369145933a1f6764d19150122fb1763405f7 (patch)
tree1db001da4a12b02a7d585401067f1d6835c48d28
downloadaur-2ced369145933a1f6764d19150122fb1763405f7.tar.gz
Initial commit
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD27
-rw-r--r--hardware-acceleration.js6
4 files changed, 49 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3b679072571
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = firefox-video-acceleration
+ pkgdesc = Enable hardware accelerated video decoding on Firefox and Firefox-based browsers
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://gitlab.com/garuda-linux/themes-and-settings/settings/firefox-video-acceleration
+ arch = any
+ license = GPL
+ depends = firefox-h264ify
+ optdepends = intel-media-driver: VA-API for modern intel GPUs
+ optdepends = libva-mesa-driver: VA-API for Nvidia (nouveau) and AMD GPUs
+ source = hardware-acceleration.js
+ md5sums = 556f7d2c12345c8011217d30c1f86fb4
+
+pkgname = firefox-video-acceleration
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..e9648f0f430
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..da9622c9bf0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: TNE <tne at garudalinux dot org>
+
+pkgname=firefox-video-acceleration
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Enable hardware accelerated video decoding on Firefox and Firefox-based browsers"
+arch=('any')
+url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"
+license=('GPL')
+depends=("firefox-h264ify")
+optdepends=('intel-media-driver: VA-API for modern intel GPUs'
+ 'libva-mesa-driver: VA-API for Nvidia (nouveau) and AMD GPUs')
+source=("hardware-acceleration.js")
+md5sums=('556f7d2c12345c8011217d30c1f86fb4')
+
+package() {
+ # Firefox
+ install -d "$pkgdir"/usr/lib/firefox/browser/{defaults/preferences,extensions}
+ install -Dm644 hardware-acceleration.js "$pkgdir"/usr/lib/firefox/browser/defaults/preferences/hardware-acceleration.js
+
+ # Preferences and h264ify
+ for b in firefox-developer-edition firedragon librewolf; do
+ install -d "$pkgdir"/usr/lib/$b/browser/{defaults/preferences,extensions}
+ ln -s /usr/lib/firefox/browser/defaults/preferences/hardware-acceleration.js "$pkgdir"/usr/lib/$b/browser/defaults/preferences/
+ ln -s /usr/lib/firefox/browser/extensions/jid1-TSgSxBhncsPBWQ@jetpack.xpi "$pkgdir"/usr/lib/$b/browser/extensions/
+ done
+}
diff --git a/hardware-acceleration.js b/hardware-acceleration.js
new file mode 100644
index 00000000000..4171e75e983
--- /dev/null
+++ b/hardware-acceleration.js
@@ -0,0 +1,6 @@
+pref('media.ffmpeg.vaapi.enabled', true);
+pref('media.ffvpx.enabled', false);
+pref('media.navigator.mediadatadecoder_vpx_enabled', true);
+pref('media.rdd-vpx.enabled', false);
+pref('gfx.x11-egl.force-enabled', true);
+pref('gfx.x11-egl.force-disabled', false);