diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/configfile.c | 28 | ||||
-rw-r--r-- | src/xine-engine/configfile.h | 26 | ||||
-rw-r--r-- | src/xine-engine/events.c | 6 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 14 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 33 | ||||
-rw-r--r-- | src/xine-engine/xine_interface.c | 34 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 10 |
7 files changed, 74 insertions, 77 deletions
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 35cd9b44a..f4742df89 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.26 2002/09/08 22:11:41 mroi Exp $ + * $Id: configfile.c,v 1.27 2002/09/09 19:24:48 f1rmb Exp $ * * config object (was: file) management - implementation * @@ -91,7 +91,7 @@ static cfg_entry_t *xine_config_add (config_values_t *this, char *key) { * external interface */ -static cfg_entry_t *_xine_config_lookup_entry (config_values_t *this, const char *key) { +static cfg_entry_t *_xine_config_lookup_entry (config_values_t *this, char *key) { cfg_entry_t *entry; entry = this->first; @@ -108,8 +108,8 @@ static char *_xine_config_register_string (config_values_t *this, char *description, char *help, int exp_level, - const xine_config_cb_t changed_cb, - const void *const cb_data) { + xine_config_cb_t changed_cb, + void *cb_data) { cfg_entry_t *entry; @@ -171,8 +171,8 @@ static int _xine_config_register_num (config_values_t *this, char *description, char *help, int exp_level, - const xine_config_cb_t changed_cb, - const void *const cb_data) { + xine_config_cb_t changed_cb, + void *cb_data) { cfg_entry_t *entry; @@ -226,8 +226,8 @@ static int _xine_config_register_bool (config_values_t *this, char *description, char *help, int exp_level, - const xine_config_cb_t changed_cb, - const void *const cb_data) { + xine_config_cb_t changed_cb, + void *const cb_data) { cfg_entry_t *entry; @@ -282,8 +282,8 @@ static int _xine_config_register_range (config_values_t *this, char *description, char *help, int exp_level, - const xine_config_cb_t changed_cb, - const void *const cb_data) { + xine_config_cb_t changed_cb, + void *cb_data) { cfg_entry_t *entry; @@ -369,8 +369,8 @@ static int _xine_config_register_enum (config_values_t *this, char *description, char *help, int exp_level, - const xine_config_cb_t changed_cb, - const void *const cb_data) { + xine_config_cb_t changed_cb, + void *cb_data) { cfg_entry_t *entry; @@ -498,7 +498,7 @@ static void xine_config_update_string (config_values_t *this, /* * load/save config data from/to afile (e.g. $HOME/.xine/config) */ -void xine_load_config (xine_p xine_ro, const char *filename) { +void xine_load_config (xine_p xine_ro, char *filename) { config_values_t *this = xine_ro->config; FILE *f_config; @@ -557,7 +557,7 @@ void xine_load_config (xine_p xine_ro, const char *filename) { } } -void xine_save_config (xine_p xine_ro, const char *filename) { +void xine_save_config (xine_p xine_ro, char *filename) { config_values_t *this = xine_ro->config; FILE *f_config; diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h index 978c009c4..e2c17f1b6 100644 --- a/src/xine-engine/configfile.h +++ b/src/xine-engine/configfile.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: configfile.h,v 1.13 2002/09/06 18:13:11 mroi Exp $ + * $Id: configfile.h,v 1.14 2002/09/09 19:24:48 f1rmb Exp $ * * config file management * @@ -73,7 +73,7 @@ struct cfg_entry_s { /* callback function and data for live changeable values */ xine_config_cb_t callback; - const void *callback_data; + void *callback_data; }; /* @@ -105,7 +105,7 @@ struct config_values_s { char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data); + void *cb_data); int (*register_range) (config_values_t *this, char *key, @@ -115,7 +115,7 @@ struct config_values_s { char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data); + void *cb_data); int (*register_enum) (config_values_t *this, char *key, @@ -125,7 +125,7 @@ struct config_values_s { char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data); + void *cb_data); int (*register_num) (config_values_t *this, char *key, @@ -134,7 +134,7 @@ struct config_values_s { char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data); + void *cb_data); int (*register_bool) (config_values_t *this, char *key, @@ -143,15 +143,13 @@ struct config_values_s { char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data); + void *cb_data); /* convenience function to update range, enum, num and bool values */ - void (*update_num) (config_values_t *this, - char *key, int value); + void (*update_num) (config_values_t *this, char *key, int value); /* convenience function to update string values */ - void (*update_string) (config_values_t *this, - char *key, char *value); + void (*update_string) (config_values_t *this, char *key, char *value); /* small utility function for enum handling */ int (*parse_enum) (char *str, char **values); @@ -163,14 +161,12 @@ struct config_values_s { * and you changed the value of this item */ - cfg_entry_t* (*lookup_entry) (config_values_t *this, - const char *key); + cfg_entry_t* (*lookup_entry) (config_values_t *this, char *key); /* * unregister callback function */ - void (*unregister_callback) (config_values_t *this, - char *key); + void (*unregister_callback) (config_values_t *this, char *key); /* * config values are stored here: diff --git a/src/xine-engine/events.c b/src/xine-engine/events.c index 8f3f5eb6a..0776fcb77 100644 --- a/src/xine-engine/events.c +++ b/src/xine-engine/events.c @@ -30,8 +30,8 @@ #include "xine_internal.h" int xine_register_event_listener (xine_p this_ro, - const xine_event_listener_cb_t listener, - const void *const user_data) { + xine_event_listener_cb_t listener, + void *user_data) { xine_t *this = (xine_t *)this_ro; /* Ensure the listener is non-NULL */ if(listener == NULL) { @@ -62,7 +62,7 @@ void xine_send_event(xine_p this, xine_event_t *event) { } int xine_remove_event_listener(xine_p this_ro, - const xine_event_listener_cb_t listener) { + xine_event_listener_cb_t listener) { xine_t *this = (xine_t *)this_ro; uint16_t i, found; diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index c37ce00df..d59cf1916 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.88 2002/09/09 15:12:59 mroi Exp $ + * $Id: load_plugins.c,v 1.89 2002/09/09 19:24:48 f1rmb Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -597,7 +597,7 @@ const char *const *xine_get_browsable_input_plugin_ids(xine_p this) { return (_xine_get_featured_input_plugin_ids(this, INPUT_CAP_GET_DIR)); } -const char *xine_get_input_plugin_description(xine_p this, const char *plugin_id) { +const char *xine_get_input_plugin_description(xine_p this, char *plugin_id) { plugin_catalog_t *catalog; plugin_node_t *node; @@ -623,7 +623,7 @@ const char *xine_get_input_plugin_description(xine_p this, const char *plugin_id */ xine_vo_driver_p xine_open_video_driver (xine_p this_ro, - const char *id, + char *id, int visual_type, void *visual) { xine_t *this = (xine_t *)this_ro; @@ -716,7 +716,7 @@ const char *const *xine_list_video_output_plugins (xine_p this) { return catalog->ids; } -xine_ao_driver_p xine_open_audio_driver (xine_p this_ro, const char *id, +xine_ao_driver_p xine_open_audio_driver (xine_p this_ro, char *id, void *data) { xine_t *this = (xine_t *)this_ro; @@ -758,7 +758,7 @@ xine_ao_driver_p xine_open_audio_driver (xine_p this_ro, const char *id, * get autoplay mrl list from input plugin */ -const char *const *xine_get_autoplay_mrls (xine_p this, const char *plugin_id, int *num_mrls) { +const char *const *xine_get_autoplay_mrls (xine_p this, char *plugin_id, int *num_mrls) { plugin_catalog_t *catalog; plugin_node_t *node; @@ -787,8 +787,8 @@ const char *const *xine_get_autoplay_mrls (xine_p this, const char *plugin_id, i /* * input plugin mrl browser support */ -const xine_mrl_t *const *xine_get_browse_mrls (xine_p this, const char *plugin_id, - const char *start_mrl, int *num_mrls) { +const xine_mrl_t *const *xine_get_browse_mrls (xine_p this, char *plugin_id, + char *start_mrl, int *num_mrls) { plugin_catalog_t *catalog; plugin_node_t *node; diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index b796adaa4..ae111a4b1 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.152 2002/09/06 18:13:12 mroi Exp $ + * $Id: xine.c,v 1.153 2002/09/09 19:24:48 f1rmb Exp $ * * top-level xine functions * @@ -150,14 +150,14 @@ void xine_report_codec( xine_t *this, int codec_type, uint32_t fourcc, uint32_t if( !buf_type ) buf_type = fourcc_to_buf_video( fourcc ); - this->report_codec_cb( (void *)this->report_codec_user_data, + this->report_codec_cb( this->report_codec_user_data, codec_type, fourcc, buf_video_name( buf_type ), handled ); } else { if( !buf_type ) buf_type = formattag_to_buf_audio( fourcc ); - this->report_codec_cb( (void *)this->report_codec_user_data, + this->report_codec_cb( this->report_codec_user_data, codec_type, fourcc, buf_audio_name( buf_type ), handled ); } @@ -165,8 +165,8 @@ void xine_report_codec( xine_t *this, int codec_type, uint32_t fourcc, uint32_t } int xine_register_report_codec_cb(xine_p this_ro, - const xine_report_codec_cb_t report_codec, - const void *const user_data) { + xine_report_codec_cb_t report_codec, + void *user_data) { xine_t *this = (xine_t *)this_ro; this->report_codec_cb = report_codec; @@ -288,7 +288,7 @@ void xine_stop (xine_p this_ro) { /* * demuxer probing */ -static int probe_demux (xine_t *this, const char *MRL, int stage1, int stage2) { +static int probe_demux (xine_t *this, int stage1, int stage2) { int i; int stages[3]; @@ -331,31 +331,31 @@ static int probe_demux (xine_t *this, const char *MRL, int stage1, int stage2) { } /* - * try to find a demuxer which handle the MRL stream + * try to find a demuxer which handle current mrl. */ -static int find_demuxer(xine_t *this, const char *MRL) { +static int find_demuxer(xine_t *this) { this->cur_demuxer_plugin = NULL; switch (this->demux_strategy) { case DEMUX_DEFAULT_STRATEGY: - if (probe_demux (this, MRL, STAGE_BY_CONTENT, STAGE_BY_EXTENSION)) + if (probe_demux (this, STAGE_BY_CONTENT, STAGE_BY_EXTENSION)) return 1; break; case DEMUX_REVERT_STRATEGY: - if (probe_demux (this, MRL, STAGE_BY_EXTENSION, STAGE_BY_CONTENT)) + if (probe_demux (this, STAGE_BY_EXTENSION, STAGE_BY_CONTENT)) return 1; break; case DEMUX_CONTENT_STRATEGY: - if (probe_demux (this, MRL, STAGE_BY_CONTENT, -1)) + if (probe_demux (this, STAGE_BY_CONTENT, -1)) return 1; break; case DEMUX_EXTENSION_STRATEGY: - if (probe_demux (this, MRL, STAGE_BY_EXTENSION, -1)) + if (probe_demux (this, STAGE_BY_EXTENSION, -1)) return 1; break; } @@ -363,7 +363,7 @@ static int find_demuxer(xine_t *this, const char *MRL) { return 0; } -int xine_open_internal (xine_t *this, const char *mrl) { +int xine_open_internal (xine_t *this, char *mrl) { printf ("xine_open: mrl '%s'\n", mrl); @@ -454,7 +454,7 @@ int xine_open_internal (xine_t *this, const char *mrl) { * find demuxer plugin */ - if (!find_demuxer(this, mrl)) { + if (!find_demuxer(this)) { xine_log (this, XINE_LOG_FORMAT, _("xine: couldn't find demuxer for >%s<\n"), mrl); this->cur_input_plugin->close(this->cur_input_plugin); @@ -467,6 +467,7 @@ int xine_open_internal (xine_t *this, const char *mrl) { this->cur_demuxer_plugin->get_identifier()); } +#warning ?? limited length ??? strncpy (this->cur_mrl, mrl, 1024); printf ("xine: xine_open done.\n"); @@ -527,7 +528,7 @@ int xine_play_internal (xine_t *this, int start_pos, int start_time) { return 1; } -int xine_open (xine_p this_ro, const char *mrl) { +int xine_open (xine_p this_ro, char *mrl) { xine_t *this = (xine_t *)this_ro; int ret; @@ -1098,7 +1099,7 @@ const char *const *xine_get_log (xine_p this_ro, int buf) { return this->log_buffers[buf]->get_content (this->log_buffers[buf]); } -void xine_register_log_cb (xine_p this_ro, const xine_log_cb_t cb, const void *const user_data) { +void xine_register_log_cb (xine_p this_ro, xine_log_cb_t cb, void *user_data) { printf ("xine: xine_register_log_cb: not implemented yet.\n"); abort(); diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 570b0f2c2..524e43206 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.7 2002/09/09 13:55:57 mroi Exp $ + * $Id: xine_interface.c,v 1.8 2002/09/09 19:24:48 f1rmb Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -75,14 +75,14 @@ int xine_check_version(int major, int minor, int sub) { */ const char* xine_config_register_string (xine_p self, - char *key, - char *def_value, - char *description, - char *help, - int exp_level, - xine_config_cb_t changed_cb, - const void *const cb_data) { - + char *key, + char *def_value, + char *description, + char *help, + int exp_level, + xine_config_cb_t changed_cb, + void *cb_data) { + return self->config->register_string (self->config, key, def_value, @@ -102,7 +102,7 @@ int xine_config_register_range (xine_p self, char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data) { + void *cb_data) { return self->config->register_range (self->config, key, def_value, min, max, description, help, exp_level, @@ -118,7 +118,7 @@ int xine_config_register_enum (xine_p self, char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data) { + void *cb_data) { return self->config->register_enum (self->config, key, def_value, values, description, help, exp_level, @@ -133,13 +133,13 @@ int xine_config_register_num (xine_p self, char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data) { + void *cb_data) { return self->config->register_num (self->config, key, def_value, description, help, exp_level, changed_cb, cb_data); } - + int xine_config_register_bool (xine_p self, char *key, @@ -148,7 +148,7 @@ int xine_config_register_bool (xine_p self, char *help, int exp_level, xine_config_cb_t changed_cb, - const void *const cb_data) { + void *cb_data) { return self->config->register_bool (self->config, key, def_value, description, help, exp_level, @@ -223,7 +223,7 @@ xine_cfg_entry_t *xine_config_get_next_entry (xine_p this) { * search for a config entry by key */ -xine_cfg_entry_t *xine_config_lookup_entry (xine_p this, const char *key) { +xine_cfg_entry_t *xine_config_lookup_entry (xine_p this, char *key) { config_values_t *config = this->config; @@ -236,7 +236,7 @@ xine_cfg_entry_t *xine_config_lookup_entry (xine_p this, const char *key) { /* * update a config entry (which was returned from lookup_entry() ) */ -void xine_config_update_entry (xine_p this, xine_cfg_entry_t *entry){ +void xine_config_update_entry (xine_p this, xine_cfg_entry_t *entry) { printf ("xine_interface: xine_config_update_entry: not implemented\n"); switch (entry->type) { @@ -259,7 +259,7 @@ void xine_config_update_entry (xine_p this, xine_cfg_entry_t *entry){ } -void xine_reset_config (xine_p this){ +void xine_reset_config (xine_p this) { config_values_t *config = this->config; cfg_entry_t *entry; diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index ad6a7b233..4dce3aa88 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.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: xine_internal.h,v 1.96 2002/09/06 18:13:12 mroi Exp $ + * $Id: xine_internal.h,v 1.97 2002/09/09 19:24:48 f1rmb Exp $ * */ @@ -149,7 +149,7 @@ struct xine_s { config_values_t *config; /* MRL of displayed logo */ - const char *logo_mrl; + char *logo_mrl; /* Logo manipulation mutex */ pthread_mutex_t logo_lock; @@ -218,7 +218,7 @@ struct xine_s { /* Array of event handlers. */ xine_event_listener_cb_t event_listeners[XINE_MAX_EVENT_LISTENERS]; - const void *event_listener_user_data[XINE_MAX_EVENT_LISTENERS]; + void *event_listener_user_data[XINE_MAX_EVENT_LISTENERS]; uint16_t num_event_listeners; /* scratch string buffer */ @@ -233,7 +233,7 @@ struct xine_s { int finished_thread_running; xine_report_codec_cb_t report_codec_cb; - const void *report_codec_user_data; + void *report_codec_user_data; int playing_logo; int curtime_needed_for_osd; @@ -244,7 +244,7 @@ struct xine_s { * private function prototypes: */ -int xine_open_internal (xine_t *this, const char *MRL); +int xine_open_internal (xine_t *this, char *mrl); int xine_play_internal (xine_t *this, int start_pos, int start_time); void xine_stop_internal (xine_t *this); |