GNOME Bugzilla – Bug 584209
Elementgen doesn't handle missing plugins
Last modified: 2009-09-11 08:50:28 UTC
Please describe the problem: Some of the GStreamer elements are missing on Windows, like xvimagesink, fdsink and fdsrc. If an element can't be found the build should just continue, but without generating the bindings for that plugin. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information: The solution is twofold. gst-xmlinspect gives an error if the plugin is not found, which interrupts the build process. So even if the plugin is not found, exit with 0. The inspect/plugin.raw files for missing plugins are empty, which causes XML error for element-gen. The error message should go to stderr, so that it doesn't end up in the generated .cs file.
Created attachment 135559 [details] [review] proposed patch
Yes, gst-xmlinspect should only be called when calling make plugins-update. I'll fix this later, thanks. Also the element bindings should return null / throw an exception if the native element couldn't be instantiated.
To fix the first part we simple need to fixup the dependencies in *plugins/Makefile.am, that should be simple. The raw files are expected to be shipped in tarballs, etc.
commit 91945e2131a2e1df3d033f8000a1d5700acf8683 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Fri May 29 22:05:34 2009 +0200 Remove gst-xmlinspect from the dependencies of the raw inspection files This should fix bug #584209. Can you confirm?
Yes, now the .raw files from git are used. So the problem is solved make plugins-update doesn't update the .raw files though, the .raw have to be deleted manually first. But may be this isn't much of a problem as you are the only one supposed to update them, right? By the way, even if I don't need to execute gsts-xmlinspect.exe, I still think my proposed changes are sane, especially the usage of Console.Error.WriteLine().
Right, I'll merge them and fix make plugins-update too :) I'll commit that later today...
commit 2ed4e4dd98b17ca2ca76e9e8499a27872013f700 Author: Maarten Bosmans <mkbosmans@gmail.com> Date: Sat May 30 13:42:05 2009 +0200 Write error messages to stderr and fix a compiler warning Fixes bug #584209. commit 8a0f18ca70be53472534b7d6baf30e3d899cfa5d Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sat May 30 13:49:04 2009 +0200 Make sure that make plugins-update always regenerates the element API XML fi Fixes bug #584209.