diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/configfile.c | 98 | ||||
-rw-r--r-- | src/xine-engine/info_helper.c | 66 | ||||
-rw-r--r-- | src/xine-engine/post.h | 14 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 86 | ||||
-rw-r--r-- | src/xine-engine/xine_interface.c | 10 |
5 files changed, 137 insertions, 137 deletions
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 8bb090882..c767a7a28 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.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: configfile.c,v 1.72 2004/12/13 11:11:27 mlampard Exp $ + * $Id: configfile.c,v 1.73 2004/12/20 21:22:21 mroi Exp $ * * config object (was: file) management - implementation * @@ -322,7 +322,7 @@ static void config_insert(config_values_t *this, cfg_entry_t *new_entry) { this->first = new_entry; } -static cfg_entry_t *__config_add (config_values_t *this, const char *key, int exp_level) { +static cfg_entry_t *config_add (config_values_t *this, const char *key, int exp_level) { cfg_entry_t *entry; @@ -341,7 +341,7 @@ static cfg_entry_t *__config_add (config_values_t *this, const char *key, int ex return entry; } -static const char *__config_translate_key (const char *key) { +static const char *config_translate_key (const char *key) { /* Returns translated key or, if no translation found, NULL. * Translated key may be in a static buffer allocated within this function. * NOT re-entrant; assumes that config_lock is held. @@ -369,7 +369,7 @@ static const char *__config_translate_key (const char *key) { return NULL; } -static void __config_lookup_entry_int (config_values_t *this, const char *key, +static void config_lookup_entry_int (config_values_t *this, const char *key, cfg_entry_t **entry, cfg_entry_t **prev) { int trans; @@ -389,7 +389,7 @@ static void __config_lookup_entry_int (config_values_t *this, const char *key, /* we did not find a match, maybe this is an old config entry name * trying to translate */ - key = __config_translate_key(key); + key = config_translate_key(key); if (!key) return; } @@ -400,17 +400,17 @@ static void __config_lookup_entry_int (config_values_t *this, const char *key, * external interface */ -static cfg_entry_t *__config_lookup_entry(config_values_t *this, const char *key) { +static cfg_entry_t *config_lookup_entry(config_values_t *this, const char *key) { cfg_entry_t *entry, *prev; pthread_mutex_lock(&this->config_lock); - __config_lookup_entry_int(this, key, &entry, &prev); + config_lookup_entry_int(this, key, &entry, &prev); pthread_mutex_unlock(&this->config_lock); return entry; } -static char *__config_register_string (config_values_t *this, +static char *config_register_string (config_values_t *this, const char *key, const char *def_value, const char *description, @@ -429,10 +429,10 @@ static char *__config_register_string (config_values_t *this, /* make sure this entry exists, create it if not */ pthread_mutex_lock(&this->config_lock); - __config_lookup_entry_int(this, key, &entry, &prev); + config_lookup_entry_int(this, key, &entry, &prev); if (!entry) { - entry = __config_add (this, key, exp_level); + entry = config_add (this, key, exp_level); entry->unknown_value = strdup(def_value); } else { if (!entry->next) @@ -475,7 +475,7 @@ static char *__config_register_string (config_values_t *this, return entry->str_value; } -static int __config_register_num (config_values_t *this, +static int config_register_num (config_values_t *this, const char *key, int def_value, const char *description, const char *help, @@ -491,10 +491,10 @@ static int __config_register_num (config_values_t *this, /* make sure this entry exists, create it if not */ pthread_mutex_lock(&this->config_lock); - __config_lookup_entry_int(this, key, &entry, &prev); + config_lookup_entry_int(this, key, &entry, &prev); if (!entry) { - entry = __config_add (this, key, exp_level); + entry = config_add (this, key, exp_level); entry->unknown_value = NULL; } else { if (!entry->next) @@ -539,7 +539,7 @@ static int __config_register_num (config_values_t *this, return entry->num_value; } -static int __config_register_bool (config_values_t *this, +static int config_register_bool (config_values_t *this, const char *key, int def_value, const char *description, @@ -556,10 +556,10 @@ static int __config_register_bool (config_values_t *this, /* make sure this entry exists, create it if not */ pthread_mutex_lock(&this->config_lock); - __config_lookup_entry_int(this, key, &entry, &prev); + config_lookup_entry_int(this, key, &entry, &prev); if (!entry) { - entry = __config_add (this, key, exp_level); + entry = config_add (this, key, exp_level); entry->unknown_value = NULL; } else { if (!entry->next) @@ -604,7 +604,7 @@ static int __config_register_bool (config_values_t *this, return entry->num_value; } -static int __config_register_range (config_values_t *this, +static int config_register_range (config_values_t *this, const char *key, int def_value, int min, int max, @@ -622,10 +622,10 @@ static int __config_register_range (config_values_t *this, /* make sure this entry exists, create it if not */ pthread_mutex_lock(&this->config_lock); - __config_lookup_entry_int(this, key, &entry, &prev); + config_lookup_entry_int(this, key, &entry, &prev); if (!entry) { - entry = __config_add (this, key, exp_level); + entry = config_add (this, key, exp_level); entry->unknown_value = NULL; } else { if (!entry->next) @@ -671,7 +671,7 @@ static int __config_register_range (config_values_t *this, return entry->num_value; } -static int __config_parse_enum (const char *str, char **values) { +static int config_parse_enum (const char *str, char **values) { char **value; int i; @@ -696,7 +696,7 @@ static int __config_parse_enum (const char *str, char **values) { return 0; } -static int __config_register_enum (config_values_t *this, +static int config_register_enum (config_values_t *this, const char *key, int def_value, char **values, @@ -715,10 +715,10 @@ static int __config_register_enum (config_values_t *this, /* make sure this entry exists, create it if not */ pthread_mutex_lock(&this->config_lock); - __config_lookup_entry_int(this, key, &entry, &prev); + config_lookup_entry_int(this, key, &entry, &prev); if (!entry) { - entry = __config_add (this, key, exp_level); + entry = config_add (this, key, exp_level); entry->unknown_value = NULL; } else { if (!entry->next) @@ -744,7 +744,7 @@ static int __config_register_enum (config_values_t *this, entry->type = XINE_CONFIG_TYPE_ENUM; if (entry->unknown_value) - entry->num_value = __config_parse_enum (entry->unknown_value, values); + entry->num_value = config_parse_enum (entry->unknown_value, values); else entry->num_value = def_value; @@ -764,7 +764,7 @@ static int __config_register_enum (config_values_t *this, return entry->num_value; } -static void __config_shallow_copy(xine_cfg_entry_t *dest, cfg_entry_t *src) +static void config_shallow_copy(xine_cfg_entry_t *dest, cfg_entry_t *src) { dest->key = src->key; dest->type = src->type; @@ -783,7 +783,7 @@ static void __config_shallow_copy(xine_cfg_entry_t *dest, cfg_entry_t *src) dest->callback_data = src->callback_data; } -static void __config_update_num (config_values_t *this, +static void config_update_num (config_values_t *this, const char *key, int value) { cfg_entry_t *entry; @@ -812,7 +812,7 @@ static void __config_update_num (config_values_t *this, if (entry->callback) { xine_cfg_entry_t cb_entry; - __config_shallow_copy(&cb_entry, entry); + config_shallow_copy(&cb_entry, entry); /* do not enter the callback from within a locked context */ pthread_mutex_unlock(&this->config_lock); entry->callback (entry->callback_data, &cb_entry); @@ -820,7 +820,7 @@ static void __config_update_num (config_values_t *this, pthread_mutex_unlock(&this->config_lock); } -static void __config_update_string (config_values_t *this, +static void config_update_string (config_values_t *this, const char *key, const char *value) { @@ -842,7 +842,7 @@ static void __config_update_string (config_values_t *this, /* if an enum is updated with a string, we convert the string to * its index and use update number */ if (entry->type == XINE_CONFIG_TYPE_ENUM) { - __config_update_num(this, key, __config_parse_enum(value, entry->enum_values)); + config_update_num(this, key, config_parse_enum(value, entry->enum_values)); return; } @@ -860,7 +860,7 @@ static void __config_update_string (config_values_t *this, if (entry->callback) { xine_cfg_entry_t cb_entry; - __config_shallow_copy(&cb_entry, entry); + config_shallow_copy(&cb_entry, entry); /* FIXME: find a solution which does not enter the callback with the lock acquired, * but does also handle the char* leak- and race-free without unnecessary string copying */ entry->callback (entry->callback_data, &cb_entry); @@ -910,16 +910,16 @@ void xine_config_load (xine_t *xine, const char *filename) { *value = (char) 0; value++; - if (!(entry = __config_lookup_entry(this, line))) { + if (!(entry = config_lookup_entry(this, line))) { const char *key = line; pthread_mutex_lock(&this->config_lock); if (this->current_version < CONFIG_FILE_VERSION) { /* old config file -> let's see if we have to rename this one */ - key = __config_translate_key(key); + key = config_translate_key(key); if (!key) key = line; /* no translation? fall back on untranslated key */ } - entry = __config_add (this, key, 50); + entry = config_add (this, key, 50); entry->unknown_value = strdup(value); pthread_mutex_unlock(&this->config_lock); } else { @@ -927,11 +927,11 @@ void xine_config_load (xine_t *xine, const char *filename) { case XINE_CONFIG_TYPE_RANGE: case XINE_CONFIG_TYPE_NUM: case XINE_CONFIG_TYPE_BOOL: - __config_update_num (this, entry->key, atoi(value)); + config_update_num (this, entry->key, atoi(value)); break; case XINE_CONFIG_TYPE_ENUM: case XINE_CONFIG_TYPE_STRING: - __config_update_string (this, entry->key, value); + config_update_string (this, entry->key, value); break; case XINE_CONFIG_TYPE_UNKNOWN: pthread_mutex_lock(&this->config_lock); @@ -1117,7 +1117,7 @@ void xine_config_save (xine_t *xine, const char *filename) { unlink(temp); } -static void __config_dispose (config_values_t *this) { +static void config_dispose (config_values_t *this) { cfg_entry_t *entry, *last; @@ -1149,14 +1149,14 @@ static void __config_dispose (config_values_t *this) { } -static void __config_unregister_cb (config_values_t *this, const char *key) { +static void config_unregister_cb (config_values_t *this, const char *key) { cfg_entry_t *entry; _x_assert(key); _x_assert(this); - entry = __config_lookup_entry (this, key); + entry = config_lookup_entry (this, key); if (entry) { pthread_mutex_lock(&this->config_lock); entry->callback = NULL; @@ -1185,17 +1185,17 @@ config_values_t *_x_config_init (void) { pthread_mutex_init(&this->config_lock, NULL); - this->register_string = __config_register_string; - this->register_range = __config_register_range; - this->register_enum = __config_register_enum; - this->register_num = __config_register_num; - this->register_bool = __config_register_bool; - this->update_num = __config_update_num; - this->update_string = __config_update_string; - this->parse_enum = __config_parse_enum; - this->lookup_entry = __config_lookup_entry; - this->unregister_callback = __config_unregister_cb; - this->dispose = __config_dispose; + this->register_string = config_register_string; + this->register_range = config_register_range; + this->register_enum = config_register_enum; + this->register_num = config_register_num; + this->register_bool = config_register_bool; + this->update_num = config_update_num; + this->update_string = config_update_string; + this->parse_enum = config_parse_enum; + this->lookup_entry = config_lookup_entry; + this->unregister_callback = config_unregister_cb; + this->dispose = config_dispose; return this; } diff --git a/src/xine-engine/info_helper.c b/src/xine-engine/info_helper.c index 05a24566c..f33f6197a 100644 --- a/src/xine-engine/info_helper.c +++ b/src/xine-engine/info_helper.c @@ -20,7 +20,7 @@ * stream metainfo helper functions * hide some xine engine details from demuxers and reduce code duplication * - * $Id: info_helper.c,v 1.13 2004/12/19 19:28:58 miguelfreitas Exp $ + * $Id: info_helper.c,v 1.14 2004/12/20 21:22:21 mroi Exp $ */ #ifdef HAVE_CONFIG_H @@ -45,7 +45,7 @@ * Compare stream_info, private and public values, * return 1 if it's identical, otherwirse 0. */ -static int __stream_info_is_identical(xine_stream_t *stream, int info) { +static int stream_info_is_identical(xine_stream_t *stream, int info) { if(stream->stream_info_public[info] == stream->stream_info[info]) return 1; @@ -56,7 +56,7 @@ static int __stream_info_is_identical(xine_stream_t *stream, int info) { /* * Check if 'info' is in bounds. */ -static int __info_valid(int info) { +static int info_valid(int info) { if ((info >= 0) && (info < XINE_STREAM_INFO_MAX)) return 1; else { @@ -65,8 +65,8 @@ static int __info_valid(int info) { } } -static void __stream_info_set_unlocked(xine_stream_t *stream, int info, int value) { - if(__info_valid(info)) +static void stream_info_set_unlocked(xine_stream_t *stream, int info, int value) { + if(info_valid(info)) stream->stream_info[info] = value; } @@ -75,7 +75,7 @@ static void __stream_info_set_unlocked(xine_stream_t *stream, int info, int valu */ void _x_stream_info_reset(xine_stream_t *stream, int info) { pthread_mutex_lock(&stream->info_mutex); - __stream_info_set_unlocked(stream, info, 0); + stream_info_set_unlocked(stream, info, 0); pthread_mutex_unlock(&stream->info_mutex); } @@ -84,7 +84,7 @@ void _x_stream_info_reset(xine_stream_t *stream, int info) { */ void _x_stream_info_public_reset(xine_stream_t *stream, int info) { pthread_mutex_lock(&stream->info_mutex); - if(__info_valid(info)) + if(info_valid(info)) stream->stream_info_public[info] = 0; pthread_mutex_unlock(&stream->info_mutex); } @@ -94,7 +94,7 @@ void _x_stream_info_public_reset(xine_stream_t *stream, int info) { */ void _x_stream_info_set(xine_stream_t *stream, int info, int value) { pthread_mutex_lock(&stream->info_mutex); - __stream_info_set_unlocked(stream, info, value); + stream_info_set_unlocked(stream, info, value); pthread_mutex_unlock(&stream->info_mutex); } @@ -119,7 +119,7 @@ uint32_t _x_stream_info_get_public(xine_stream_t *stream, int info) { pthread_mutex_lock(&stream->info_mutex); stream_info = stream->stream_info_public[info]; - if(__info_valid(info) && (!__stream_info_is_identical(stream, info))) + if(info_valid(info) && (!stream_info_is_identical(stream, info))) stream_info = stream->stream_info_public[info] = stream->stream_info[info]; pthread_mutex_unlock(&stream->info_mutex); @@ -132,7 +132,7 @@ uint32_t _x_stream_info_get_public(xine_stream_t *stream, int info) { * Remove trailing separator chars (\n,\r,\t, space,...) * at the end of the string */ -static void __chomp(char *str) { +static void meta_info_chomp(char *str) { int i, len; len = strlen(str); @@ -150,7 +150,7 @@ static void __chomp(char *str) { * Compare stream_info, public and private values, * return 1 if it's identical, otherwise 0. */ -static int __meta_info_is_identical(xine_stream_t *stream, int info) { +static int meta_info_is_identical(xine_stream_t *stream, int info) { if((!(stream->meta_info_public[info] && stream->meta_info[info])) || ((stream->meta_info_public[info] && stream->meta_info[info]) && @@ -163,7 +163,7 @@ static int __meta_info_is_identical(xine_stream_t *stream, int info) { /* * Check if 'info' is in bounds. */ -static int __meta_valid(int info) { +static int meta_valid(int info) { if ((info >= 0) && (info < XINE_STREAM_INFO_MAX)) return 1; else { @@ -175,8 +175,8 @@ static int __meta_valid(int info) { /* * Set private meta info to utf-8 string value (can be NULL). */ -static void __meta_info_set_unlocked_utf8(xine_stream_t *stream, int info, const char *value) { - if(__meta_valid(info)) { +static void meta_info_set_unlocked_utf8(xine_stream_t *stream, int info, const char *value) { + if(meta_valid(info)) { if(stream->meta_info[info]) free(stream->meta_info[info]); @@ -184,7 +184,7 @@ static void __meta_info_set_unlocked_utf8(xine_stream_t *stream, int info, const stream->meta_info[info] = (value) ? strdup(value) : NULL; if(stream->meta_info[info] && strlen(stream->meta_info[info])) - __chomp(stream->meta_info[info]); + meta_info_chomp(stream->meta_info[info]); } } @@ -192,7 +192,7 @@ static void __meta_info_set_unlocked_utf8(xine_stream_t *stream, int info, const * Set private meta info to value (can be NULL) with a given encoding. * if encoding is NULL assume locale. */ -static void __meta_info_set_unlocked_encoding(xine_stream_t *stream, int info, const char *value, const char *enc) { +static void meta_info_set_unlocked_encoding(xine_stream_t *stream, int info, const char *value, const char *enc) { #ifdef HAVE_ICONV iconv_t cd; char *system_enc = NULL; @@ -227,7 +227,7 @@ static void __meta_info_set_unlocked_encoding(xine_stream_t *stream, int info, c iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft ); *outbuf = '\0'; - __meta_info_set_unlocked_utf8(stream, info, utf8_value); + meta_info_set_unlocked_utf8(stream, info, utf8_value); free(utf8_value); iconv_close(cd); @@ -237,15 +237,15 @@ static void __meta_info_set_unlocked_encoding(xine_stream_t *stream, int info, c } #endif - __meta_info_set_unlocked_utf8(stream, info, value); + meta_info_set_unlocked_utf8(stream, info, value); } /* * Set private meta info to value (can be NULL) * value string must be provided with current locale encoding. */ -static void __meta_info_set_unlocked(xine_stream_t *stream, int info, const char *value) { - __meta_info_set_unlocked_encoding(stream, info, value, NULL); +static void meta_info_set_unlocked(xine_stream_t *stream, int info, const char *value) { + meta_info_set_unlocked_encoding(stream, info, value, NULL); } /* @@ -253,15 +253,15 @@ static void __meta_info_set_unlocked(xine_stream_t *stream, int info, const char */ void _x_meta_info_reset(xine_stream_t *stream, int info) { pthread_mutex_lock(&stream->meta_mutex); - __meta_info_set_unlocked_utf8(stream, info, NULL); + meta_info_set_unlocked_utf8(stream, info, NULL); pthread_mutex_unlock(&stream->meta_mutex); } /* * Reset (nullify) public info value. */ -static void __meta_info_public_reset_unlocked(xine_stream_t *stream, int info) { - if(__meta_valid(info)) { +static void meta_info_public_reset_unlocked(xine_stream_t *stream, int info) { + if(meta_valid(info)) { if(stream->meta_info_public[info]) free(stream->meta_info_public[info]); stream->meta_info_public[info] = NULL; @@ -269,7 +269,7 @@ static void __meta_info_public_reset_unlocked(xine_stream_t *stream, int info) { } void _x_meta_info_public_reset(xine_stream_t *stream, int info) { pthread_mutex_lock(&stream->meta_mutex); - __meta_info_public_reset_unlocked(stream, info); + meta_info_public_reset_unlocked(stream, info); pthread_mutex_unlock(&stream->meta_mutex); } @@ -279,7 +279,7 @@ void _x_meta_info_public_reset(xine_stream_t *stream, int info) { void _x_meta_info_set(xine_stream_t *stream, int info, const char *str) { pthread_mutex_lock(&stream->meta_mutex); if(str) - __meta_info_set_unlocked(stream, info, str); + meta_info_set_unlocked(stream, info, str); pthread_mutex_unlock(&stream->meta_mutex); } @@ -289,7 +289,7 @@ void _x_meta_info_set(xine_stream_t *stream, int info, const char *str) { void _x_meta_info_set_generic(xine_stream_t *stream, int info, const char *str, const char *enc) { pthread_mutex_lock(&stream->meta_mutex); if(str) - __meta_info_set_unlocked_encoding(stream, info, str, enc); + meta_info_set_unlocked_encoding(stream, info, str, enc); pthread_mutex_unlock(&stream->meta_mutex); } @@ -299,7 +299,7 @@ void _x_meta_info_set_generic(xine_stream_t *stream, int info, const char *str, void _x_meta_info_set_utf8(xine_stream_t *stream, int info, const char *str) { pthread_mutex_lock(&stream->meta_mutex); if(str) - __meta_info_set_unlocked_utf8(stream, info, str); + meta_info_set_unlocked_utf8(stream, info, str); pthread_mutex_unlock(&stream->meta_mutex); } @@ -308,11 +308,11 @@ void _x_meta_info_set_utf8(xine_stream_t *stream, int info, const char *str) { */ void _x_meta_info_n_set(xine_stream_t *stream, int info, const char *buf, int len) { pthread_mutex_lock(&stream->meta_mutex); - if(__meta_valid(info) && len) { + if(meta_valid(info) && len) { char *str = xine_xmalloc(len + 1); snprintf(str, len + 1 , "%s", buf); - __meta_info_set_unlocked(stream, info, (const char *) &str[0]); + meta_info_set_unlocked(stream, info, (const char *) &str[0]); free(str); } pthread_mutex_unlock(&stream->meta_mutex); @@ -324,7 +324,7 @@ void _x_meta_info_n_set(xine_stream_t *stream, int info, const char *buf, int le void _x_meta_info_set_multi(xine_stream_t *stream, int info, ...) { pthread_mutex_lock(&stream->meta_mutex); - if(__meta_valid(info)) { + if(meta_valid(info)) { va_list ap; char *args[1024]; char *buf; @@ -362,7 +362,7 @@ void _x_meta_info_set_multi(xine_stream_t *stream, int info, ...) { stream->meta_info[info] = p; if(stream->meta_info[info] && strlen(stream->meta_info[info])) - __chomp(stream->meta_info[info]); + meta_info_chomp(stream->meta_info[info]); } } @@ -390,8 +390,8 @@ const char *_x_meta_info_get_public(xine_stream_t *stream, int info) { pthread_mutex_lock(&stream->meta_mutex); meta_info = stream->meta_info_public[info]; - if(__meta_valid(info) && (!__meta_info_is_identical(stream, info))) { - __meta_info_public_reset_unlocked(stream, info); + if(meta_valid(info) && (!meta_info_is_identical(stream, info))) { + meta_info_public_reset_unlocked(stream, info); if(stream->meta_info[info]) stream->meta_info_public[info] = strdup(stream->meta_info[info]); diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index d30539c60..40627c9a6 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -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: post.h,v 1.21 2004/05/29 14:45:25 mroi Exp $ + * $Id: post.h,v 1.22 2004/12/20 21:22:21 mroi Exp $ * * post plugin definitions * @@ -375,19 +375,19 @@ do { \ /* macros to create parameter descriptors */ #define START_PARAM_DESCR( param_t ) \ -static param_t __temp_s; \ -static xine_post_api_parameter_t __temp_p[] = { +static param_t temp_s; \ +static xine_post_api_parameter_t temp_p[] = { #define PARAM_ITEM( param_type, var, enumv, min, max, readonly, descr ) \ -{ param_type, #var, sizeof(__temp_s.var), \ - (char *)&__temp_s.var-(char *)&__temp_s, enumv, min, max, readonly, descr }, +{ param_type, #var, sizeof(temp_s.var), \ + (char *)&temp_s.var-(char *)&temp_s, enumv, min, max, readonly, descr }, #define END_PARAM_DESCR( name ) \ { POST_PARAM_TYPE_LAST, NULL, 0, 0, NULL, 0, 0, 1, NULL } \ }; \ static xine_post_api_descr_t name = { \ - sizeof( __temp_s ), \ - __temp_p \ + sizeof( temp_s ), \ + temp_p \ }; #endif diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index acfe59c0c..57103e2d2 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.305 2004/12/16 13:59:06 mroi Exp $ + * $Id: xine.c,v 1.306 2004/12/20 21:22:21 mroi Exp $ */ /* @@ -236,7 +236,7 @@ static xine_ticket_t *ticket_init(void) { return port_ticket; } -static void __set_speed_internal (xine_stream_t *stream, int speed) { +static void set_speed_internal (xine_stream_t *stream, int speed) { xine_t *xine = stream->xine; if (xine->clock->speed != XINE_SPEED_PAUSE && speed == XINE_SPEED_PAUSE) @@ -269,7 +269,7 @@ static void __set_speed_internal (xine_stream_t *stream, int speed) { /* stream->ignore_speed_change must be set, when entering this function */ -static void __stop_internal (xine_stream_t *stream) { +static void stop_internal (xine_stream_t *stream) { lprintf ("status before = %d\n", stream->status); @@ -280,7 +280,7 @@ static void __stop_internal (xine_stream_t *stream) { } /* make sure we're not in "paused" state */ - __set_speed_internal (stream, XINE_FINE_SPEED_NORMAL); + set_speed_internal (stream, XINE_FINE_SPEED_NORMAL); /* Don't change status if we're quitting */ if (stream->status != XINE_STATUS_QUIT) @@ -310,7 +310,7 @@ void xine_stop (xine_stream_t *stream) { if (stream->video_out) stream->video_out->set_property(stream->video_out, VO_PROP_DISCARD_FRAMES, 1); - __stop_internal (stream); + stop_internal (stream); if (stream->slave && (stream->slave_affection & XINE_MASTER_SLAVE_STOP)) xine_stop(stream->slave); @@ -327,7 +327,7 @@ void xine_stop (xine_stream_t *stream) { } -static void __close_internal (xine_stream_t *stream) { +static void close_internal (xine_stream_t *stream) { int i ; @@ -348,7 +348,7 @@ static void __close_internal (xine_stream_t *stream) { if (stream->video_out) stream->video_out->set_property(stream->video_out, VO_PROP_DISCARD_FRAMES, 1); - __stop_internal( stream ); + stop_internal( stream ); if (stream->video_out) stream->video_out->set_property(stream->video_out, VO_PROP_DISCARD_FRAMES, 0); @@ -389,12 +389,12 @@ void xine_close (xine_stream_t *stream) { pthread_mutex_lock (&stream->frontend_lock); - __close_internal (stream); + close_internal (stream); pthread_mutex_unlock (&stream->frontend_lock); } -static int __stream_rewire_audio(xine_post_out_t *output, void *data) +static int stream_rewire_audio(xine_post_out_t *output, void *data) { xine_stream_t *stream = (xine_stream_t *)output->data; xine_audio_port_t *new_port = (xine_audio_port_t *)data; @@ -418,7 +418,7 @@ static int __stream_rewire_audio(xine_post_out_t *output, void *data) return 1; } -static int __stream_rewire_video(xine_post_out_t *output, void *data) +static int stream_rewire_video(xine_post_out_t *output, void *data) { xine_stream_t *stream = (xine_stream_t *)output->data; xine_video_port_t *new_port = (xine_video_port_t *)data; @@ -442,7 +442,7 @@ static int __stream_rewire_video(xine_post_out_t *output, void *data) return 1; } -void __xine_dispose_internal (xine_stream_t *stream); +void xine_dispose_internal (xine_stream_t *stream); xine_stream_t *xine_stream_new (xine_t *this, xine_audio_port_t *ao, xine_video_port_t *vo) { @@ -562,7 +562,7 @@ xine_stream_t *xine_stream_new (xine_t *this, /* * create a reference counter */ - stream->refcounter = _x_new_refcounter(stream, (refcounter_destructor)__xine_dispose_internal); + stream->refcounter = _x_new_refcounter(stream, (refcounter_destructor)xine_dispose_internal); /* * register stream @@ -575,17 +575,17 @@ xine_stream_t *xine_stream_new (xine_t *this, stream->video_source.name = "video source"; stream->video_source.type = XINE_POST_DATA_VIDEO; stream->video_source.data = stream; - stream->video_source.rewire = __stream_rewire_video; + stream->video_source.rewire = stream_rewire_video; stream->audio_source.name = "audio source"; stream->audio_source.type = XINE_POST_DATA_AUDIO; stream->audio_source.data = stream; - stream->audio_source.rewire = __stream_rewire_audio; + stream->audio_source.rewire = stream_rewire_audio; return stream; } -static void __mrl_unescape(char *mrl) { +static void mrl_unescape(char *mrl) { int i, len = strlen(mrl); for (i = 0; i < len; i++) { @@ -625,7 +625,7 @@ void _x_flush_events_queues (xine_stream_t *stream) { pthread_mutex_unlock (&stream->event_queues_lock); } -static int __open_internal (xine_stream_t *stream, const char *mrl) { +static int open_internal (xine_stream_t *stream, const char *mrl) { const char *stream_setup; int no_cache = 0; @@ -643,7 +643,7 @@ static int __open_internal (xine_stream_t *stream, const char *mrl) { * stop engine if necessary */ - __close_internal (stream); + close_internal (stream); lprintf ("engine should be stopped now\n"); @@ -714,7 +714,7 @@ static int __open_internal (xine_stream_t *stream, const char *mrl) { memcpy(demux_name, tmp, strlen(tmp)); demux_name[strlen(tmp)] = '\0'; } - __mrl_unescape(demux_name); + mrl_unescape(demux_name); if (!(stream->demux_plugin = _x_find_demux_plugin_by_name(stream, demux_name, stream->input_plugin))) { xine_log(stream->xine, XINE_LOG_MSG, _("xine: specified demuxer %s failed to start\n"), demux_name); stream->err = XINE_ERROR_NO_DEMUX_PLUGIN; @@ -786,7 +786,7 @@ static int __open_internal (xine_stream_t *stream, const char *mrl) { memcpy(demux_name, tmp, strlen(tmp)); demux_name[strlen(tmp)] = '\0'; } - __mrl_unescape(demux_name); + mrl_unescape(demux_name); if (!(stream->demux_plugin = _x_find_demux_plugin_last_probe(stream, demux_name, stream->input_plugin))) { xine_log(stream->xine, XINE_LOG_MSG, _("xine: last_probed demuxer %s failed to start\n"), demux_name); stream->err = XINE_ERROR_NO_DEMUX_PLUGIN; @@ -873,7 +873,7 @@ static int __open_internal (xine_stream_t *stream, const char *mrl) { memcpy(volume, tmp, strlen(tmp)); volume[strlen(tmp)] = '\0'; } - __mrl_unescape(volume); + mrl_unescape(volume); xine_set_param(stream, XINE_PARAM_AUDIO_VOLUME, atoi(volume)); free(volume); } else { @@ -898,7 +898,7 @@ static int __open_internal (xine_stream_t *stream, const char *mrl) { memcpy(compression, tmp, strlen(tmp)); compression[strlen(tmp)] = '\0'; } - __mrl_unescape(compression); + mrl_unescape(compression); xine_set_param(stream, XINE_PARAM_AUDIO_COMPR_LEVEL, atoi(compression)); free(compression); } else { @@ -923,7 +923,7 @@ static int __open_internal (xine_stream_t *stream, const char *mrl) { memcpy(subtitle_mrl, tmp, strlen(tmp)); subtitle_mrl[strlen(tmp)] = '\0'; } - __mrl_unescape(subtitle_mrl); + mrl_unescape(subtitle_mrl); stream->slave = xine_stream_new (stream->xine, NULL, stream->video_out ); stream->slave_affection = XINE_MASTER_SLAVE_PLAY | XINE_MASTER_SLAVE_STOP; if( xine_open( stream->slave, subtitle_mrl ) ) { @@ -958,7 +958,7 @@ static int __open_internal (xine_stream_t *stream, const char *mrl) { memcpy(config_entry, tmp, strlen(tmp)); config_entry[strlen(tmp)] = '\0'; } - __mrl_unescape(config_entry); + mrl_unescape(config_entry); retval = _x_config_change_opt(stream->xine->config, config_entry); if (retval <= 0) { if (retval == 0) { @@ -1057,14 +1057,14 @@ int xine_open (xine_stream_t *stream, const char *mrl) { lprintf ("open MRL:%s\n", mrl); - ret = __open_internal (stream, mrl); + ret = open_internal (stream, mrl); pthread_mutex_unlock (&stream->frontend_lock); return ret; } -static void __wait_first_frame (xine_stream_t *stream) { +static void wait_first_frame (xine_stream_t *stream) { if (stream->video_decoder_plugin) { pthread_mutex_lock (&stream->first_frame_lock); if (stream->first_frame_flag > 0) { @@ -1079,7 +1079,7 @@ static void __wait_first_frame (xine_stream_t *stream) { } } -static int __play_internal (xine_stream_t *stream, int start_pos, int start_time) { +static int play_internal (xine_stream_t *stream, int start_pos, int start_time) { int demux_status; int demux_thread_running; @@ -1098,7 +1098,7 @@ static int __play_internal (xine_stream_t *stream, int start_pos, int start_time /* set normal speed */ if (_x_get_speed(stream) != XINE_SPEED_NORMAL) - __set_speed_internal (stream, XINE_FINE_SPEED_NORMAL); + set_speed_internal (stream, XINE_FINE_SPEED_NORMAL); stream->xine->port_ticket->acquire(stream->xine->port_ticket, 1); @@ -1120,7 +1120,7 @@ static int __play_internal (xine_stream_t *stream, int start_pos, int start_time * the engine is not paused. */ if (_x_get_speed(stream) != XINE_SPEED_NORMAL) - __set_speed_internal (stream, XINE_FINE_SPEED_NORMAL); + set_speed_internal (stream, XINE_FINE_SPEED_NORMAL); /* * start/seek demux @@ -1174,9 +1174,9 @@ static int __play_internal (xine_stream_t *stream, int start_pos, int start_time /* Wait until the first frame produced is displayed * see video_out.c */ - __wait_first_frame (stream); + wait_first_frame (stream); - xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "__play_internal ...done\n"); + xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "play_internal ...done\n"); return 1; } @@ -1187,7 +1187,7 @@ int xine_play (xine_stream_t *stream, int start_pos, int start_time) { pthread_mutex_lock (&stream->frontend_lock); - ret = __play_internal (stream, start_pos, start_time); + ret = play_internal (stream, start_pos, start_time); if( stream->slave && (stream->slave_affection & XINE_MASTER_SLAVE_PLAY) ) xine_play (stream->slave, start_pos, start_time); @@ -1218,7 +1218,7 @@ int xine_eject (xine_stream_t *stream) { return status; } -void __xine_dispose_internal (xine_stream_t *stream) { +void xine_dispose_internal (xine_stream_t *stream) { xine_stream_t *s; @@ -1256,7 +1256,7 @@ void __xine_dispose_internal (xine_stream_t *stream) { void xine_dispose (xine_stream_t *stream) { /* decrease the reference counter - * if there is no more reference on this stream, the __xine_dispose_internal + * if there is no more reference on this stream, the xine_dispose_internal * function is called */ xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "xine_dispose\n"); @@ -1408,13 +1408,13 @@ int xine_engine_get_param(xine_t *this, int param) { return -1; } -static void __config_demux_strategy_cb (void *this_gen, xine_cfg_entry_t *entry) { +static void config_demux_strategy_cb (void *this_gen, xine_cfg_entry_t *entry) { xine_t *this = (xine_t *)this_gen; this->demux_strategy = entry->num_value; } -static void __config_save_cb (void *this_gen, xine_cfg_entry_t *entry) { +static void config_save_cb (void *this_gen, xine_cfg_entry_t *entry) { xine_t *this = (xine_t *)this_gen; char *homedir_trail_slash; @@ -1476,7 +1476,7 @@ void xine_init (xine_t *this) { "Detect by content only.\n\n" "extension\n" "Detect by file name extension only.\n"), - 20, __config_demux_strategy_cb, this); + 20, config_demux_strategy_cb, this); /* * save directory @@ -1489,7 +1489,7 @@ void xine_init (xine_t *this) { "This setting is security critical, because when changed to a different directory, xine " "can be used to fill files in it with arbitrary content. So you should be careful that " "the directory you specify is robust against any content in any file."), - XINE_CONFIG_SECURITY, __config_save_cb, this); + XINE_CONFIG_SECURITY, config_save_cb, this); /* * implicit configuration changes @@ -1560,7 +1560,7 @@ void _x_select_spu_channel (xine_stream_t *stream, int channel) { pthread_mutex_unlock (&stream->frontend_lock); } -static int __get_current_position (xine_stream_t *stream) { +static int get_current_position (xine_stream_t *stream) { int pos; @@ -1618,10 +1618,10 @@ void _x_set_fine_speed (xine_stream_t *stream, int speed) { speed = XINE_SPEED_PAUSE; xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "set_speed %d\n", speed); - __set_speed_internal (stream, speed); + set_speed_internal (stream, speed); if (stream->slave && (stream->slave_affection & XINE_MASTER_SLAVE_SPEED)) - __set_speed_internal (stream->slave, speed); + set_speed_internal (stream->slave, speed); } int _x_get_fine_speed (xine_stream_t *stream) { @@ -1663,7 +1663,7 @@ int _x_get_speed (xine_stream_t *stream) { * time measurement / seek */ -static int __get_stream_length (xine_stream_t *stream) { +static int get_stream_length (xine_stream_t *stream) { /* pthread_mutex_lock( &stream->demux_lock ); */ @@ -1682,7 +1682,7 @@ static int __get_stream_length (xine_stream_t *stream) { int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, int *pos_time, int *length_time) { - int pos = __get_current_position (stream); /* force updating extra_info */ + int pos = get_current_position (stream); /* force updating extra_info */ if (pos == -1) return 0; @@ -1695,7 +1695,7 @@ int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, pthread_mutex_unlock( &stream->current_extra_info_lock ); } if (length_time) - *length_time = __get_stream_length (stream); + *length_time = get_stream_length (stream); return 1; } diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 04b5ce630..9181e4026 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.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_interface.c,v 1.86 2004/12/19 20:24:31 miguelfreitas Exp $ + * $Id: xine_interface.c,v 1.87 2004/12/20 21:22:22 mroi Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -170,7 +170,7 @@ int xine_config_register_bool (xine_t *self, * and return status */ -static int __config_get_current_entry (xine_t *this, xine_cfg_entry_t *entry) { +static int config_get_current_entry (xine_t *this, xine_cfg_entry_t *entry) { config_values_t *config = this->config; @@ -209,7 +209,7 @@ int xine_config_get_first_entry (xine_t *this, xine_cfg_entry_t *entry) { /* do not hand out unclaimed entries */ while (config->cur && config->cur->type == XINE_CONFIG_TYPE_UNKNOWN) config->cur = config->cur->next; - result = __config_get_current_entry (this, entry); + result = config_get_current_entry (this, entry); pthread_mutex_unlock(&config->config_lock); return result; @@ -235,7 +235,7 @@ int xine_config_get_next_entry (xine_t *this, xine_cfg_entry_t *entry) { do { config->cur = config->cur->next; } while (config->cur && config->cur->type == XINE_CONFIG_TYPE_UNKNOWN); - result = __config_get_current_entry (this, entry); + result = config_get_current_entry (this, entry); pthread_mutex_unlock(&config->config_lock); return result; @@ -256,7 +256,7 @@ int xine_config_lookup_entry (xine_t *this, const char *key, /* do not hand out unclaimed entries */ if (config->cur && config->cur->type == XINE_CONFIG_TYPE_UNKNOWN) config->cur = NULL; - result = __config_get_current_entry (this, entry); + result = config_get_current_entry (this, entry); pthread_mutex_unlock(&config->config_lock); return result; |