summaryrefslogtreecommitdiff
path: root/src/VideoSupport.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-10-29 23:24:31 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-10-29 23:24:31 +0200
commit72e3d4c55a6569d966059f762824c38d06055871 (patch)
treecc0013086494a7c97140ffdb4a0513a5f5aac245 /src/VideoSupport.vala
parentb076314018e4b53d745823754a26eb6fb73a2801 (diff)
New upstream version 0.25.0upstream/0.25.0
Diffstat (limited to 'src/VideoSupport.vala')
-rw-r--r--src/VideoSupport.vala30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/VideoSupport.vala b/src/VideoSupport.vala
index 6543cf5..791a12a 100644
--- a/src/VideoSupport.vala
+++ b/src/VideoSupport.vala
@@ -368,12 +368,12 @@ public class Video : VideoSource, Flaggable, Monitorable, Dateable {
// initialize GStreamer, but don't pass it our actual command line arguments -- we don't
// want our end users to be able to parameterize the GStreamer configuration
- string[] fake_args = new string[0];
- unowned string[] fake_unowned_args = fake_args;
- Gst.init(ref fake_unowned_args);
-
+ unowned string[] args = null;
+ Gst.init(ref args);
+
+ var registry = Gst.Registry.@get ();
int saved_state = Config.Facade.get_instance().get_video_interpreter_state_cookie();
- current_state = (int) Gst.Registry.get().get_feature_list_cookie();
+ current_state = (int) registry.get_feature_list_cookie();
if (saved_state == Config.Facade.NO_VIDEO_INTERPRETER_STATE) {
message("interpreter state cookie not found; assuming all video thumbnails are out of date");
interpreter_state_changed = true;
@@ -381,7 +381,25 @@ public class Video : VideoSource, Flaggable, Monitorable, Dateable {
message("interpreter state has changed; video thumbnails may be out of date");
interpreter_state_changed = true;
}
-
+
+ /* First do the cookie state handling, then update our local registry
+ * to not include vaapi stuff. This is basically to work-around
+ * concurrent access to VAAPI/X11 which it doesn't like, cf
+ * 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);
+ }
+
+ feature = registry.find_feature ("vaapidecode",
+ typeof (Gst.ElementFactory));
+ if (feature != null) {
+ registry.remove_feature (feature);
+ }
+
global = new VideoSourceCollection();
Gee.ArrayList<VideoRow?> all = VideoTable.get_instance().get_all();