[pitivi] check: Disable hardware decoders
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] check: Disable hardware decoders
- Date: Thu, 15 Aug 2019 21:16:42 +0000 (UTC)
commit d6201eead463971cc3a8c0ecaa80cfc8e10bae47
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Thu Aug 15 16:39:13 2019 +0200
check: Disable hardware decoders
There were problems with vaapi. They should be reenabled when we focus
on them to fix the issues.
See #2340
pitivi/check.py | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/check.py b/pitivi/check.py
index f45e2471..15f2148d 100644
--- a/pitivi/check.py
+++ b/pitivi/check.py
@@ -255,17 +255,15 @@ 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.")
+def _check_hardware_decoders():
+ if "hwdecoders" in os.environ.get("PITIVI_UNSTABLE_FEATURES", ""):
+ print("Hardware 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)
+ from gi.repository import Gst
+ for e in Gst.ElementFactory.list_get_elements(Gst.ELEMENT_FACTORY_TYPE_DECODER, Gst.Rank.NONE):
+ if "Hardware" in e.get_metadata("klass"):
+ e.set_rank(Gst.Rank.NONE)
def _check_gst_python():
@@ -325,7 +323,7 @@ def check_requirements():
"Make sure you have a gtksink available."))
return False
- _check_vaapi()
+ _check_hardware_decoders()
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]