diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-11-30 21:37:30 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-11-30 21:37:30 +0000 |
commit | 140ffc62a23b22f84656ae768cfe719658aedbc2 (patch) | |
tree | 59a2e2ac37121ba9c8b11254f1671432e900db94 /src/xine-engine/load_plugins.c | |
parent | 5f4681b57dd227a2d2a2dd9050fb6103daa6fabd (diff) | |
download | xine-lib-140ffc62a23b22f84656ae768cfe719658aedbc2.tar.gz xine-lib-140ffc62a23b22f84656ae768cfe719658aedbc2.tar.bz2 |
Trim trailing space & reduce space+tab.
Diffstat (limited to 'src/xine-engine/load_plugins.c')
-rw-r--r-- | src/xine-engine/load_plugins.c | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 3f563dd62..3fdd65d93 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -109,7 +109,7 @@ static const int plugin_iface_versions[] = { SPU_DECODER_IFACE_VERSION, AUDIO_OUT_IFACE_VERSION, VIDEO_OUT_DRIVER_IFACE_VERSION, - POST_PLUGIN_IFACE_VERSION + POST_PLUGIN_IFACE_VERSION }; static void _build_list_typed_plugins(plugin_catalog_t **catalog, xine_sarray_t *type) { @@ -120,7 +120,7 @@ static void _build_list_typed_plugins(plugin_catalog_t **catalog, xine_sarray_t list_size = xine_sarray_size (type); for (list_id = 0, i = 0; list_id < list_size; list_id++) { node = xine_sarray_get(type, list_id); - + /* add only unique ids to the list */ for ( j = 0; j < i; j++ ) { if( !strcmp((*catalog)->ids[j], node->info->id) ) @@ -165,9 +165,9 @@ static int get_decoder_priority(xine_t *this, plugin_node_t *node) { char key[80]; snprintf(key, sizeof(key), "engine.decoder_priorities.%s", node->info->id); - + entry = this->config->lookup_entry(this->config, key); - + if (entry && entry->num_value) /* user given priorities should definitely override defaults, so multiply them */ return entry->num_value * 100; @@ -266,14 +266,14 @@ static plugin_node_t *_get_cached_node (xine_t *this, node->file->filesize == filesize && node->file->filemtime == filemtime && !strcmp( node->file->filename, filename )) { - + return node; } - + /* skip previously returned items */ if( node == previous_node ) previous_node = NULL; - + } return NULL; } @@ -327,7 +327,7 @@ static void _insert_node (xine_t *this, _x_assert(list); _x_assert(info); if (info->API != api_version) { - xprintf(this, XINE_VERBOSITY_LOG, + xprintf(this, XINE_VERBOSITY_LOG, _("load_plugins: ignoring plugin %s, wrong iface version %d (should be %d)\n"), info->id, info->API, api_version); return; @@ -385,7 +385,7 @@ static void _insert_node (xine_t *this, decoder_new->supported_types = types; } entry->priority = decoder_new->priority = decoder_old->priority; - + snprintf(key, sizeof(key), "engine.decoder_priorities.%s", info->id); for (i = 0; catalog->prio_desc[i]; i++); asprintf(&catalog->prio_desc[i], _("priority for %s decoder"), info->id); @@ -404,23 +404,23 @@ static void _insert_node (xine_t *this, entry->info->special_info = decoder_new; break; - + case PLUGIN_POST: post_old = info->special_info; post_new = calloc(1, sizeof(post_info_t)); post_new->type = post_old->type; entry->info->special_info = post_new; break; - + case PLUGIN_DEMUX: demux_old = info->special_info; demux_new = calloc(1, sizeof(demuxer_info_t)); - + if (demux_old) { entry->priority = demux_new->priority = demux_old->priority; lprintf("demux: %s, priority: %d\n", info->id, entry->priority); } else { - xprintf(this, XINE_VERBOSITY_LOG, + xprintf(this, XINE_VERBOSITY_LOG, _("load_plugins: demuxer plugin %s does not provide a priority," " xine-lib will use the default priority.\n"), info->id); @@ -432,12 +432,12 @@ static void _insert_node (xine_t *this, case PLUGIN_INPUT: input_old = info->special_info; input_new = calloc(1, sizeof(input_info_t)); - + if (input_old) { entry->priority = input_new->priority = input_old->priority; lprintf("input: %s, priority: %d\n", info->id, entry->priority); } else { - xprintf(this, XINE_VERBOSITY_LOG, + xprintf(this, XINE_VERBOSITY_LOG, _("load_plugins: input plugin %s does not provide a priority," " xine-lib will use the default priority.\n"), info->id); @@ -499,7 +499,7 @@ static void _register_plugins_internal(xine_t *this, plugin_file_t *file, else xine_log (this, XINE_LOG_PLUGIN, _("load_plugins: static plugin found\n")); - + if (this->plugin_catalog->plugin_count >= PLUGIN_MAX || (this->plugin_catalog->decoder_count >= DECODER_MAX && info->type >= PLUGIN_AUDIO_DECODER && info->type <= PLUGIN_SPU_DECODER)) { @@ -533,7 +533,7 @@ static void _register_plugins_internal(xine_t *this, plugin_file_t *file, } this->plugin_catalog->plugin_count++; } - + /* get next info */ if( file && !file->lib_handle ) { lprintf("get cached info\n"); @@ -573,7 +573,7 @@ static void collect_plugins(xine_t *this, char *path){ void *lib = NULL; plugin_info_t *info = NULL; plugin_node_t *node = NULL; - + struct stat statbuffer; size_t d_len = strlen(pEntry->d_name); @@ -627,7 +627,7 @@ static void collect_plugins(xine_t *this, char *path){ if(!info && (lib = dlopen (str, RTLD_LAZY | RTLD_GLOBAL)) == NULL) { const char *error = dlerror(); /* too noisy -- but good to catch unresolved references */ - xprintf(this, XINE_VERBOSITY_LOG, + xprintf(this, XINE_VERBOSITY_LOG, _("load_plugins: cannot open plugin lib %s:\n%s\n"), str, error); } else { @@ -670,14 +670,14 @@ static void collect_plugins(xine_t *this, char *path){ * generic 2nd stage plugin loader */ -static inline int _plugin_info_equal(const plugin_info_t *a, +static inline int _plugin_info_equal(const plugin_info_t *a, const plugin_info_t *b) { - if (a->type != b->type || + if (a->type != b->type || a->API != b->API || strcasecmp(a->id, b->id) || a->version != b->version) return 0; - + switch (a->type & PLUGIN_TYPE_MASK) { case PLUGIN_VIDEO_OUT: /* FIXME: Could special_info be NULL? */ @@ -686,16 +686,16 @@ static inline int _plugin_info_equal(const plugin_info_t *a, ((vo_info_t*)b->special_info)->visual_type); } break; - + default: break; } - + return 1; } static void _attach_entry_to_node (plugin_node_t *node, char *key) { - + if (!node->config_entry_list) { node->config_entry_list = xine_list_new(); } @@ -709,7 +709,7 @@ static void _attach_entry_to_node (plugin_node_t *node, char *key) { */ static void _new_entry_cb (void *user_data, xine_cfg_entry_t *entry) { plugin_node_t *node = (plugin_node_t *)user_data; - + _attach_entry_to_node(node, strdup(entry->key)); } @@ -760,7 +760,7 @@ static int _load_plugin_class(xine_t *this, info++; } lprintf("plugin not found\n"); - + } else { xine_log (this, XINE_LOG_PLUGIN, _("load_plugins: Yikes! %s doesn't contain plugin info.\n"), filename); @@ -828,7 +828,7 @@ static void _load_required_plugins(xine_t *this, xine_sarray_t *list) { list_size = xine_sarray_size(list); while (list_id < list_size) { plugin_node_t *node = xine_sarray_get(list, list_id); - + /* * preload plugins if not cached */ @@ -897,12 +897,12 @@ static void save_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *list) { fprintf(fp, "visual_type=%d\n", vo_info->visual_type ); fprintf(fp, "vo_priority=%d\n", vo_info->priority ); break; - + case PLUGIN_AUDIO_OUT: ao_info = node->info->special_info; fprintf(fp, "ao_priority=%d\n", ao_info->priority ); break; - + case PLUGIN_AUDIO_DECODER: case PLUGIN_VIDEO_DECODER: case PLUGIN_SPU_DECODER: @@ -973,11 +973,11 @@ static void load_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *plugins) { char *value; size_t line_len; int version_ok = 0; - + line = malloc(LINE_MAX_LENGTH); if (!line) return; - + node = NULL; file = NULL; while (fgets (line, LINE_MAX_LENGTH, fp)) { @@ -986,7 +986,7 @@ static void load_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *plugins) { line_len = strlen(line); if (line_len < 3) continue; - + value = &line[line_len - 1]; if( (*value == '\r') || (*value == '\n') ) *value-- = (char) 0; /* eliminate any cr/lf */ @@ -1024,7 +1024,7 @@ static void load_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *plugins) { if( i == CACHE_CATALOG_VERSION ) version_ok = 1; else - return; + return; } } else if (node) { if( !strcmp("size",line) ) { @@ -1036,19 +1036,19 @@ static void load_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *plugins) { } else if( !strcmp("type",line) ) { sscanf(value," %d",&i); node->info->type = i; - + switch (node->info->type & PLUGIN_TYPE_MASK){ - + case PLUGIN_VIDEO_OUT: node->info->special_info = vo_info = calloc(1, sizeof(vo_info_t)); break; - + case PLUGIN_AUDIO_OUT: node->info->special_info = ao_info = calloc(1, sizeof(ao_info_t)); break; - + case PLUGIN_DEMUX: node->info->special_info = demuxer_info = calloc(1, sizeof(demuxer_info_t)); @@ -1065,13 +1065,13 @@ static void load_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *plugins) { node->info->special_info = decoder_info = calloc(1, sizeof(decoder_info_t)); break; - + case PLUGIN_POST: node->info->special_info = post_info = calloc(1, sizeof(post_info_t)); break; - } - + } + } else if( !strcmp("api",line) ) { sscanf(value," %d",&i); node->info->API = i; @@ -1086,7 +1086,7 @@ static void load_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *plugins) { } 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, ' '); } @@ -1115,7 +1115,7 @@ static void load_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *plugins) { post_info->type = lu; } else if( !strcmp("config_key",line) ) { char* cfg_key; - + cfg_key = this->config->register_serialized_entry(this->config, value); if (cfg_key) { /* this node is a cached node */ @@ -1127,11 +1127,11 @@ static void load_plugin_list(xine_t *this, FILE *fp, xine_sarray_t *plugins) { } } } - + if( node ) { xine_sarray_add (plugins, node); } - + free (line); } @@ -1203,7 +1203,7 @@ static void save_catalog (xine_t *this) { if( (fp = fopen(cachefile_new,"w")) != NULL ) { int i; - + fprintf(fp, "# this file is automatically created by xine, do not edit.\n\n"); fprintf(fp, "cache_catalog_version=%d\n\n", CACHE_CATALOG_VERSION); @@ -1270,7 +1270,7 @@ void _x_scan_plugins (xine_t *this) { char *homedir, *pluginpath; xine_list_t *plugindirs = xine_list_new (); xine_list_iterator_t iter; - + lprintf("_x_scan_plugins()\n"); if (this == NULL || this->config == NULL) { @@ -1325,7 +1325,7 @@ void _x_scan_plugins (xine_t *this) { free(homedir); load_required_plugins (this); - + XINE_PROFILE(save_catalog (this)); map_decoders (this); @@ -1355,7 +1355,7 @@ input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mrl) { plugin->node = node; break; } - } + } } pthread_mutex_unlock (&catalog->lock); @@ -1449,7 +1449,7 @@ static demux_plugin_t *probe_demux (xine_stream_t *stream, int method1, int meth /* ... then try the extension */ stream->content_detection_method = methods[i]; - if ( stream->content_detection_method == METHOD_BY_MRL && + if ( stream->content_detection_method == METHOD_BY_MRL && ! _x_demux_check_extension(input->get_mrl(input), ((demux_class_t *)node->plugin_class)->extensions) ) @@ -1515,7 +1515,7 @@ demux_plugin_t *_x_find_demux_plugin_by_name(xine_stream_t *stream, const char * if (strcasecmp(node->info->id, name) == 0) { if (node->plugin_class || _load_plugin_class(stream->xine, node, NULL)) { - if ( stream->content_detection_method == METHOD_BY_MRL && + if ( stream->content_detection_method == METHOD_BY_MRL && ! _x_demux_check_extension(input->get_mrl(input), ((demux_class_t *)node->plugin_class)->extensions) ) @@ -1575,17 +1575,17 @@ demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const cha if (strcasecmp(node->info->id, last_demux_name) == 0) { last_demux = node; } else { - xprintf(stream->xine, XINE_VERBOSITY_DEBUG, + xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "load_plugin: probing '%s' (method %d)...\n", node->info->id, stream->content_detection_method ); if (node->plugin_class || _load_plugin_class(xine, node, NULL)) { - if ( stream->content_detection_method == METHOD_BY_MRL && + if ( stream->content_detection_method == METHOD_BY_MRL && ! _x_demux_check_extension(input->get_mrl(input), ((demux_class_t *)node->plugin_class)->extensions) ) continue; - + if ((plugin = ((demux_class_t *)node->plugin_class)->open_plugin(node->plugin_class, stream, input))) { xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "load_plugins: using demuxer '%s' (instead of '%s')\n", node->info->id, last_demux_name); @@ -1692,7 +1692,7 @@ const char *const *xine_get_browsable_input_plugin_ids(xine_t *this) { for (list_id = 0; list_id < list_size; list_id++) { input_class_t *ic; - + node = xine_sarray_get(catalog->plugin_lists[PLUGIN_INPUT - 1], list_id); if (node->plugin_class || _load_plugin_class(this, node, NULL)) { @@ -1751,7 +1751,7 @@ vo_driver_t *_x_load_video_output_plugin(xine_t *this, if (id && !strcasecmp(id, "auto")) id = NULL; - + pthread_mutex_lock (&catalog->lock); list_size = xine_sarray_size (catalog->plugin_lists[PLUGIN_VIDEO_OUT - 1]); @@ -1799,7 +1799,7 @@ xine_video_port_t *xine_open_video_driver (xine_t *this, } port = _x_vo_new_port(this, driver, 0); - + return port; } @@ -1838,7 +1838,7 @@ xine_video_port_t *xine_new_framegrab_video_port (xine_t *this) { } port = _x_vo_new_port(this, driver, 1); - + return port; } @@ -1848,7 +1848,7 @@ xine_video_port_t *xine_new_framegrab_video_port (xine_t *this) { const char *const *xine_list_audio_output_plugins (xine_t *xine) { plugin_catalog_t *catalog = xine->plugin_catalog; - + pthread_mutex_lock (&catalog->lock); _build_list_typed_plugins(&catalog, catalog->plugin_lists[PLUGIN_AUDIO_OUT - 1]); pthread_mutex_unlock (&catalog->lock); @@ -1858,7 +1858,7 @@ const char *const *xine_list_audio_output_plugins (xine_t *xine) { const char *const *xine_list_video_output_plugins (xine_t *xine) { plugin_catalog_t *catalog = xine->plugin_catalog; - + pthread_mutex_lock (&catalog->lock); _build_list_typed_plugins(&catalog, catalog->plugin_lists[PLUGIN_VIDEO_OUT - 1]); pthread_mutex_unlock (&catalog->lock); @@ -1871,7 +1871,7 @@ const char *const *xine_list_video_output_plugins_typed(xine_t *xine, uint64_t t plugin_catalog_t *catalog = xine->plugin_catalog; plugin_node_t *node; int list_id, list_size, i; - + pthread_mutex_lock (&catalog->lock); list_size = xine_sarray_size (catalog->plugin_lists[PLUGIN_VIDEO_OUT - 1]); @@ -1958,7 +1958,7 @@ xine_audio_port_t *xine_open_audio_driver (xine_t *this, const char *id, if (id && !strcasecmp(id, "auto") ) id = NULL; - + pthread_mutex_lock (&catalog->lock); driver = NULL; @@ -1984,13 +1984,13 @@ xine_audio_port_t *xine_open_audio_driver (xine_t *this, const char *id, } pthread_mutex_unlock (&catalog->lock); - + if (!driver) { if (id) xprintf (this, XINE_VERBOSITY_LOG, _("load_plugins: failed to load audio output plugin <%s>\n"), id); else - xprintf (this, XINE_VERBOSITY_LOG, + xprintf (this, XINE_VERBOSITY_LOG, _("load_plugins: audio output auto-probing didn't find any usable audio driver.\n")); return NULL; } @@ -2048,7 +2048,7 @@ char **xine_get_autoplay_mrls (xine_t *this, const char *plugin_id, if (node->plugin_class || _load_plugin_class (this, node, NULL)) { ic = (input_class_t *) node->plugin_class; - + if (!ic->get_autoplay_list) return NULL; @@ -2082,7 +2082,7 @@ xine_mrl_t **xine_get_browse_mrls (xine_t *this, const char *plugin_id, if (node->plugin_class || _load_plugin_class (this, node, NULL)) { ic = (input_class_t *) node->plugin_class; - + if (!ic->get_dir) return NULL; @@ -2114,7 +2114,7 @@ video_decoder_t *_x_get_video_decoder (xine_stream_t *stream, uint8_t stream_typ if (!node->plugin_class && !_load_plugin_class (stream->xine, node, NULL)) { /* remove non working plugin from catalog */ - xprintf(stream->xine, XINE_VERBOSITY_DEBUG, + xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "load_plugins: plugin %s failed to init its class.\n", node->info->id); for (j = i + 1; j < PLUGINS_PER_TYPE; j++) catalog->video_decoder_map[stream_type][j - 1] = @@ -2130,9 +2130,9 @@ video_decoder_t *_x_get_video_decoder (xine_stream_t *stream, uint8_t stream_typ inc_node_ref(node); vd->node = node; xprintf(stream->xine, XINE_VERBOSITY_DEBUG, - "load_plugins: plugin %s will be used for video streamtype %02x.\n", + "load_plugins: plugin %s will be used for video streamtype %02x.\n", node->info->id, stream_type); - + break; } else { /* remove non working plugin from catalog */ @@ -2185,7 +2185,7 @@ audio_decoder_t *_x_get_audio_decoder (xine_stream_t *stream, uint8_t stream_typ if (!node->plugin_class && !_load_plugin_class (stream->xine, node, NULL)) { /* remove non working plugin from catalog */ - xprintf(stream->xine, XINE_VERBOSITY_DEBUG, + xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "load_plugins: plugin %s failed to init its class.\n", node->info->id); for (j = i + 1; j < PLUGINS_PER_TYPE; j++) catalog->audio_decoder_map[stream_type][j - 1] = @@ -2201,7 +2201,7 @@ audio_decoder_t *_x_get_audio_decoder (xine_stream_t *stream, uint8_t stream_typ inc_node_ref(node); ad->node = node; xprintf(stream->xine, XINE_VERBOSITY_DEBUG, - "load_plugins: plugin %s will be used for audio streamtype %02x.\n", + "load_plugins: plugin %s will be used for audio streamtype %02x.\n", node->info->id, stream_type); break; } else { @@ -2241,11 +2241,11 @@ int _x_decoder_available (xine_t *xine, uint32_t buftype) if ( (buftype & 0xFF000000) == BUF_VIDEO_BASE ) { if( catalog->video_decoder_map[stream_type][0] ) return 1; - } else + } else if ( (buftype & 0xFF000000) == BUF_AUDIO_BASE ) { if( catalog->audio_decoder_map[stream_type][0] ) return 1; - } else + } else if ( (buftype & 0xFF000000) == BUF_SPU_BASE ) { if( catalog->spu_decoder_map[stream_type][0] ) return 1; @@ -2272,7 +2272,7 @@ static void _display_file_plugin_list (xine_list_t *list, plugin_file_t *file) { #endif static void _unload_unref_plugins(xine_t *this, xine_sarray_t *list) { - + plugin_node_t *node; int list_id, list_size; @@ -2310,7 +2310,7 @@ void xine_plugins_garbage_collector(xine_t *self) { pthread_mutex_lock (&catalog->lock); for(i = 0; i < PLUGIN_TYPE_MAX; i++) { _unload_unref_plugins(self, self->plugin_catalog->plugin_lists[i]); - } + } #if 0 { @@ -2372,7 +2372,7 @@ spu_decoder_t *_x_get_spu_decoder (xine_stream_t *stream, uint8_t stream_type) { inc_node_ref(node); sd->node = node; xprintf(stream->xine, XINE_VERBOSITY_DEBUG, - "load_plugins: plugin %s will be used for spu streamtype %02x.\n", + "load_plugins: plugin %s will be used for spu streamtype %02x.\n", node->info->id, stream_type); break; } else { @@ -2406,7 +2406,7 @@ void _x_free_spu_decoder (xine_stream_t *stream, spu_decoder_t *sd) { const char *const *xine_list_demuxer_plugins(xine_t *xine) { plugin_catalog_t *catalog = xine->plugin_catalog; - + pthread_mutex_lock (&catalog->lock); _build_list_typed_plugins(&catalog, catalog->plugin_lists[PLUGIN_DEMUX - 1]); pthread_mutex_unlock (&catalog->lock); @@ -2416,7 +2416,7 @@ const char *const *xine_list_demuxer_plugins(xine_t *xine) { const char *const *xine_list_input_plugins(xine_t *xine) { plugin_catalog_t *catalog = xine->plugin_catalog; - + pthread_mutex_lock (&catalog->lock); _build_list_typed_plugins(&catalog, catalog->plugin_lists[PLUGIN_INPUT - 1]); pthread_mutex_unlock (&catalog->lock); @@ -2426,7 +2426,7 @@ const char *const *xine_list_input_plugins(xine_t *xine) { const char *const *xine_list_spu_plugins(xine_t *xine) { plugin_catalog_t *catalog = xine->plugin_catalog; - + pthread_mutex_lock (&catalog->lock); _build_list_typed_plugins(&catalog, catalog->plugin_lists[PLUGIN_SPU_DECODER - 1]); pthread_mutex_unlock (&catalog->lock); @@ -2436,7 +2436,7 @@ const char *const *xine_list_spu_plugins(xine_t *xine) { const char *const *xine_list_audio_decoder_plugins(xine_t *xine) { plugin_catalog_t *catalog = xine->plugin_catalog; - + pthread_mutex_lock (&catalog->lock); _build_list_typed_plugins(&catalog, catalog->plugin_lists[PLUGIN_AUDIO_DECODER - 1]); pthread_mutex_unlock (&catalog->lock); @@ -2446,7 +2446,7 @@ const char *const *xine_list_audio_decoder_plugins(xine_t *xine) { const char *const *xine_list_video_decoder_plugins(xine_t *xine) { plugin_catalog_t *catalog = xine->plugin_catalog; - + pthread_mutex_lock (&catalog->lock); _build_list_typed_plugins(&catalog, catalog->plugin_lists[PLUGIN_VIDEO_DECODER - 1]); pthread_mutex_unlock (&catalog->lock); @@ -2456,7 +2456,7 @@ const char *const *xine_list_video_decoder_plugins(xine_t *xine) { const char *const *xine_list_post_plugins(xine_t *xine) { plugin_catalog_t *catalog = xine->plugin_catalog; - + pthread_mutex_lock (&catalog->lock); _build_list_typed_plugins(&catalog, catalog->plugin_lists[PLUGIN_POST - 1]); pthread_mutex_unlock (&catalog->lock); @@ -2469,7 +2469,7 @@ const char *const *xine_list_post_plugins_typed(xine_t *xine, uint32_t type) { plugin_node_t *node; int i; int list_id, list_size; - + pthread_mutex_lock (&catalog->lock); i = 0; @@ -2524,25 +2524,25 @@ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, plugin_node_t *node; post_plugin_t *post = NULL; int list_id, list_size; - + if( !name ) return NULL; - + pthread_mutex_lock(&catalog->lock); - + list_size = xine_sarray_size (catalog->plugin_lists[PLUGIN_POST - 1]); for (list_id = 0; list_id < list_size; list_id++) { node = xine_sarray_get (catalog->plugin_lists[PLUGIN_POST - 1], list_id); - + if (strcmp(node->info->id, name) == 0) { - + if (!node->plugin_class && !_load_plugin_class(xine, node, NULL)) { xprintf(xine, XINE_VERBOSITY_DEBUG, "load_plugins: requested post plugin %s failed to load\n", name); break; } - + post = ((post_class_t *)node->plugin_class)->open_plugin(node->plugin_class, inputs, audio_target, video_target); @@ -2551,12 +2551,12 @@ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, xine_post_out_t *output; xine_list_iterator_t ite; int i; - + post->running_ticket = xine->port_ticket; post->xine = xine; post->node = node; inc_node_ref(node); - + /* init the lists of announced connections */ i = 0; ite = xine_list_front(post->input); @@ -2574,7 +2574,7 @@ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, ite = xine_list_next (post->input, ite); } post->input_ids[i] = NULL; - + i = 0; ite = xine_list_front (post->output); while (ite) { @@ -2591,10 +2591,10 @@ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, ite = xine_list_next (post->output, ite); } post->output_ids[i] = NULL; - + /* copy the post plugin type to the public part */ post->xine_post.type = ((post_info_t *)node->info->special_info)->type; - + break; } else { xprintf(xine, XINE_VERBOSITY_DEBUG, @@ -2603,9 +2603,9 @@ xine_post_t *xine_post_init(xine_t *xine, const char *name, int inputs, } } } - + pthread_mutex_unlock(&catalog->lock); - + if(post) return &post->xine_post; else { @@ -2647,7 +2647,7 @@ static char *_x_concatenate_with_string(char const **strings, size_t count, char } /* get a list of file extensions for file types supported by xine - * the list is separated by spaces + * the list is separated by spaces * * the pointer returned can be free()ed when no longer used */ char *xine_get_file_extensions (xine_t *self) { @@ -2675,7 +2675,7 @@ char *xine_get_file_extensions (xine_t *self) { /* create output string */ char *const result = _x_concatenate_with_string(extensions, list_size, " ", len); free(extensions); - + /* Drop the last whitespace */ result[len-1] = '\0'; @@ -2698,7 +2698,7 @@ char *xine_get_mime_types (xine_t *self) { /* calc length of output string and create an array of strings to concatenate */ - size_t len = 0; + size_t len = 0; const int list_size = xine_sarray_size (catalog->plugin_lists[PLUGIN_DEMUX - 1]); const char **mimetypes = calloc(list_size, sizeof(char*)); @@ -2759,7 +2759,7 @@ static void dispose_plugin_list (xine_sarray_t *list, int is_cache) { int list_id, list_size; if (list) { - + list_size = xine_sarray_size (list); for (list_id = 0; list_id < list_size; list_id++) { @@ -2780,12 +2780,12 @@ static void dispose_plugin_list (xine_sarray_t *list, int is_cache) { decoder_info = (decoder_info_t *)node->info->special_info; free (decoder_info->supported_types); - + default: free ((void *)node->info->special_info); break; } - + /* free info structure and string copies */ free (node->info->id); free (node->info); |