diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-09-18 22:12:16 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2002-09-18 22:12:16 +0000 |
commit | da4ae9d69acec2387875db38fc1e2f286e5d4e13 (patch) | |
tree | 1bf3aca4fb5a18dd083a805033ad68f2f5b1bacd /src/xine-engine/load_plugins.c | |
parent | d1e52451687d5c6aae36f9994dd2d13d1c50a0e6 (diff) | |
download | xine-lib-da4ae9d69acec2387875db38fc1e2f286e5d4e13.tar.gz xine-lib-da4ae9d69acec2387875db38fc1e2f286e5d4e13.tar.bz2 |
make new plugin loader check api versions, fix api versions for adapted demux plugins, remove dvd plugin from build while it doesn't compile
CVS patchset: 2696
CVS date: 2002/09/18 22:12:16
Diffstat (limited to 'src/xine-engine/load_plugins.c')
-rw-r--r-- | src/xine-engine/load_plugins.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 83f96158c..115eeddbb 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.94 2002/09/18 00:51:34 guenter Exp $ + * $Id: load_plugins.c,v 1.95 2002/09/18 22:12:17 guenter Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -101,7 +101,8 @@ static char *_strclone(const char *str){ } static void _insert_plugin (xine_list_t *list, - char *filename, plugin_info_t *info){ + char *filename, plugin_info_t *info, + int api_version){ plugin_node_t *entry; vo_info_t *vo_new, *vo_old; @@ -111,6 +112,12 @@ static void _insert_plugin (xine_list_t *list, int priority = 0; int i; + if (info->API != api_version) { + printf ("load_plugins: ignoring plugin %s, wrong iface version %d (should be %d)\n", + info->id, info->API, api_version); + return; + } + entry = xine_xmalloc(sizeof(plugin_node_t)); entry->filename = _strclone(filename); entry->info = xine_xmalloc(sizeof(plugin_info_t)); @@ -240,25 +247,32 @@ static void collect_plugins(xine_t *this, char *path){ switch (info->type){ case PLUGIN_INPUT: - _insert_plugin(this->plugin_catalog->input, str, info); + _insert_plugin(this->plugin_catalog->input, str, info, + INPUT_PLUGIN_IFACE_VERSION); break; case PLUGIN_DEMUX: - _insert_plugin(this->plugin_catalog->demux, str, info); + _insert_plugin(this->plugin_catalog->demux, str, info, + DEMUXER_PLUGIN_IFACE_VERSION); break; case PLUGIN_AUDIO_DECODER: - _insert_plugin(this->plugin_catalog->audio, str, info); + _insert_plugin(this->plugin_catalog->audio, str, info, + AUDIO_DECODER_IFACE_VERSION); break; case PLUGIN_VIDEO_DECODER: - _insert_plugin(this->plugin_catalog->video, str, info); + _insert_plugin(this->plugin_catalog->video, str, info, + VIDEO_DECODER_IFACE_VERSION); break; case PLUGIN_SPU_DECODER: - _insert_plugin(this->plugin_catalog->spu, str, info); + _insert_plugin(this->plugin_catalog->spu, str, info, + SPU_DECODER_IFACE_VERSION); break; case PLUGIN_AUDIO_OUT: - _insert_plugin(this->plugin_catalog->aout, str, info); + _insert_plugin(this->plugin_catalog->aout, str, info, + AUDIO_OUT_IFACE_VERSION); break; case PLUGIN_VIDEO_OUT: - _insert_plugin(this->plugin_catalog->vout, str, info); + _insert_plugin(this->plugin_catalog->vout, str, info, + VIDEO_OUT_DRIVER_IFACE_VERSION); break; default: xine_log (this, XINE_LOG_PLUGIN, |