Commit d416e94e authored by Thibault Saunier's avatar Thibault Saunier

Disable vaapi plugin unless explicitely enabled

And install gstreamer-vaapi in the sandbox
Reviewed-by: default avatarAlex Băluț <&lt;alexandru.balut@gmail.com&gt;>
Differential Revision: https://phabricator.freedesktop.org/D1839
parent ce3e2f3c
......@@ -403,6 +403,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",
......
......@@ -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`.
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment