GNOME Bugzilla – Bug 119231
[0.6.3/patch] modular gst-register
Last modified: 2004-12-22 21:47:04 UTC
Gstreamer needs a generic script interface so that applications such as gst-player can register an executable that is called when plugins are installed or uninstalled by the administrator. This is needed to update the bonobo server file for gst-player correctly when plugins are installed or removed. gst-register could be just one more component, or we could use the gst-register name, and rename the executable that actually creates registries.
Couldn't we just make gst-register execute all binaries in a directory, like $PREFIX/lib/gstreamer-$GST_VERSION/gst-register after it is done updating the registry?
That's another option. I was thinking of putting the registry rebuilder code into a binary in that directory, but it doesn't matter, really. A shell script to run every file in a directory is about 5 lines. The equivalent C is a bit more complicated. That seems to be the only advantage.
Using the power of glib, running each script in a directory is about 15 lines of C. So this is done and checked in to HEAD. I'd like to backport this to 0.6, since I think it's needed for #113492.
Created attachment 19338 [details] [review] backport
How is this related to #113492? And erm, I personally don't like { .. }, can you make that a G_STMT_START/G_STMT_END or do { ... } while (0)?
doesn't this need additional changes for actual scripts to run ? or examples of what this would then bring us ?
If you put an executable in /usr/lib/gstreamer-0.6/scripts, it will be run by gst-register whenever the registry is rebuilt. This is, for example, a way that gst-player could update /usr/lib/bonobo/servers/Gst-Player-Control.server whenever plugins are installed or uninstalled on a system. Nautilus media does the same thing, but has 3 media types hard-coded.
sounds like a good idea but needs more discussion. Not sure if that is the right dir for it too. libexec sounds better. Also, Julien had crashes in this new bit of code, so I'm not putting in stable just yet.
Yeah, scripts/ is probably bad. Perhaps register_exec/? register_rc.d/?
This was checked in at some time in the past.