summaryrefslogtreecommitdiff
path: root/thumbnailer/shotwell-video-thumbnailer.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:43:08 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:43:08 +0200
commit2b3f22361da0c1d8e6ce70d71352821758186db7 (patch)
tree5d10633b47369b3aa52a05bf889ede0dbe5ee108 /thumbnailer/shotwell-video-thumbnailer.vala
parent211da5fc3048ca2b6ccee2166b0aaaade55cb84f (diff)
parentdc6c76eb04dfe3d4262a1806808f0bc0bf523238 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'thumbnailer/shotwell-video-thumbnailer.vala')
-rw-r--r--thumbnailer/shotwell-video-thumbnailer.vala22
1 files changed, 11 insertions, 11 deletions
diff --git a/thumbnailer/shotwell-video-thumbnailer.vala b/thumbnailer/shotwell-video-thumbnailer.vala
index 234868a..2b381a6 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;
@@ -19,20 +19,20 @@ class ShotwellThumbnailer {
uint8[]? pngdata;
int64 duration, position;
Gst.StateChangeReturn ret;
-
+
+ if (Posix.nice (19) < 0) {
+ debug ("Failed to reduce thumbnailer nice level. Continuing anyway");
+ }
+
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);
}