[gst-devel] Plugin versioning.

Richard Boulton richard at tartarus.org
Fri Apr 20 23:51:35 CEST 2001


I just cvs updated, recompiled, and ran gstreamer-register, which loaded
choked on an out-of-date plugin and core dumped.  We need some kind of
scheme to prevent this happening: I propose that the simplest would be to
add a second parameter to the plugin_init() prototype, which would be a
version number for the plugin interface, and would be incremented only when
a binary incompatible change was made to the core API.  The plugin would
then be responsible for checking this parameter in plugin_init(), and
failing if its a version number that it cannot cope with (or knows nothing
about).  This would also allow a plugin to cope with several different
version numbers.

There are probably reasons that this is too simplistic a scheme, or simpler
ways of doing this (libtool version numbers, perhaps, but it would be the
libtool version number of the core library which would be relevant, I
think, so if this can easily be found perhaps this is the number which
should be passed by plugin_init()).

I can try and put together a patch if this is the right way to go.

FYI, the output generated was:

INFO(6962:-1): setting INFO categories to 0x00020001
INFO(6962:-1): Initializing GStreamer Core Library
INFO(6962:-1): CPU features: (0c040882) MMX SSE 
INFO(6962:-1):gst_plugin_load_all:233: loading plugins from /usr/data/richard/Working/gstreamer/gstreamer/./gst/autoplug
... <many similar lines skipped>
INFO(6962:-1):gst_plugin_load_absolute:368: loading plugin "/usr/data/richard/Working/gstreamer/gstreamer/./plugins/videoscale/.libs/libvideoscale.so"...
INFO(6962:-1):gst_plugin_load_absolute:371: plugin "videoscale" loaded: 1 elements, 0 types
INFO(6962:-1):gst_plugin_load_absolute:368: loading plugin "/usr/data/richard/Working/gstreamer/gstreamer/./plugins/videosink/.libs/libvideosink.so"...

Stack trace of core dump is:
(gdb) bt
#0  gst_caps_append (caps=0x405e9276, capstoadd=0x4004ade0) at gstcaps.c:416
#1  0x4002d51d in gst_padtemplate_new (name_template=0x405efe3c "KË^@\002", 
    direction=53013, presence=1079967268, caps=0x405e9276) at gstpad.c:1490
#2  0x405e9385 in plugin_init (module=0x8086f78) at videosink.c:656
#3  0x4002f5dd in gst_plugin_load_absolute (
    name=0x806a598 "/usr/data/richard/Working/gstreamer/gstreamer/./plugins/videosink/.libs/libvideosink.so") at gstplugin.c:369
#4  0x4002f1e4 in gst_plugin_load_recurse (
    directory=0x806a598 "/usr/data/richard/Working/gstreamer/gstreamer/./plugins/videosink/.libs/libvideosink.so", name=0x0) at gstplugin.c:214
#5  0x4002f100 in gst_plugin_load_recurse (
    directory=0x80719a8 "/usr/data/richard/Working/gstreamer/gstreamer/./plugins/videosink/.libs", name=0x0) at gstplugin.c:195
#6  0x4002f100 in gst_plugin_load_recurse (
    directory=0x806c538 "/usr/data/richard/Working/gstreamer/gstreamer/./plugins/videosink", name=0x0) at gstplugin.c:195
#7  0x4002f100 in gst_plugin_load_recurse (
    directory=0x40043260 "/usr/data/richard/Working/gstreamer/gstreamer/./plugins", name=0x0) at gstplugin.c:195
#8  0x4002f26f in gst_plugin_load_all () at gstplugin.c:234
#9  0x4002ee22 in _gst_plugin_initialize () at gstplugin.c:98
#10 0x4001c28c in gst_init (argc=0xbffff504, argv=0xbffff508) at gst.c:76
#11 0x8048db5 in main (argc=1, argv=0xbffff564) at gstreamer-register.c:200

-- 
Richard




More information about the gstreamer-devel mailing list