summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-09-06 18:13:10 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-09-06 18:13:10 +0000
commit6c4cd36cc5ced530a387327c4f6c576074424c6c (patch)
tree335cf36c9732583e317983a126ec508e2d08ce0b /src/xine-engine
parent75dc355377ef3cc01cfec10a1872ad64eee154ae (diff)
downloadxine-lib-6c4cd36cc5ced530a387327c4f6c576074424c6c.tar.gz
xine-lib-6c4cd36cc5ced530a387327c4f6c576074424c6c.tar.bz2
introduce "const"
fix some input plugins that would not copy the mrl on open CVS patchset: 2623 CVS date: 2002/09/06 18:13:10
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/configfile.c34
-rw-r--r--src/xine-engine/configfile.h18
-rw-r--r--src/xine-engine/events.c16
-rw-r--r--src/xine-engine/load_plugins.c36
-rw-r--r--src/xine-engine/plugin_catalog.h4
-rw-r--r--src/xine-engine/scratch.c4
-rw-r--r--src/xine-engine/scratch.h16
-rw-r--r--src/xine-engine/xine.c80
-rw-r--r--src/xine-engine/xine_interface.c43
-rw-r--r--src/xine-engine/xine_internal.h12
10 files changed, 141 insertions, 122 deletions
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index 618c596ff..86edf6bc3 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.24 2002/09/04 23:31:13 guenter Exp $
+ * $Id: configfile.c,v 1.25 2002/09/06 18:13:11 mroi Exp $
*
* config object (was: file) management - implementation
*
@@ -90,7 +90,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, char *key) {
+static cfg_entry_t *_xine_config_lookup_entry (config_values_t *this, const char *key) {
cfg_entry_t *entry;
entry = this->first;
@@ -107,8 +107,8 @@ static char *_xine_config_register_string (config_values_t *this,
char *description,
char *help,
int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+ const xine_config_cb_t changed_cb,
+ const void *const cb_data) {
cfg_entry_t *entry;
@@ -170,8 +170,8 @@ static int _xine_config_register_num (config_values_t *this,
char *description,
char *help,
int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+ const xine_config_cb_t changed_cb,
+ const void *const cb_data) {
cfg_entry_t *entry;
@@ -225,8 +225,8 @@ static int _xine_config_register_bool (config_values_t *this,
char *description,
char *help,
int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+ const xine_config_cb_t changed_cb,
+ const void *const cb_data) {
cfg_entry_t *entry;
@@ -281,8 +281,8 @@ static int _xine_config_register_range (config_values_t *this,
char *description,
char *help,
int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+ const xine_config_cb_t changed_cb,
+ const void *const cb_data) {
cfg_entry_t *entry;
@@ -368,8 +368,8 @@ static int _xine_config_register_enum (config_values_t *this,
char *description,
char *help,
int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+ const xine_config_cb_t changed_cb,
+ const void *const cb_data) {
cfg_entry_t *entry;
@@ -497,9 +497,9 @@ 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_t *x, char *filename) {
+void xine_load_config (xine_p xine_ro, const char *filename) {
- config_values_t *this = x->config;
+ config_values_t *this = xine_ro->config;
FILE *f_config;
#ifdef LOG
@@ -536,9 +536,9 @@ void xine_load_config (xine_t *x, char *filename) {
}
}
-void xine_save_config (xine_t *x, char *filename) {
+void xine_save_config (xine_p xine_ro, const char *filename) {
- config_values_t *this = x->config;
+ config_values_t *this = xine_ro->config;
FILE *f_config;
#ifdef LOG
@@ -697,7 +697,7 @@ config_values_t *xine_config_init () {
return this;
}
-int xine_config_change_opt(config_values_t *config, char *opt) {
+int xine_config_change_opt(config_values_t *config, const char *opt) {
cfg_entry_t *entry;
int handled = 0;
diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h
index 14e6fd4d7..978c009c4 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.12 2002/09/04 23:31:13 guenter Exp $
+ * $Id: configfile.h,v 1.13 2002/09/06 18:13:11 mroi 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;
- void *callback_data;
+ const void *callback_data;
};
/*
@@ -105,7 +105,7 @@ struct config_values_s {
char *help,
int exp_level,
xine_config_cb_t changed_cb,
- void *cb_data);
+ const void *const 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,
- void *cb_data);
+ const void *const 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,
- void *cb_data);
+ const void *const 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,
- void *cb_data);
+ const void *const cb_data);
int (*register_bool) (config_values_t *this,
char *key,
@@ -143,7 +143,7 @@ struct config_values_s {
char *help,
int exp_level,
xine_config_cb_t changed_cb,
- void *cb_data);
+ const void *const cb_data);
/* convenience function to update range, enum, num and bool values */
void (*update_num) (config_values_t *this,
@@ -164,7 +164,7 @@ struct config_values_s {
*/
cfg_entry_t* (*lookup_entry) (config_values_t *this,
- char *key);
+ const char *key);
/*
* unregister callback function
@@ -188,7 +188,7 @@ config_values_t *xine_config_init ();
* hack: intepret "opt:"-style mrls for config value changes
*/
-int xine_config_change_opt(config_values_t *config, char *opt) ;
+int xine_config_change_opt(config_values_t *config, const char *opt) ;
#ifdef __cplusplus
diff --git a/src/xine-engine/events.c b/src/xine-engine/events.c
index 623a984fc..8f3f5eb6a 100644
--- a/src/xine-engine/events.c
+++ b/src/xine-engine/events.c
@@ -29,9 +29,10 @@
#include "xine_internal.h"
-int xine_register_event_listener (xine_t *this,
- xine_event_listener_cb_t listener,
- void *user_data) {
+int xine_register_event_listener (xine_p this_ro,
+ const xine_event_listener_cb_t listener,
+ const void *const user_data) {
+ xine_t *this = (xine_t *)this_ro;
/* Ensure the listener is non-NULL */
if(listener == NULL) {
return 0;
@@ -51,17 +52,18 @@ int xine_register_event_listener (xine_t *this,
return 0;
}
-void xine_send_event(xine_t *this, xine_event_t *event) {
+void xine_send_event(xine_p this, xine_event_t *event) {
uint16_t i;
/* Itterate through all event handlers */
for(i=0; i < this->num_event_listeners; i++) {
- (this->event_listeners[i]) (this->event_listener_user_data[i], event);
+ (this->event_listeners[i]) ((void *)this->event_listener_user_data[i], event);
}
}
-int xine_remove_event_listener(xine_t *this,
- xine_event_listener_cb_t listener) {
+int xine_remove_event_listener(xine_p this_ro,
+ const xine_event_listener_cb_t listener) {
+ xine_t *this = (xine_t *)this_ro;
uint16_t i, found;
found = 1; i = 0;
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 676aa6c3d..cd7710008 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.84 2002/09/06 13:15:02 guenter Exp $
+ * $Id: load_plugins.c,v 1.85 2002/09/06 18:13:11 mroi Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -557,7 +557,7 @@ void scan_plugins (xine_t *this) {
map_decoders (this);
}
-static char **_xine_get_featured_input_plugin_ids(xine_t *this, int feature) {
+static const char **_xine_get_featured_input_plugin_ids(xine_p this, int feature) {
plugin_catalog_t *catalog;
int i;
@@ -585,17 +585,17 @@ static char **_xine_get_featured_input_plugin_ids(xine_t *this, int feature) {
return catalog->ids;
}
-char **xine_get_autoplay_input_plugin_ids(xine_t *this) {
+const char *const *xine_get_autoplay_input_plugin_ids(xine_p this) {
return (_xine_get_featured_input_plugin_ids(this, INPUT_CAP_AUTOPLAY));
}
-char **xine_get_browsable_input_plugin_ids(xine_t *this) {
+const char *const *xine_get_browsable_input_plugin_ids(xine_p this) {
return (_xine_get_featured_input_plugin_ids(this, INPUT_CAP_GET_DIR));
}
-char *xine_get_input_plugin_description(xine_t *this, char *plugin_id) {
+const char *xine_get_input_plugin_description(xine_p this, const char *plugin_id) {
plugin_catalog_t *catalog;
plugin_node_t *node;
@@ -619,10 +619,11 @@ char *xine_get_input_plugin_description(xine_t *this, char *plugin_id) {
* video out plugins section
*/
-xine_vo_driver_t *xine_open_video_driver (xine_t *this,
- char *id,
- int visual_type, void *visual) {
-
+xine_vo_driver_p xine_open_video_driver (xine_p this_ro,
+ const char *id,
+ int visual_type, void *visual) {
+ xine_t *this = (xine_t *)this_ro;
+
plugin_node_t *node;
xine_vo_driver_t *driver;
vo_info_t *vo_info;
@@ -664,7 +665,7 @@ xine_vo_driver_t *xine_open_video_driver (xine_t *this,
* audio output plugins section
*/
-char **xine_list_audio_output_plugins (xine_t *this) {
+const char *const *xine_list_audio_output_plugins (xine_p this) {
plugin_catalog_t *catalog;
int i;
@@ -688,7 +689,7 @@ char **xine_list_audio_output_plugins (xine_t *this) {
return catalog->ids;
}
-char **xine_list_video_output_plugins (xine_t *this) {
+const char *const *xine_list_video_output_plugins (xine_p this) {
plugin_catalog_t *catalog;
int i;
@@ -712,9 +713,10 @@ char **xine_list_video_output_plugins (xine_t *this) {
return catalog->ids;
}
-xine_ao_driver_t *xine_open_audio_driver (xine_t *this, char *id,
- void *data) {
-
+xine_ao_driver_p xine_open_audio_driver (xine_p this_ro, const char *id,
+ void *data) {
+ xine_t *this = (xine_t *)this_ro;
+
plugin_node_t *node;
xine_ao_driver_t *driver;
ao_info_t *ao_info;
@@ -753,7 +755,7 @@ xine_ao_driver_t *xine_open_audio_driver (xine_t *this, char *id,
* get autoplay mrl list from input plugin
*/
-char **xine_get_autoplay_mrls (xine_t *this, char *plugin_id, int *num_mrls) {
+const char *const *xine_get_autoplay_mrls (xine_p this, const char *plugin_id, int *num_mrls) {
plugin_catalog_t *catalog;
plugin_node_t *node;
@@ -781,8 +783,8 @@ char **xine_get_autoplay_mrls (xine_t *this, char *plugin_id, int *num_mrls) {
/*
* input plugin mrl browser support
*/
-xine_mrl_t **xine_get_browse_mrls (xine_t *this, char *plugin_id,
- char *start_mrl, int *num_mrls) {
+const xine_mrl_t *const *xine_get_browse_mrls (xine_p this, const char *plugin_id,
+ const char *start_mrl, int *num_mrls) {
plugin_catalog_t *catalog;
plugin_node_t *node;
diff --git a/src/xine-engine/plugin_catalog.h b/src/xine-engine/plugin_catalog.h
index e851a17a8..d65ea8e25 100644
--- a/src/xine-engine/plugin_catalog.h
+++ b/src/xine-engine/plugin_catalog.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: plugin_catalog.h,v 1.3 2002/09/05 16:24:14 guenter Exp $
+ * $Id: plugin_catalog.h,v 1.4 2002/09/06 18:13:12 mroi Exp $
*
* xine-internal header: Definitions for plugin lists
*
@@ -51,7 +51,7 @@ struct plugin_catalog_s {
plugin_node_t *video_decoder_map[DECODER_MAX];
plugin_node_t *spu_decoder_map[DECODER_MAX];
- char *ids[PLUGIN_MAX];
+ const char *ids[PLUGIN_MAX];
};
typedef struct plugin_catalog_s plugin_catalog_t;
diff --git a/src/xine-engine/scratch.c b/src/xine-engine/scratch.c
index c47c7a9b6..eb097ed75 100644
--- a/src/xine-engine/scratch.c
+++ b/src/xine-engine/scratch.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: scratch.c,v 1.7 2002/03/01 09:29:50 guenter Exp $
+ * $Id: scratch.c,v 1.8 2002/09/06 18:13:12 mroi Exp $
*
* top-level xine functions
*
@@ -50,7 +50,7 @@ static void scratch_printf (scratch_buffer_t *this, const char *format, va_list
this->cur = (this->cur + 1) % this->num_lines;
}
-static char **scratch_get_content (scratch_buffer_t *this) {
+static const char **scratch_get_content (scratch_buffer_t *this) {
int i, j;
diff --git a/src/xine-engine/scratch.h b/src/xine-engine/scratch.h
index 4390641a8..34f60067b 100644
--- a/src/xine-engine/scratch.h
+++ b/src/xine-engine/scratch.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: scratch.h,v 1.3 2002/03/01 09:29:50 guenter Exp $
+ * $Id: scratch.h,v 1.4 2002/09/06 18:13:12 mroi Exp $
*
* scratch buffer for log output
*
@@ -32,17 +32,17 @@ typedef struct scratch_buffer_s scratch_buffer_t;
struct scratch_buffer_s {
- void (*scratch_printf) (scratch_buffer_t *this, const char *format, va_list ap);
+ void (*scratch_printf) (scratch_buffer_t *this, const char *format, va_list ap);
- char **(*get_content) (scratch_buffer_t *this);
+ const char **(*get_content) (scratch_buffer_t *this);
- void (*dispose) (scratch_buffer_t *this);
+ void (*dispose) (scratch_buffer_t *this);
- char **lines;
- char **ordered;
+ char **lines;
+ const char **ordered;
- int num_lines;
- int cur;
+ int num_lines;
+ int cur;
};
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 69435755f..b796adaa4 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.151 2002/09/05 23:20:21 guenter Exp $
+ * $Id: xine.c,v 1.152 2002/09/06 18:13:12 mroi Exp $
*
* top-level xine functions
*
@@ -150,23 +150,24 @@ 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( this->report_codec_user_data,
+ this->report_codec_cb( (void *)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( this->report_codec_user_data,
+ this->report_codec_cb( (void *)this->report_codec_user_data,
codec_type, fourcc,
buf_audio_name( buf_type ), handled );
}
}
}
-int xine_register_report_codec_cb(xine_t *this,
- xine_report_codec_cb_t report_codec,
- void *user_data) {
+int xine_register_report_codec_cb(xine_p this_ro,
+ const xine_report_codec_cb_t report_codec,
+ const void *const user_data) {
+ xine_t *this = (xine_t *)this_ro;
this->report_codec_cb = report_codec;
this->report_codec_user_data = user_data;
@@ -264,7 +265,8 @@ void xine_stop_internal (xine_t *this) {
printf ("xine_stop: done\n");
}
-void xine_stop (xine_t *this) {
+void xine_stop (xine_p this_ro) {
+ xine_t *this = (xine_t *)this_ro;
pthread_mutex_lock (&this->xine_lock);
xine_stop_internal(this);
@@ -286,7 +288,7 @@ void xine_stop (xine_t *this) {
/*
* demuxer probing
*/
-static int probe_demux (xine_t *this, char *MRL, int stage1, int stage2) {
+static int probe_demux (xine_t *this, const char *MRL, int stage1, int stage2) {
int i;
int stages[3];
@@ -331,7 +333,7 @@ static int probe_demux (xine_t *this, char *MRL, int stage1, int stage2) {
/*
* try to find a demuxer which handle the MRL stream
*/
-static int find_demuxer(xine_t *this, char *MRL) {
+static int find_demuxer(xine_t *this, const char *MRL) {
this->cur_demuxer_plugin = NULL;
@@ -361,7 +363,7 @@ static int find_demuxer(xine_t *this, char *MRL) {
return 0;
}
-int xine_open_internal (xine_t *this, char *mrl) {
+int xine_open_internal (xine_t *this, const char *mrl) {
printf ("xine_open: mrl '%s'\n", mrl);
@@ -525,7 +527,8 @@ int xine_play_internal (xine_t *this, int start_pos, int start_time) {
return 1;
}
-int xine_open (xine_t *this, char *mrl) {
+int xine_open (xine_p this_ro, const char *mrl) {
+ xine_t *this = (xine_t *)this_ro;
int ret;
pthread_mutex_lock (&this->xine_lock);
@@ -535,7 +538,8 @@ int xine_open (xine_t *this, char *mrl) {
return ret;
}
-int xine_play (xine_t *this, int start_pos, int start_time) {
+int xine_play (xine_p this_ro, int start_pos, int start_time) {
+ xine_t *this = (xine_t *)this_ro;
int ret;
pthread_mutex_lock (&this->xine_lock);
@@ -546,7 +550,8 @@ int xine_play (xine_t *this, int start_pos, int start_time) {
}
-int xine_eject (xine_t *this) {
+int xine_eject (xine_p this_ro) {
+ xine_t *this = (xine_t *)this_ro;
int status;
@@ -566,7 +571,8 @@ int xine_eject (xine_t *this) {
return status;
}
-void xine_exit (xine_t *this) {
+void xine_exit (xine_p this_ro) {
+ xine_t *this = (xine_t *)this_ro;
int i;
@@ -615,7 +621,7 @@ void xine_exit (xine_t *this) {
}
-xine_t *xine_new (void) {
+xine_p xine_new (void) {
xine_t *this;
int i;
@@ -703,9 +709,12 @@ xine_t *xine_new (void) {
}
-void xine_init (xine_t *this,
- xine_ao_driver_t *ao,
- xine_vo_driver_t *vo) {
+void xine_init (xine_p this_ro,
+ xine_ao_driver_p ao_ro,
+ xine_vo_driver_p vo_ro) {
+ xine_t *this = (xine_t *)this_ro;
+ xine_ao_driver_t *ao = (xine_ao_driver_t *)ao_ro;
+ xine_vo_driver_t *vo = (xine_vo_driver_t *)vo_ro;
static char *demux_strategies[] = {"default", "reverse", "content",
"extension", NULL};
@@ -831,7 +840,8 @@ static int xine_get_current_position (xine_t *this) {
return (int) share;
}
-int xine_get_status(xine_t *this) {
+int xine_get_status(xine_p this_ro) {
+ xine_t *this = (xine_t *)this_ro;
int status;
status = this->status;
@@ -901,8 +911,9 @@ static int xine_get_stream_length (xine_t *this) {
return 0;
}
-int xine_get_pos_length (xine_t *this, int *pos_stream,
+int xine_get_pos_length (xine_p this_ro, int *pos_stream,
int *pos_time, int *length_time) {
+ xine_t *this = (xine_t *)this_ro;
*pos_stream = xine_get_current_position (this);
*pos_time = this->cur_input_time * 1000;
@@ -935,9 +946,10 @@ static int xine_set_audio_property(xine_t *this, int property, int value) {
return ~value;
}
-int xine_get_current_frame (xine_t *this, int *width, int *height,
+int xine_get_current_frame (xine_p this_ro, int *width, int *height,
int *ratio_code, int *format,
uint8_t *img) {
+ xine_t *this = (xine_t *)this_ro;
vo_frame_t *frame;
@@ -976,7 +988,8 @@ int xine_get_current_frame (xine_t *this, int *width, int *height,
return 1;
}
-int xine_get_spu_lang (xine_t *this, int channel, char *str) {
+int xine_get_spu_lang (xine_p this_ro, int channel, char *str) {
+ xine_t *this = (xine_t *)this_ro;
switch (this->spu_channel_user) {
case -2:
@@ -1002,7 +1015,8 @@ int xine_get_spu_lang (xine_t *this, int channel, char *str) {
return 0;
}
-int xine_get_audio_lang (xine_t *this, int channel, char *str) {
+int xine_get_audio_lang (xine_p this_ro, int channel, char *str) {
+ xine_t *this = (xine_t *)this_ro;
switch (this->audio_channel_user) {
case -2:
@@ -1043,12 +1057,12 @@ osd_renderer_t *xine_get_osd_renderer (xine_t *this) {
/*
* log functions
*/
-int xine_get_log_section_count (xine_t *this) {
+int xine_get_log_section_count (xine_p this_ro) {
return XINE_LOG_NUM;
}
-char **xine_get_log_names (xine_t *this) {
- static char *log_sections[XINE_LOG_NUM + 1];
+const char *const *xine_get_log_names (xine_p this_ro) {
+ static const char *log_sections[XINE_LOG_NUM + 1];
log_sections[XINE_LOG_FORMAT] = _("stream format");
log_sections[XINE_LOG_MSG] = _("messages");
@@ -1058,7 +1072,8 @@ char **xine_get_log_names (xine_t *this) {
return log_sections;
}
-void xine_log (xine_t *this, int buf, const char *format, ...) {
+void xine_log (xine_p this_ro, int buf, const char *format, ...) {
+ xine_t *this = (xine_t *)this_ro;
va_list argp;
@@ -1074,7 +1089,8 @@ void xine_log (xine_t *this, int buf, const char *format, ...) {
va_end (argp);
}
-char **xine_get_log (xine_t *this, int buf) {
+const char *const *xine_get_log (xine_p this_ro, int buf) {
+ xine_t *this = (xine_t *)this_ro;
if(buf >= XINE_LOG_NUM)
return NULL;
@@ -1082,18 +1098,18 @@ char **xine_get_log (xine_t *this, int buf) {
return this->log_buffers[buf]->get_content (this->log_buffers[buf]);
}
-void xine_register_log_cb (xine_t *self, xine_log_cb_t *cb, void *user_data) {
+void xine_register_log_cb (xine_p this_ro, const xine_log_cb_t cb, const void *const user_data) {
printf ("xine: xine_register_log_cb: not implemented yet.\n");
abort();
}
-int xine_get_error (xine_t *this) {
- return this->err;
+int xine_get_error (xine_p this_ro) {
+ return this_ro->err;
}
-int xine_trick_mode (xine_t *this, int mode, int value) {
+int xine_trick_mode (xine_p this_ro, int mode, int value) {
printf ("xine: xine_trick_mode not implemented yet.\n");
abort ();
}
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index c30bcb162..c929ae0ba 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.5 2002/09/06 14:36:54 guenter Exp $
+ * $Id: xine_interface.c,v 1.6 2002/09/06 18:13:12 mroi Exp $
*
* convenience/abstraction layer, functions to implement
* libxine's public interface
@@ -74,14 +74,14 @@ int xine_check_version(int major, int minor, int sub) {
* public config object access functions
*/
-char* xine_config_register_string (xine_t *self,
+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,
- void *cb_data) {
+ const void *const cb_data) {
return self->config->register_string (self->config,
key,
@@ -94,7 +94,7 @@ char* xine_config_register_string (xine_t *self,
}
-int xine_config_register_range (xine_t *self,
+int xine_config_register_range (xine_p self,
char *key,
int def_value,
int min, int max,
@@ -102,7 +102,7 @@ int xine_config_register_range (xine_t *self,
char *help,
int exp_level,
xine_config_cb_t changed_cb,
- void *cb_data) {
+ const void *const cb_data) {
return self->config->register_range (self->config,
key, def_value, min, max,
description, help, exp_level,
@@ -110,7 +110,7 @@ int xine_config_register_range (xine_t *self,
}
-int xine_config_register_enum (xine_t *self,
+int xine_config_register_enum (xine_p self,
char *key,
int def_value,
char **values,
@@ -118,7 +118,7 @@ int xine_config_register_enum (xine_t *self,
char *help,
int exp_level,
xine_config_cb_t changed_cb,
- void *cb_data) {
+ const void *const cb_data) {
return self->config->register_enum (self->config,
key, def_value, values,
description, help, exp_level,
@@ -126,14 +126,14 @@ int xine_config_register_enum (xine_t *self,
}
-int xine_config_register_num (xine_t *self,
+int xine_config_register_num (xine_p self,
char *key,
int def_value,
char *description,
char *help,
int exp_level,
xine_config_cb_t changed_cb,
- void *cb_data) {
+ const void *const cb_data) {
return self->config->register_num (self->config,
key, def_value,
description, help, exp_level,
@@ -141,14 +141,14 @@ int xine_config_register_num (xine_t *self,
}
-int xine_config_register_bool (xine_t *self,
+int xine_config_register_bool (xine_p self,
char *key,
int def_value,
char *description,
char *help,
int exp_level,
xine_config_cb_t changed_cb,
- void *cb_data) {
+ const void *const cb_data) {
return self->config->register_bool (self->config,
key, def_value,
description, help, exp_level,
@@ -163,7 +163,7 @@ int xine_config_register_bool (xine_t *self,
* and return it
*/
-xine_cfg_entry_t *xine_config_get_current_entry (xine_t *this) {
+xine_cfg_entry_t *xine_config_get_current_entry (xine_p this) {
config_values_t *config = this->config;
@@ -195,7 +195,7 @@ xine_cfg_entry_t *xine_config_get_current_entry (xine_t *this) {
/*
* get first config item
*/
-xine_cfg_entry_t *xine_config_get_first_entry (xine_t *this) {
+xine_cfg_entry_t *xine_config_get_first_entry (xine_p this) {
config_values_t *config = this->config;
@@ -209,7 +209,7 @@ xine_cfg_entry_t *xine_config_get_first_entry (xine_t *this) {
* get next config item (iterate through the items)
* this will return NULL when called after returning the last item
*/
-xine_cfg_entry_t *xine_config_get_next_entry (xine_t *this) {
+xine_cfg_entry_t *xine_config_get_next_entry (xine_p this) {
config_values_t *config = this->config;
@@ -223,7 +223,7 @@ xine_cfg_entry_t *xine_config_get_next_entry (xine_t *this) {
* search for a config entry by key
*/
-xine_cfg_entry_t *xine_config_lookup_entry (xine_t *this, char *key) {
+xine_cfg_entry_t *xine_config_lookup_entry (xine_p this, const char *key) {
config_values_t *config = this->config;
@@ -236,7 +236,7 @@ xine_cfg_entry_t *xine_config_lookup_entry (xine_t *this, char *key) {
/*
* update a config entry (which was returned from lookup_entry() )
*/
-void xine_config_update_entry (xine_t *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_t *this, xine_cfg_entry_t *entry){
}
-void xine_reset_config (xine_t *this){
+void xine_reset_config (xine_p this){
config_values_t *config = this->config;
cfg_entry_t *entry;
@@ -278,13 +278,14 @@ void xine_reset_config (xine_t *this){
config->last = NULL;
}
-int xine_gui_send_vo_data (xine_t *this,
+int xine_gui_send_vo_data (xine_p this,
int type, void *data) {
return this->video_driver->gui_data_exchange (this->video_driver, type, data);
}
-void xine_set_param (xine_t *this, int param, int value) {
+void xine_set_param (xine_p this_ro, int param, int value) {
+ xine_t *this = (xine_t *)this_ro;
switch (param) {
case XINE_PARAM_SPEED:
@@ -324,7 +325,7 @@ void xine_set_param (xine_t *this, int param, int value) {
}
}
-int xine_get_param (xine_t *this, int param) {
+int xine_get_param (xine_p this, int param) {
switch (param) {
case XINE_PARAM_SPEED:
@@ -356,7 +357,7 @@ int xine_get_param (xine_t *this, int param) {
return 0;
}
-uint32_t xine_get_stream_info (xine_t *this, int info) {
+uint32_t xine_get_stream_info (xine_p this, int info) {
printf ("xine_interface: xine_get_stream_info: not implemented\n");
switch (info) {
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index 45aa9f787..ad6a7b233 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.95 2002/09/05 22:19:04 mroi Exp $
+ * $Id: xine_internal.h,v 1.96 2002/09/06 18:13:12 mroi Exp $
*
*/
@@ -149,7 +149,7 @@ struct xine_s {
config_values_t *config;
/* MRL of displayed logo */
- char *logo_mrl;
+ const 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];
- void *event_listener_user_data[XINE_MAX_EVENT_LISTENERS];
+ const 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;
- void *report_codec_user_data;
+ const 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, char *MRL);
+int xine_open_internal (xine_t *this, const char *MRL);
int xine_play_internal (xine_t *this,
int start_pos, int start_time);
void xine_stop_internal (xine_t *this);
@@ -312,8 +312,6 @@ xine_ao_driver_t *xine_load_audio_output_plugin (xine_t *self, char *id);
void xine_set_speed (xine_t *this, int speed) ;
-int xine_get_spu_lang (xine_t *this, int channel, char *str) ;
-
void xine_select_spu_channel (xine_t *this, int channel) ;
int xine_get_audio_channel (xine_t *this) ;