[shotwell] Update vaapi blacklisting
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Update vaapi blacklisting
- Date: Thu, 20 Apr 2017 18:21:38 +0000 (UTC)
commit 6fb50b78c45c1a48f048b2f8ebf708672376c4ad
Author: Jens Georg <mail jensge org>
Date: Mon Apr 17 08:03:48 2017 +0200
Update vaapi blacklisting
Signed-off-by: Jens Georg <mail jensge org>
src/VideoSupport.vala | 13 +++++--------
thumbnailer/shotwell-video-thumbnailer.vala | 16 ++++++----------
2 files changed, 11 insertions(+), 18 deletions(-)
---
diff --git a/src/VideoSupport.vala b/src/VideoSupport.vala
index 5076a31..17cb189 100644
--- a/src/VideoSupport.vala
+++ b/src/VideoSupport.vala
@@ -403,15 +403,12 @@ public class Video : VideoSource, Flaggable, Monitorable, Dateable {
* https://bugzilla.gnome.org/show_bug.cgi?id=762416
*/
- var feature = registry.find_feature ("vaapidecodebin",
- typeof (Gst.ElementFactory));
- if (feature != null) {
- registry.remove_feature (feature);
- }
+ var features = registry.feature_filter ((f) => {
+ return f.get_name ().has_prefix ("vaapi");
+ }, false);
- feature = registry.find_feature ("vaapidecode",
- typeof (Gst.ElementFactory));
- if (feature != null) {
+ foreach (var feature in features) {
+ debug ("Removing registry feature %s", feature.get_name ());
registry.remove_feature (feature);
}
diff --git a/thumbnailer/shotwell-video-thumbnailer.vala b/thumbnailer/shotwell-video-thumbnailer.vala
index 234868a..36a8203 100644
--- a/thumbnailer/shotwell-video-thumbnailer.vala
+++ b/thumbnailer/shotwell-video-thumbnailer.vala
@@ -11,7 +11,7 @@
// a replacement for totem-video-thumbnailer
class ShotwellThumbnailer {
const string caps_string = """video/x-raw,format=RGB,pixel-aspect-ratio=1/1""";
-
+
public static int main(string[] args) {
Gst.Element pipeline, sink;
string descr;
@@ -23,16 +23,12 @@ class ShotwellThumbnailer {
Gst.init(ref args);
var registry = Gst.Registry.@get ();
+ var features = registry.feature_filter ((f) => {
+ return f.get_name ().has_prefix ("vaapi");
+ }, false);
- var feature = registry.find_feature ("vaapidecodebin",
- typeof (Gst.ElementFactory));
- if (feature != null) {
- registry.remove_feature (feature);
- }
-
- feature = registry.find_feature ("vaapidecode",
- typeof (Gst.ElementFactory));
- if (feature != null) {
+ foreach (var feature in features) {
+ debug ("Removing registry feature %s", feature.get_name ());
registry.remove_feature (feature);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]