From bc8c21fd7f45233fe6501e4e9a21b33a0c498248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 17:03:04 +0100 Subject: Make supported_types constant, change plugins' loading code so that it actually load them properly. --- src/xine-engine/load_plugins.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/xine-engine/load_plugins.c') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 7a6237b79..f641281d8 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -1022,15 +1022,16 @@ static void load_plugin_list(FILE *fp, xine_sarray_t *plugins) { vo_info->visual_type = i; } else if( !strcmp("supported_types",line) && decoder_info ) { char *s; + uint32_t *supported_types; for( s = value, i = 0; s && sscanf(s," %lu",&lu) > 0; i++ ) { s = strchr(s+1, ' '); } - decoder_info->supported_types = xine_xcalloc((i+1), sizeof(uint32_t)); - for( s = value, i = 0; s && sscanf(s," %lu",&lu) > 0; i++ ) { - decoder_info->supported_types[i] = lu; + supported_types = xine_xcalloc((i+1), sizeof(uint32_t)); + for( s = value, i = 0; s && sscanf(s," %"SCNu32,&supported_types[i]) > 0; i++ ) { s = strchr(s+1, ' '); } + decoder_info->supported_types = supported_types; } else if( !strcmp("vo_priority",line) && vo_info ) { sscanf(value," %d",&i); vo_info->priority = i; -- cgit v1.2.3 From a6a44d3e64f6b32ce53128937c8bb894fce4644d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 19:01:18 +0100 Subject: Don't create extra variables now that node is transparent to xine's build. --- src/xine-engine/load_plugins.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/xine-engine/load_plugins.c') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index f641281d8..5f0da4cff 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -1254,10 +1254,9 @@ input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mrl) { void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input) { plugin_catalog_t *catalog = stream->xine->plugin_catalog; - plugin_node_t *node = input->node; input->dispose(input); - if (node) { + if (input->node) { pthread_mutex_lock(&catalog->lock); dec_node_ref(node); pthread_mutex_unlock(&catalog->lock); @@ -1476,10 +1475,9 @@ demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const cha void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux) { plugin_catalog_t *catalog = stream->xine->plugin_catalog; - plugin_node_t *node = demux->node; demux->dispose(demux); - if (node) { + if (demux->node) { pthread_mutex_lock(&catalog->lock); dec_node_ref(node); pthread_mutex_unlock(&catalog->lock); @@ -1971,11 +1969,10 @@ video_decoder_t *_x_get_video_decoder (xine_stream_t *stream, uint8_t stream_typ void _x_free_video_decoder (xine_stream_t *stream, video_decoder_t *vd) { plugin_catalog_t *catalog = stream->xine->plugin_catalog; - plugin_node_t *node = vd->node; vd->dispose (vd); - if (node) { + if (vd->node) { pthread_mutex_lock (&catalog->lock); dec_node_ref(node); pthread_mutex_unlock (&catalog->lock); -- cgit v1.2.3 From 453657754e29a47664b4da9c146a5306e5da136b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 19:11:43 +0100 Subject: Compile fix. --- src/xine-engine/load_plugins.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/xine-engine/load_plugins.c') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 5f0da4cff..b0f0d708a 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -1258,7 +1258,7 @@ void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input) { input->dispose(input); if (input->node) { pthread_mutex_lock(&catalog->lock); - dec_node_ref(node); + dec_node_ref(input->node); pthread_mutex_unlock(&catalog->lock); } } @@ -1479,7 +1479,7 @@ void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux) { demux->dispose(demux); if (demux->node) { pthread_mutex_lock(&catalog->lock); - dec_node_ref(node); + dec_node_ref(demux->node); pthread_mutex_unlock(&catalog->lock); } } @@ -1974,7 +1974,7 @@ void _x_free_video_decoder (xine_stream_t *stream, video_decoder_t *vd) { if (vd->node) { pthread_mutex_lock (&catalog->lock); - dec_node_ref(node); + dec_node_ref(vd->node); pthread_mutex_unlock (&catalog->lock); } } -- cgit v1.2.3 From 0e5934002fd660a25d844d0f11fa7d2e53a10297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 24 Dec 2007 15:24:15 +0100 Subject: Move _x_scan_plugins and _x_dispose_plugins into an internal header, and don't export them anymore. --- src/xine-engine/load_plugins.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/xine-engine/load_plugins.c') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index b0f0d708a..eae30efe4 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -42,6 +42,8 @@ #include +#include "load_plugins.h" + #define LOG_MODULE "load_plugins" #define LOG_VERBOSE -- cgit v1.2.3 From 187be960c88a4f9839d6f5109d16f832980cee04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 2 Jan 2008 19:04:16 +0100 Subject: The id is constant, mostly. --- src/xine-engine/load_plugins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xine-engine/load_plugins.c') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index eae30efe4..b179a135d 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -1659,7 +1659,7 @@ xine_video_port_t *xine_new_framegrab_video_port (xine_t *this) { xine_video_port_t *port; vo_info_t *vo_info; plugin_catalog_t *catalog = this->plugin_catalog; - char *id; + const char *id; int list_id, list_size; driver = NULL; -- cgit v1.2.3