summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Torri <storri@users.sourceforge.net>2002-10-26 03:56:31 +0000
committerStephen Torri <storri@users.sourceforge.net>2002-10-26 03:56:31 +0000
commitfae7ed0a63889f22b6aeff8bfe67efe26ac2d633 (patch)
treecfd960bd1683a98ca949a788dc7baf504c692e65
parent5d1dd3c2369c8715d1d459f7fbe12342f3c16dd1 (diff)
downloadxine-lib-fae7ed0a63889f22b6aeff8bfe67efe26ac2d633.tar.gz
xine-lib-fae7ed0a63889f22b6aeff8bfe67efe26ac2d633.tar.bz2
Removed trailing white spaces
CVS patchset: 3006 CVS date: 2002/10/26 03:56:31
-rw-r--r--src/xine-engine/configfile.c180
-rw-r--r--src/xine-engine/configfile.h37
-rw-r--r--src/xine-engine/load_plugins.c160
-rw-r--r--src/xine-engine/xine.c8
4 files changed, 193 insertions, 192 deletions
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index e134d8f63..2dac9c448 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.c
@@ -1,28 +1,28 @@
-/*
+/*
* Copyright (C) 2000-2002 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: configfile.c,v 1.37 2002/10/26 02:12:27 jcdutton Exp $
+ * $Id: configfile.c,v 1.38 2002/10/26 03:56:31 storri Exp $
*
* config object (was: file) management - implementation
*
*/
-
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -42,7 +42,7 @@
*/
-/*
+/*
* internal utility functions
*/
@@ -74,11 +74,11 @@ static cfg_entry_t *xine_config_add (config_values_t *this, const char *key) {
entry->next = NULL;
- if (this->last)
+ if (this->last)
this->last->next = entry;
else
this->first = entry;
-
+
this->last = entry;
#ifdef LOG
@@ -105,14 +105,14 @@ static cfg_entry_t *_xine_config_lookup_entry (config_values_t *this, const char
static char *_xine_config_register_string (config_values_t *this,
- const char *key,
+ const char *key,
const char *def_value,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
void *cb_data) {
-
+
cfg_entry_t *entry;
assert (key);
@@ -131,54 +131,54 @@ static char *_xine_config_register_string (config_values_t *this,
entry = xine_config_add (this, key);
entry->unknown_value = copy_string(def_value);
}
-
+
/* convert entry to string type if necessary */
if (entry->type != CONFIG_TYPE_STRING) {
entry->type = CONFIG_TYPE_STRING;
- /*
+ /*
* if there is no unknown_value (made with register_empty) set
- * it to default value
+ * it to default value
*/
if(!entry->unknown_value)
entry->unknown_value = copy_string(def_value);
-
- /*
+
+ /*
* Check for sticky string
*/
if(entry->str_sticky) {
- entry->str_value = (char *) xine_xmalloc(strlen(entry->unknown_value) +
+ entry->str_value = (char *) xine_xmalloc(strlen(entry->unknown_value) +
strlen(entry->str_sticky) + 1);
sprintf(entry->str_value, "%s%s", entry->unknown_value, entry->str_sticky);
}
else
entry->str_value = strdup(entry->unknown_value);
-
+
} else
free (entry->str_default);
-
+
/* fill out rest of struct */
-
+
entry->str_default = copy_string(def_value);
entry->description = description;
- entry->help = help;
+ entry->help = help;
entry->exp_level = exp_level;
- entry->callback = changed_cb;
- entry->callback_data = cb_data;
-
+ entry->callback = changed_cb;
+ entry->callback_data = cb_data;
+
pthread_mutex_unlock(&this->config_lock);
-
+
return entry->str_value;
}
static int _xine_config_register_num (config_values_t *this,
const char *key, int def_value,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
void *cb_data) {
-
+
cfg_entry_t *entry;
assert (key);
@@ -196,7 +196,7 @@ static int _xine_config_register_num (config_values_t *this,
entry = xine_config_add (this, key);
entry->unknown_value = NULL;
}
-
+
/* convert entry to num type if necessary */
if (entry->type != CONFIG_TYPE_NUM) {
@@ -214,25 +214,25 @@ static int _xine_config_register_num (config_values_t *this,
entry->num_value = def_value;
}
-
+
/* fill out rest of struct */
entry->num_default = def_value;
entry->description = description;
- entry->help = help;
+ entry->help = help;
entry->exp_level = exp_level;
- entry->callback = changed_cb;
- entry->callback_data = cb_data;
+ entry->callback = changed_cb;
+ entry->callback_data = cb_data;
pthread_mutex_unlock(&this->config_lock);
-
+
return entry->num_value;
}
static int _xine_config_register_bool (config_values_t *this,
- const char *key,
+ const char *key,
int def_value,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
@@ -255,7 +255,7 @@ static int _xine_config_register_bool (config_values_t *this,
entry = xine_config_add (this, key);
entry->unknown_value = NULL;
}
-
+
/* convert entry to bool type if necessary */
if (entry->type != CONFIG_TYPE_BOOL) {
@@ -273,31 +273,31 @@ static int _xine_config_register_bool (config_values_t *this,
entry->num_value = def_value;
}
-
+
/* fill out rest of struct */
entry->num_default = def_value;
entry->description = description;
- entry->help = help;
+ entry->help = help;
entry->exp_level = exp_level;
- entry->callback = changed_cb;
- entry->callback_data = cb_data;
+ entry->callback = changed_cb;
+ entry->callback_data = cb_data;
pthread_mutex_unlock(&this->config_lock);
-
+
return entry->num_value;
}
static int _xine_config_register_range (config_values_t *this,
- const char *key,
+ const char *key,
int def_value,
int min, int max,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
void *cb_data) {
-
+
cfg_entry_t *entry;
assert (key);
@@ -309,13 +309,13 @@ static int _xine_config_register_range (config_values_t *this,
/* make sure this entry exists, create it if not */
entry = _xine_config_lookup_entry (this, key);
-
+
pthread_mutex_lock(&this->config_lock);
if (!entry) {
entry = xine_config_add (this, key);
entry->unknown_value = NULL;
}
-
+
/* convert entry to range type if necessary */
if (entry->type != CONFIG_TYPE_RANGE) {
@@ -339,13 +339,13 @@ static int _xine_config_register_range (config_values_t *this,
entry->range_min = min;
entry->range_max = max;
entry->description = description;
- entry->help = help;
+ entry->help = help;
entry->exp_level = exp_level;
- entry->callback = changed_cb;
- entry->callback_data = cb_data;
+ entry->callback = changed_cb;
+ entry->callback_data = cb_data;
pthread_mutex_unlock(&this->config_lock);
-
+
return entry->num_value;
}
@@ -353,8 +353,8 @@ static int xine_config_parse_enum (const char *str, char **values) {
char **value;
int i;
-
-
+
+
value = values;
i = 0;
@@ -381,10 +381,10 @@ static int xine_config_parse_enum (const char *str, char **values) {
}
static int _xine_config_register_enum (config_values_t *this,
- const char *key,
+ const char *key,
int def_value,
char **values,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
@@ -402,13 +402,13 @@ static int _xine_config_register_enum (config_values_t *this,
/* make sure this entry exists, create it if not */
entry = _xine_config_lookup_entry (this, key);
-
+
pthread_mutex_lock(&this->config_lock);
if (!entry) {
entry = xine_config_add (this, key);
entry->unknown_value = NULL;
}
-
+
/* convert entry to enum type if necessary */
if (entry->type != CONFIG_TYPE_ENUM) {
@@ -432,13 +432,13 @@ static int _xine_config_register_enum (config_values_t *this,
entry->num_default = def_value;
entry->enum_values = values;
entry->description = description;
- entry->help = help;
+ entry->help = help;
entry->exp_level = exp_level;
- entry->callback = changed_cb;
- entry->callback_data = cb_data;
+ entry->callback = changed_cb;
+ entry->callback_data = cb_data;
pthread_mutex_unlock(&this->config_lock);
-
+
return entry->num_value;
}
@@ -484,7 +484,7 @@ static void xine_config_update_num (config_values_t *this,
}
- if ((entry->type == CONFIG_TYPE_UNKNOWN)
+ if ((entry->type == CONFIG_TYPE_UNKNOWN)
|| (entry->type == CONFIG_TYPE_STRING)) {
printf ("configfile: error - tried to update non-num type %d (key %s, value %d)\n",
entry->type, entry->key, value);
@@ -503,7 +503,7 @@ static void xine_config_update_num (config_values_t *this,
}
static void xine_config_update_string (config_values_t *this,
- const char *key,
+ const char *key,
const char *value) {
cfg_entry_t *entry;
@@ -558,15 +558,15 @@ void xine_config_load (xine_t *xine, const char *filename) {
#endif
f_config = fopen (filename, "r");
-
+
if (f_config) {
-
+
char line[1024];
char *value;
while (fgets (line, 1023, f_config)) {
line[strlen(line)-1]= (char) 0; /* eliminate lf */
-
+
if (line[0] == '#')
continue;
@@ -576,7 +576,7 @@ void xine_config_load (xine_t *xine, const char *filename) {
*value = (char) 0;
value++;
-
+
if (!(entry = _xine_config_lookup_entry(this, line))) {
pthread_mutex_lock(&this->config_lock);
entry = xine_config_add (this, line);
@@ -606,7 +606,7 @@ void xine_config_load (xine_t *xine, const char *filename) {
}
}
}
-
+
fclose (f_config);
}
}
@@ -623,11 +623,11 @@ void xine_config_save (xine_t *xine_ro, const char *filename) {
f_config = fopen (filename, "w");
if (f_config) {
-
+
cfg_entry_t *entry;
fprintf (f_config, "#\n# xine config file\n#\n\n");
-
+
pthread_mutex_lock(&this->config_lock);
entry = this->first;
@@ -645,7 +645,7 @@ void xine_config_save (xine_t *xine_ro, const char *filename) {
#if 0
/* discard unclaimed values */
- fprintf (f_config, "%s:%s\n",
+ fprintf (f_config, "%s:%s\n",
entry->key, entry->unknown_value);
#endif
@@ -664,18 +664,18 @@ void xine_config_save (xine_t *xine_ro, const char *filename) {
break;
case CONFIG_TYPE_ENUM: {
char **value;
-
+
fprintf (f_config, "# {");
value = entry->enum_values;
while (*value) {
fprintf (f_config, " %s ", *value);
value++;
}
-
+
fprintf (f_config, "}, default: %d\n",
entry->num_default);
fprintf (f_config, "%s:", entry->key);
-
+
fprintf (f_config, "%s\n", entry->enum_values[entry->num_value]);
fprintf (f_config, "\n");
break;
@@ -693,12 +693,12 @@ void xine_config_save (xine_t *xine_ro, const char *filename) {
fprintf (f_config, "\n");
break;
}
-
+
entry = entry->next;
- }
+ }
pthread_mutex_unlock(&this->config_lock);
fclose (f_config);
- }
+ }
}
static void xine_config_dispose (config_values_t *this) {
@@ -729,7 +729,7 @@ static void xine_config_dispose (config_values_t *this) {
free (last);
}
pthread_mutex_unlock(&this->config_lock);
-
+
pthread_mutex_destroy(&this->config_lock);
free (this);
}
@@ -739,10 +739,10 @@ static void xine_config_unregister_cb (config_values_t *this,
const char *key) {
cfg_entry_t *entry;
-
+
assert (this);
assert (key);
-
+
entry = _xine_config_lookup_entry (this, key);
if (entry) {
entry->callback = NULL;
@@ -766,7 +766,7 @@ config_values_t *xine_config_init () {
this->first = NULL;
this->last = NULL;
-
+
pthread_mutex_init(&this->config_lock, NULL);
this->register_string = _xine_config_register_string;
@@ -791,30 +791,30 @@ int xine_config_change_opt(config_values_t *config, const char *opt) {
#ifdef LOG
printf ("configfile: change_opt '%s'\n", opt);
#endif
-
+
if(config && opt && (!strncasecmp(opt, "opt:", 4))) {
char *optsafe;
char *key, *value;
xine_strdupa(optsafe, opt);
key = &optsafe[4];
- value = strrchr(optsafe, '=');
+ value = strrchr(optsafe, '=');
if(key && strlen(key) && value && strlen(value)) {
-
+
*value++ = '\0';
entry = config->lookup_entry(config, key);
-
+
if(entry) {
switch(entry->type) {
-
+
case CONFIG_TYPE_STRING:
config->update_string(config, key, value);
handled = 1;
break;
-
+
case CONFIG_TYPE_RANGE:
case CONFIG_TYPE_ENUM:
case CONFIG_TYPE_NUM:
@@ -822,7 +822,7 @@ int xine_config_change_opt(config_values_t *config, const char *opt) {
config->update_num(config, key, (atoi(value)));
handled = 1;
break;
-
+
case CONFIG_TYPE_UNKNOWN:
#ifdef LOG
printf("configfile: change_opt() try to update an CONFIG_TYPE_UNKNOWN entry\n");
@@ -833,7 +833,7 @@ int xine_config_change_opt(config_values_t *config, const char *opt) {
}
}
}
-
+
return handled;
}
diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h
index 7330e5a12..1df406037 100644
--- a/src/xine-engine/configfile.h
+++ b/src/xine-engine/configfile.h
@@ -1,23 +1,23 @@
-/*
+/*
* Copyright (C) 2000-2002 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: configfile.h,v 1.18 2002/09/18 14:31:39 mroi Exp $
+ * $Id: configfile.h,v 1.19 2002/10/26 03:56:32 storri Exp $
*
* config file management
*
@@ -33,6 +33,7 @@ extern "C" {
#include <inttypes.h>
#include "xine.h"
+#include "pthread.h"
typedef struct cfg_entry_s cfg_entry_t;
typedef struct config_values_s config_values_t;
@@ -99,9 +100,9 @@ struct config_values_s {
*/
char* (*register_string) (config_values_t *this,
- const char *key,
+ const char *key,
const char *def_value,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
@@ -111,7 +112,7 @@ struct config_values_s {
const char *key,
int def_value,
int min, int max,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
@@ -121,25 +122,25 @@ struct config_values_s {
const char *key,
int def_value,
char **values,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
void *cb_data);
int (*register_num) (config_values_t *this,
- const char *key,
+ const char *key,
int def_value,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
void *cb_data);
int (*register_bool) (config_values_t *this,
- const char *key,
+ const char *key,
int def_value,
- const char *description,
+ const char *description,
const char *help,
int exp_level,
xine_config_cb_t changed_cb,
@@ -156,7 +157,7 @@ struct config_values_s {
/*
* lookup config entries
- *
+ *
* remember to call the changed_cb if it exists
* and you changed the value of this item
*/
@@ -173,15 +174,15 @@ struct config_values_s {
*/
void (*dispose) (config_values_t *this);
- /*
+ /*
* config values are stored here:
*/
cfg_entry_t *first, *last, *cur;
-
+
/*
* mutex for modification to the config
*/
- pthread_mutex_t config_lock;
+ pthread_mutex_t config_lock;
};
/*
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index b2828639f..98b5da31e 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -1,23 +1,23 @@
/*
* Copyright (C) 2000-2002 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* 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.104 2002/10/24 22:54:27 guenter Exp $
+ * $Id: load_plugins.c,v 1.105 2002/10/26 03:56:32 storri Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -70,7 +70,7 @@ void (*old_segv_handler)(int);
static void segv_handler (int hubba) {
printf ("\nload_plugins: Initialization of plugin '%s' failed (segmentation fault).\n",plugin_name);
printf ("load_plugins: You probably need to remove the offending file.\n");
- printf ("load_plugins: (This error is usually due an incorrect plugin version)\n");
+ printf ("load_plugins: (This error is usually due an incorrect plugin version)\n");
abort();
}
@@ -111,13 +111,13 @@ static int _get_decoder_priority (xine_t *this, int default_priority,
str,
default_priority,
"decoder's priority compared to others",
- NULL, 20,
+ NULL, 20,
NULL, NULL /* FIXME: implement callback */);
}
-static void _insert_plugin (xine_t *this,
+static void _insert_plugin (xine_t *this,
xine_list_t *list,
- char *filename, plugin_info_t *info,
+ char *filename, plugin_info_t *info,
int api_version){
plugin_node_t *entry;
@@ -191,7 +191,7 @@ static void _insert_plugin (xine_t *this,
static plugin_catalog_t *_new_catalog(void){
plugin_catalog_t *catalog;
-
+
catalog = xine_xmalloc(sizeof(plugin_catalog_t));
catalog->input = xine_list_new();
catalog->demux = xine_list_new();
@@ -219,48 +219,48 @@ static void collect_plugins(xine_t *this, char *path){
printf ("load_plugins: collect_plugins in %s\n", path);
#endif
- dir = opendir(path);
+ dir = opendir(path);
if (dir) {
struct dirent *pEntry;
-
+
while ((pEntry = readdir (dir)) != NULL) {
char *str;
void *lib;
struct stat statbuffer;
-
+
str = xine_xmalloc(strlen(path) + strlen(pEntry->d_name) + 2);
sprintf (str, "%s/%s", XINE_PLUGINDIR, pEntry->d_name);
-
+
if (stat(str, &statbuffer)) {
xine_log (this, XINE_LOG_PLUGIN,
- _("load_plugins: unable to stat %s\n"), str);
+ _("load_plugins: unable to stat %s\n"), str);
}
else if( strstr(str, ".so") ) {
-
+
switch (statbuffer.st_mode & S_IFMT){
-
+
case S_IFREG:
/* regular file, ie. plugin library, found => load it */
-
+
plugin_name = str;
-
+
if(!(lib = dlopen (str, RTLD_LAZY | RTLD_GLOBAL))) {
-
+
/*#ifdef LOG*/
{
char *dl_error_msg = dlerror();
/* too noisy -- but good to catch unresolved references */
printf ("load_plugins: cannot open plugin lib %s:\n%s\n",
- str, dl_error_msg);
+ str, dl_error_msg);
}
/*#endif*/
}
else {
-
+
plugin_info_t *info;
-
+
if ((info = dlsym(lib, "xine_plugin_info"))) {
-
+
for (; info->type != PLUGIN_NONE; ++info){
xine_log (this, XINE_LOG_PLUGIN,
@@ -268,7 +268,7 @@ static void collect_plugins(xine_t *this, char *path){
switch (info->type){
case PLUGIN_INPUT:
- _insert_plugin (this, this->plugin_catalog->input, str, info,
+ _insert_plugin (this, this->plugin_catalog->input, str, info,
INPUT_PLUGIN_IFACE_VERSION);
break;
case PLUGIN_DEMUX:
@@ -301,20 +301,20 @@ static void collect_plugins(xine_t *this, char *path){
info->type, str);
}
}
-
+
}
else {
char *dl_error_msg = dlerror();
-
+
xine_log (this, XINE_LOG_PLUGIN,
_("load_plugins: can't get plugin info from %s:\n%s\n"),
- str, dl_error_msg);
+ str, dl_error_msg);
}
dlclose(lib);
}
break;
case S_IFDIR:
-
+
if (*pEntry->d_name != '.'){ /* catches ".", ".." or ".hidden" dirs */
collect_plugins(this, str);
}
@@ -340,12 +340,12 @@ static void *_load_plugin_class(xine_t *this,
xine_log (this, XINE_LOG_PLUGIN,
_("load_plugins: cannot (stage 2) open plugin lib %s:\n%s\n"),
- filename, dlerror());
+ filename, dlerror());
} else {
plugin_info_t *info;
-
+
if ((info = dlsym(lib, "xine_plugin_info"))) {
/* TODO: use sigsegv handler */
while (info->type != PLUGIN_NONE){
@@ -375,7 +375,7 @@ static void load_plugins(xine_t *this) {
plugin_node_t *node;
- /*
+ /*
* input plugins
*/
@@ -392,7 +392,7 @@ static void load_plugins(xine_t *this) {
node = xine_list_next_content (this->plugin_catalog->input);
}
- /*
+ /*
* demux plugins
*/
@@ -427,11 +427,11 @@ static void map_decoders (xine_t *this) {
catalog->video_decoder_map[i][0]=NULL;
catalog->spu_decoder_map[i][0]=NULL;
}
-
- /*
- * map audio decoders
+
+ /*
+ * map audio decoders
*/
-
+
node = xine_list_first_content (this->plugin_catalog->audio);
while (node) {
@@ -459,27 +459,27 @@ static void map_decoders (xine_t *this) {
((decoder_info_t *)catalog->audio_decoder_map[streamtype][pos]->info->special_info)->priority <=
di->priority)
break;
-
+
/* shift the decoder list for this type by one to make room for new decoder */
for (i = PLUGINS_PER_TYPE - 1; i > pos; i--)
catalog->audio_decoder_map[streamtype][i] = catalog->audio_decoder_map[streamtype][i - 1];
-
+
/* insert new decoder */
catalog->audio_decoder_map[streamtype][pos] = node;
#ifdef LOG
printf("load_plugins: decoder inserted in decoder map at %d\n", pos);
#endif
-
+
type++;
}
node = xine_list_next_content (this->plugin_catalog->audio);
}
- /*
- * map video decoders
+ /*
+ * map video decoders
*/
-
+
node = xine_list_first_content (this->plugin_catalog->video);
while (node) {
@@ -507,27 +507,27 @@ static void map_decoders (xine_t *this) {
((decoder_info_t *)catalog->video_decoder_map[streamtype][pos]->info->special_info)->priority <=
di->priority)
break;
-
+
/* shift the decoder list for this type by one to make room for new decoder */
for (i = PLUGINS_PER_TYPE - 1; i > pos; i--)
catalog->video_decoder_map[streamtype][i] = catalog->video_decoder_map[streamtype][i - 1];
-
+
/* insert new decoder */
catalog->video_decoder_map[streamtype][pos] = node;
#ifdef LOG
printf("load_plugins: decoder inserted in decoder map at %d\n", pos);
#endif
-
+
type++;
}
node = xine_list_next_content (this->plugin_catalog->video);
}
- /*
- * map spu decoders
+ /*
+ * map spu decoders
*/
-
+
node = xine_list_first_content (this->plugin_catalog->spu);
while (node) {
@@ -555,17 +555,17 @@ static void map_decoders (xine_t *this) {
((decoder_info_t *)catalog->spu_decoder_map[streamtype][pos]->info->special_info)->priority <=
di->priority)
break;
-
+
/* shift the decoder list for this type by one to make room for new decoder */
for (i = PLUGINS_PER_TYPE - 1; i > pos; i--)
catalog->spu_decoder_map[streamtype][i] = catalog->spu_decoder_map[streamtype][i - 1];
-
+
/* insert new decoder */
catalog->spu_decoder_map[streamtype][pos] = node;
#ifdef LOG
printf("load_plugins: decoder inserted in decoder map at %d\n", pos);
#endif
-
+
type++;
}
@@ -693,7 +693,7 @@ demux_plugin_t *find_demux_plugin (xine_stream_t *stream, input_plugin_t *input)
stream->xine->demux_strategy);
abort();
}
-
+
return NULL;
}
@@ -792,7 +792,7 @@ static xine_vo_driver_t *_load_video_driver (xine_t *this, plugin_node_t *node,
xine_vo_driver_t *driver;
- if (!node->plugin_class)
+ if (!node->plugin_class)
node->plugin_class = _load_plugin_class (this, node->filename, node->info, data);
if (!node->plugin_class)
@@ -805,7 +805,7 @@ static xine_vo_driver_t *_load_video_driver (xine_t *this, plugin_node_t *node,
node->ref ++;
} else {
- /* FIXME
+ /* FIXME
if (!node->ref)
unload class
*/
@@ -815,7 +815,7 @@ static xine_vo_driver_t *_load_video_driver (xine_t *this, plugin_node_t *node,
}
xine_vo_driver_t *xine_open_video_driver (xine_t *this,
- const char *id,
+ const char *id,
int visual_type, void *visual) {
plugin_node_t *node;
@@ -847,7 +847,7 @@ xine_vo_driver_t *xine_open_video_driver (xine_t *this,
xine_cfg_entry_t entry;
/* remember plugin id */
-
+
if (xine_config_lookup_entry (this, "video.driver", &entry)) {
entry.str_value = node->info->id;
xine_config_update_entry (this, &entry);
@@ -857,11 +857,11 @@ xine_vo_driver_t *xine_open_video_driver (xine_t *this,
}
}
}
-
+
node = xine_list_next_content (catalog->vout);
}
- if (!driver)
+ if (!driver)
printf ("load_plugins: failed to load video output plugin <%s>\n", id);
pthread_mutex_unlock (&catalog->lock);
@@ -934,7 +934,7 @@ static xine_ao_driver_t *_load_audio_driver (xine_t *this, plugin_node_t *node,
xine_ao_driver_t *driver;
- if (!node->plugin_class)
+ if (!node->plugin_class)
node->plugin_class = _load_plugin_class (this, node->filename, node->info, data);
if (!node->plugin_class)
@@ -947,7 +947,7 @@ static xine_ao_driver_t *_load_audio_driver (xine_t *this, plugin_node_t *node,
node->ref ++;
} else {
- /* FIXME
+ /* FIXME
if (!node->ref)
unload class
*/
@@ -958,7 +958,7 @@ static xine_ao_driver_t *_load_audio_driver (xine_t *this, plugin_node_t *node,
xine_ao_driver_t *xine_open_audio_driver (xine_t *this, const char *id,
void *data) {
-
+
plugin_node_t *node;
xine_ao_driver_t *driver;
ao_info_t *ao_info;
@@ -1007,8 +1007,8 @@ xine_ao_driver_t *xine_open_audio_driver (xine_t *this, const char *id,
pthread_mutex_unlock (&catalog->lock);
- return driver;
-}
+ return driver;
+}
void xine_close_audio_driver (xine_t *this, xine_ao_driver_t *driver) {
@@ -1022,11 +1022,11 @@ void xine_close_video_driver (xine_t *this, xine_vo_driver_t *driver) {
}
-/*
+/*
* get autoplay mrl list from input plugin
*/
-char **xine_get_autoplay_mrls (xine_t *this, const char *plugin_id,
+char **xine_get_autoplay_mrls (xine_t *this, const char *plugin_id,
int *num_mrls) {
plugin_catalog_t *catalog;
@@ -1054,7 +1054,7 @@ char **xine_get_autoplay_mrls (xine_t *this, const char *plugin_id,
/*
* input plugin mrl browser support
*/
-xine_mrl_t **xine_get_browse_mrls (xine_t *this, const char *plugin_id,
+xine_mrl_t **xine_get_browse_mrls (xine_t *this, const char *plugin_id,
const char *start_mrl, int *num_mrls) {
plugin_catalog_t *catalog;
@@ -1093,7 +1093,7 @@ video_decoder_t *get_video_decoder (xine_stream_t *stream, uint8_t stream_type)
pthread_mutex_lock (&catalog->lock);
for (i = 0; i < PLUGINS_PER_TYPE; i++) {
-
+
video_decoder_t *vd=NULL;
node = catalog->video_decoder_map[stream_type][i];
@@ -1103,8 +1103,8 @@ video_decoder_t *get_video_decoder (xine_stream_t *stream, uint8_t stream_type)
return NULL;
}
- if (!node->plugin_class)
- node->plugin_class = _load_plugin_class (stream->xine, node->filename,
+ if (!node->plugin_class)
+ node->plugin_class = _load_plugin_class (stream->xine, node->filename,
node->info, NULL);
if (!node->plugin_class) {
@@ -1141,7 +1141,7 @@ void free_video_decoder (xine_stream_t *stream, video_decoder_t *vd) {
vd->dispose (vd);
- node->ref--;
+ node->ref--;
/* FIXME: unload plugin if no-longer used */
pthread_mutex_unlock (&catalog->lock);
@@ -1172,8 +1172,8 @@ audio_decoder_t *get_audio_decoder (xine_stream_t *stream, uint8_t stream_type)
return NULL;
}
- if (!node->plugin_class)
- node->plugin_class = _load_plugin_class (stream->xine, node->filename,
+ if (!node->plugin_class)
+ node->plugin_class = _load_plugin_class (stream->xine, node->filename,
node->info, NULL);
if (!node->plugin_class) {
@@ -1210,7 +1210,7 @@ void free_audio_decoder (xine_stream_t *stream, audio_decoder_t *ad) {
ad->dispose (ad);
- node->ref--;
+ node->ref--;
/* FIXME: unload plugin if no-longer used */
pthread_mutex_unlock (&catalog->lock);
@@ -1240,8 +1240,8 @@ spu_decoder_t *get_spu_decoder (xine_stream_t *stream, uint8_t stream_type) {
return NULL;
}
- if (!node->plugin_class)
- node->plugin_class = _load_plugin_class (stream->xine, node->filename,
+ if (!node->plugin_class)
+ node->plugin_class = _load_plugin_class (stream->xine, node->filename,
node->info, NULL);
if (!node->plugin_class) {
@@ -1278,7 +1278,7 @@ void free_spu_decoder (xine_stream_t *stream, spu_decoder_t *sd) {
sd->dispose (sd);
- node->ref--;
+ node->ref--;
/* FIXME: unload plugin if no-longer used */
pthread_mutex_unlock (&catalog->lock);
@@ -1422,13 +1422,13 @@ void dispose_plugins (xine_t *this) {
node = xine_list_next_content (this->plugin_catalog->input);
}
- for (i = 0; i < this->num_audio_decoders_loaded; i++)
+ for (i = 0; i < this->num_audio_decoders_loaded; i++)
this->audio_decoders_loaded[i]->dispose (this->audio_decoders_loaded[i]);
- for (i = 0; i < this->num_video_decoders_loaded; i++)
+ for (i = 0; i < this->num_video_decoders_loaded; i++)
this->video_decoders_loaded[i]->dispose (this->video_decoders_loaded[i]);
- for (i = 0; i < this->num_spu_decoders_loaded; i++)
+ for (i = 0; i < this->num_spu_decoders_loaded; i++)
this->spu_decoders_loaded[i]->dispose (this->spu_decoders_loaded[i]);
#endif
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 66d122681..9838a9294 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.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: xine.c,v 1.174 2002/10/23 22:23:46 guenter Exp $
+ * $Id: xine.c,v 1.175 2002/10/26 03:56:32 storri Exp $
*
* top-level xine functions
*
@@ -346,14 +346,14 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
*/
if (!(stream->input_plugin = find_input_plugin (stream, mrl))) {
- xine_log (stream->xine, XINE_LOG_MSG,
+ xine_log (stream->xine, XINE_LOG_MSG,
_("xine: cannot find input plugin for this MRL\n"));
stream->err = XINE_ERROR_NO_INPUT_PLUGIN;
return 0;
}
stream->input_class = stream->input_plugin->input_class;
- stream->meta_info[XINE_META_INFO_INPUT_PLUGIN]
+ stream->meta_info[XINE_META_INFO_INPUT_PLUGIN]
= strdup (stream->input_class->get_identifier (stream->input_class));
@@ -379,7 +379,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
printf ("xine: demux and input plugin found\n");
#endif
- stream->meta_info[XINE_META_INFO_SYSTEMLAYER]
+ stream->meta_info[XINE_META_INFO_SYSTEMLAYER]
= strdup (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class));
/*