GNOME Bugzilla – Bug 670972
Bindings issue with missing plugin/pbutils?
Last modified: 2012-02-28 13:28:51 UTC
If I call this from python: missing=GstPbutils.missing_plugin_message_get_installer_detail(message) I get a string back, however the plugins async API demands a list object GstPbutils.install_plugins_async (missing, context, self.donemessage, None) It is not a problem for me to add the outcome of the first to a list, but looking at the API docs it seems strange that I have to.
This is not really 0.11-specific, is it? But has always been like that. It's on purpose really. If you are missing multiple plugins (and if you have e.g. qtdemux/matroskademux/avidemux/flvdemux, but no mpeg decoders, you usually are missing multiple ones), the installer should do all of them in one go. You don't want to pop-up a dialog for each and every missing element. And if you're really only missing one, it's easy enough to create an array/a list. The original use case was that a media playback application would collect missing-plugin messages from the bus, and convert those one-by-one into installer details. I don't think it's worth adding new API for the single-element use case.
Yeah, I guess my only nitpick is that it would be nice if the API docs for calls like GstPbutils.missing_plugin_message_get_installer_detail states that the string output needs to be put into a list before feeding it install_plugins_async (that said on a second look I did see that the docs for install_plugins_async do say it, so maybe that is enough).
Dunno, it seems obvious from a C programmer's perspective and from the C docs. Maybe you want python magic that transforms a string into a string array with one element if that's what's required. Something for the bindings people imho.