[pitivi] Disable vaapi plugin unless explicitely enabled
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Disable vaapi plugin unless explicitely enabled
- Date: Tue, 15 Aug 2017 15:11:36 +0000 (UTC)
commit d416e94e25d9e1be254018ea67e06a03fa9a8b05
Author: Thibault Saunier <tsaunier gnome org>
Date: Mon Aug 14 21:51:16 2017 -0300
Disable vaapi plugin unless explicitely enabled
And install gstreamer-vaapi in the sandbox
Reviewed-by: Alex Băluț <<alexandru balut gmail com>>
Differential Revision: https://phabricator.freedesktop.org/D1839
build/flatpak/pitivi.template.json | 12 ++++++++++++
docs/Install_with_flatpak.md | 8 ++++++++
pitivi/check.py | 15 +++++++++++++++
3 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/build/flatpak/pitivi.template.json b/build/flatpak/pitivi.template.json
index 60e9b5e..d7b3c0f 100644
--- a/build/flatpak/pitivi.template.json
+++ b/build/flatpak/pitivi.template.json
@@ -404,6 +404,18 @@
]
},
{
+ "name": "gstreamer-vaapi",
+ "buildsystem": "meson",
+ "builddir": true,
+ "config-opts": ["-Ddisable_gtkdoc=true", "--libdir=lib"],
+ "sources": [
+ {
+ "type": "git",
+ "url": "git://anongit.freedesktop.org/gstreamer/gstreamer-vaapi"
+ }
+ ]
+ },
+ {
"name": "gst-editing-services",
"buildsystem": "meson",
"builddir": true,
diff --git a/docs/Install_with_flatpak.md b/docs/Install_with_flatpak.md
index 7539557..7c2a045 100644
--- a/docs/Install_with_flatpak.md
+++ b/docs/Install_with_flatpak.md
@@ -79,3 +79,11 @@ If a new version is fetched, it will be made current.
If your software manager doesn't allow this yet, run the command below:
` $ flatpak --user uninstall org.pitivi.Pitivi stable`
+
+## Install GStreamer vaapi support
+
+In the sandbox gstreamer-vaapi is installed but it requires the
+org.freedesktop.Platform.VAAPI.Intel extension to be installed.
+
+As the support is experimental, you need to set PITIVI_UNSTABLE_FEATURES
+to enable them: `flatpak run --env=PITIVI_UNSTABLE_FEATURES=vaapi org.pitivi.Pitivi`.
diff --git a/pitivi/check.py b/pitivi/check.py
index 4e5a00e..e5c9b72 100644
--- a/pitivi/check.py
+++ b/pitivi/check.py
@@ -238,6 +238,19 @@ def _check_videosink():
return videosink_factory
+def _check_vaapi():
+ from gi.repository import Gst
+ if "vaapi" in os.environ.get("PITIVI_UNSTABLE_FEATURES", ""):
+ print("Vaapi decoders enabled.")
+ return
+
+ for feature in Gst.Registry.get().get_feature_list_by_plugin("vaapi"):
+ if isinstance(feature, Gst.ElementFactory):
+ klass = feature.get_klass()
+ if "Decoder" in klass and "Video" in klass:
+ feature.set_rank(Gst.Rank.MARGINAL)
+
+
def _check_gst_python():
from gi.repository import Gst
try:
@@ -295,6 +308,8 @@ def check_requirements():
"Make sure you have a gtksink available."))
return False
+ _check_vaapi()
+
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]