diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_cda.c | 10 | ||||
-rw-r--r-- | src/input/input_dvd.c | 22 | ||||
-rw-r--r-- | src/input/input_file.c | 6 | ||||
-rw-r--r-- | src/input/input_plugin.h | 6 | ||||
-rw-r--r-- | src/input/input_vcd.c | 10 | ||||
-rw-r--r-- | src/xine-engine/configfile.c | 8 | ||||
-rw-r--r-- | src/xine-engine/events.c | 8 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 36 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 64 | ||||
-rw-r--r-- | src/xine-engine/xine_interface.c | 35 |
10 files changed, 94 insertions, 111 deletions
diff --git a/src/input/input_cda.c b/src/input/input_cda.c index 202db5af6..6409da03e 100644 --- a/src/input/input_cda.c +++ b/src/input/input_cda.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: input_cda.c,v 1.33 2002/09/06 18:13:10 mroi Exp $ + * $Id: input_cda.c,v 1.34 2002/09/22 14:29:40 mroi Exp $ */ #ifdef HAVE_CONFIG_H @@ -1619,7 +1619,7 @@ static char *cda_plugin_get_identifier (input_plugin_t *this_gen) { /* * Get dir. */ -static const xine_mrl_t *const *cda_plugin_get_dir (input_plugin_t *this_gen, +static xine_mrl_t **cda_plugin_get_dir (input_plugin_t *this_gen, const char *filename, int *nEntries) { cda_input_plugin_t *this = (cda_input_plugin_t *) this_gen; int i; @@ -1695,13 +1695,13 @@ static const xine_mrl_t *const *cda_plugin_get_dir (input_plugin_t *this_gen, _LEAVE_FUNC(); - return (const xine_mrl_t *const *)this->mrls; + return this->mrls; } /* * Get autoplay. */ -static const char *const *cda_plugin_get_autoplay_list (input_plugin_t *this_gen, int *nFiles) { +static char **cda_plugin_get_autoplay_list (input_plugin_t *this_gen, int *nFiles) { cda_input_plugin_t *this = (cda_input_plugin_t *) this_gen; int i; @@ -1743,7 +1743,7 @@ static const char *const *cda_plugin_get_autoplay_list (input_plugin_t *this_gen _LEAVE_FUNC(); - return (const char *const *)this->filelist; + return this->filelist; } /* diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 7aff937a2..e2faa731c 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,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: input_dvd.c,v 1.88 2002/09/20 13:24:53 mroi Exp $ + * $Id: input_dvd.c,v 1.89 2002/09/22 14:29:40 mroi Exp $ * */ @@ -82,7 +82,7 @@ #include "xine_internal.h" /* Print debug messages? */ -#define INPUT_DEBUG +/* #define INPUT_DEBUG */ /* Print trace messages? */ /* #define INPUT_DEBUG_TRACE */ @@ -874,7 +874,7 @@ static uint32_t dvdnav_plugin_get_blocksize (input_plugin_t *this_gen) { return DVD_BLOCK_SIZE; } -static const xine_mrl_t *const *dvdnav_plugin_get_dir (input_plugin_t *this_gen, +static xine_mrl_t **dvdnav_plugin_get_dir (input_plugin_t *this_gen, const char *filename, int *nFiles) { dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t*)this_gen; @@ -883,7 +883,7 @@ static const xine_mrl_t *const *dvdnav_plugin_get_dir (input_plugin_t *this_gen, dvdnav_build_mrl_list((dvdnav_input_plugin_t *) this_gen); *nFiles = this->num_mrls; - return (const xine_mrl_t *const *)this->mrls; + return this->mrls; } static int dvdnav_umount_media(char *device) @@ -1354,7 +1354,7 @@ static int dvdnav_plugin_get_optional_data (input_plugin_t *this_gen, return INPUT_OPTIONAL_UNSUPPORTED; } -static const char *const *dvdnav_plugin_get_autoplay_list (input_plugin_t *this_gen, +static char **dvdnav_plugin_get_autoplay_list (input_plugin_t *this_gen, int *nFiles) { dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t *) this_gen; int titles, i; @@ -1376,7 +1376,7 @@ static const char *const *dvdnav_plugin_get_autoplay_list (input_plugin_t *this_ filelist2[i] = &(filelist[i][0]); } filelist2[*nFiles] = NULL; - return (const char *const *)filelist2; + return filelist2; /* Return a list of all titles */ snprintf (&(filelist[0][0]), MAX_STR_LEN, "dvd://"); filelist2[0] = &(filelist[0][0]); @@ -1392,7 +1392,7 @@ static const char *const *dvdnav_plugin_get_autoplay_list (input_plugin_t *this_ printf("input_dvd: get_autoplay_list exiting opened=%d dvdnav=%p\n",this->opened, this->dvdnav); #endif - return (const char *const *)filelist2; + return filelist2; } void dvdnav_plugin_dispose(input_plugin_t *this_gen) { @@ -1547,8 +1547,12 @@ static void *init_input_plugin (xine_t *xine, void *data) { /* * $Log: input_dvd.c,v $ - * Revision 1.88 2002/09/20 13:24:53 mroi - * another bit of language display tweaking + * Revision 1.89 2002/09/22 14:29:40 mroi + * API review part I + * - bring our beloved xine_t * back (no more const there) + * - remove const on some input plugin functions + * where the data changes with media (dvd, ...) changes + * and is therefore not const * * Revision 1.86 2002/09/18 10:03:07 jcdutton * Fix a seg fault. diff --git a/src/input/input_file.c b/src/input/input_file.c index 3a413d680..2550cd2ca 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.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: input_file.c,v 1.59 2002/09/19 00:23:29 guenter Exp $ + * $Id: input_file.c,v 1.60 2002/09/22 14:29:40 mroi Exp $ */ #ifdef HAVE_CONFIG_H @@ -427,7 +427,7 @@ static int is_a_dir(char *filepathname) { /* * */ -static const xine_mrl_t *const *file_plugin_get_dir (input_plugin_t *this_gen, +static xine_mrl_t **file_plugin_get_dir (input_plugin_t *this_gen, const char *filename, int *nFiles) { file_input_plugin_t *this = (file_input_plugin_t *) this_gen; struct dirent *pdirent; @@ -740,7 +740,7 @@ static const xine_mrl_t *const *file_plugin_get_dir (input_plugin_t *this_gen, } */ - return (const xine_mrl_t *const *)this->mrls; + return this->mrls; } /* diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index 039f11962..360cd9447 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.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: input_plugin.h,v 1.30 2002/09/06 18:13:11 mroi Exp $ + * $Id: input_plugin.h,v 1.31 2002/09/22 14:29:40 mroi Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H @@ -199,7 +199,7 @@ struct input_plugin_s * ls function * return value: NULL => filename is a file, **char=> filename is a dir */ - const xine_mrl_t *const * (*get_dir) (input_plugin_t *this, const char *filename, int *nFiles); + xine_mrl_t ** (*get_dir) (input_plugin_t *this, const char *filename, int *nFiles); /* @@ -246,7 +246,7 @@ struct input_plugin_s * generate autoplay list * return value: list of MRLs */ - const char *const * (*get_autoplay_list) (input_plugin_t *this, int *nFiles); + char ** (*get_autoplay_list) (input_plugin_t *this, int *nFiles); /* diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 7db42ae72..a246cf8b7 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.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: input_vcd.c,v 1.51 2002/09/06 18:13:11 mroi Exp $ + * $Id: input_vcd.c,v 1.52 2002/09/22 14:29:40 mroi Exp $ * */ @@ -974,7 +974,7 @@ static char *vcd_plugin_get_identifier (input_plugin_t *this_gen) { /* * */ -static const xine_mrl_t *const *vcd_plugin_get_dir (input_plugin_t *this_gen, +static xine_mrl_t **vcd_plugin_get_dir (input_plugin_t *this_gen, const char *filename, int *nEntries) { vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen; @@ -1054,13 +1054,13 @@ static const xine_mrl_t *const *vcd_plugin_get_dir (input_plugin_t *this_gen, this->mrls[*nEntries] = NULL; - return (const xine_mrl_t *const *)this->mrls; + return this->mrls; } /* * */ -static const char *const *vcd_plugin_get_autoplay_list (input_plugin_t *this_gen, +static char **vcd_plugin_get_autoplay_list (input_plugin_t *this_gen, int *nFiles) { vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen; @@ -1101,7 +1101,7 @@ static const char *const *vcd_plugin_get_autoplay_list (input_plugin_t *this_gen this->filelist[i - 1] = (char *) realloc(this->filelist[i-1], sizeof(char *)); this->filelist[i - 1] = NULL; - return (const char *const *)this->filelist; + return this->filelist; } /* diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 03c050015..2d4c1dc82 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.34 2002/09/21 12:20:48 f1rmb Exp $ + * $Id: configfile.c,v 1.35 2002/09/22 14:29:40 mroi Exp $ * * config object (was: file) management - implementation * @@ -547,9 +547,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_config_load (xine_p xine_ro, const char *filename) { +void xine_config_load (xine_t *xine, const char *filename) { - config_values_t *this = xine_ro->config; + config_values_t *this = xine->config; FILE *f_config; #ifdef LOG @@ -611,7 +611,7 @@ void xine_config_load (xine_p xine_ro, const char *filename) { } } -void xine_config_save (xine_p xine_ro, const char *filename) { +void xine_config_save (xine_t *xine_ro, const char *filename) { config_values_t *this = xine_ro->config; FILE *f_config; diff --git a/src/xine-engine/events.c b/src/xine-engine/events.c index a0ed4a80f..c41486550 100644 --- a/src/xine-engine/events.c +++ b/src/xine-engine/events.c @@ -29,10 +29,9 @@ #include "xine_internal.h" -int xine_register_event_listener (xine_p this_ro, +int xine_register_event_listener (xine_t *this, 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) { return 0; @@ -55,7 +54,7 @@ int xine_register_event_listener (xine_p this_ro, return 0; } -void xine_send_event(xine_p this, xine_event_t *event) { +void xine_send_event(xine_t *this, xine_event_t *event) { uint16_t i; pthread_mutex_lock(&this->event_lock); @@ -74,9 +73,8 @@ void xine_send_event(xine_p this, xine_event_t *event) { pthread_cond_signal(&this->event_handled); } -int xine_remove_event_listener(xine_p this_ro, +int xine_remove_event_listener(xine_t *this, xine_event_listener_cb_t listener) { - xine_t *this = (xine_t *)this_ro; uint16_t i, found, pending; found = 1; diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 97ad243bc..e248a2777 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.97 2002/09/19 00:53:43 guenter Exp $ + * $Id: load_plugins.c,v 1.98 2002/09/22 14:29:40 mroi Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -594,7 +594,7 @@ void scan_plugins (xine_t *this) { map_decoders (this); } -static const char **_xine_get_featured_input_plugin_ids(xine_p this, int feature) { +static const char **_xine_get_featured_input_plugin_ids(xine_t *this, int feature) { plugin_catalog_t *catalog; int i; @@ -622,17 +622,17 @@ static const char **_xine_get_featured_input_plugin_ids(xine_p this, int feature return catalog->ids; } -const char *const *xine_get_autoplay_input_plugin_ids(xine_p this) { +const char *const *xine_get_autoplay_input_plugin_ids(xine_t *this) { return (_xine_get_featured_input_plugin_ids(this, INPUT_CAP_AUTOPLAY)); } -const char *const *xine_get_browsable_input_plugin_ids(xine_p this) { +const char *const *xine_get_browsable_input_plugin_ids(xine_t *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_t *this, const char *plugin_id) { plugin_catalog_t *catalog; plugin_node_t *node; @@ -657,10 +657,9 @@ const char *xine_get_input_plugin_description(xine_p this, const char *plugin_id * video out plugins section */ -xine_vo_driver_p xine_open_video_driver (xine_p this_ro, +xine_vo_driver_t *xine_open_video_driver (xine_t *this, const char *id, int visual_type, void *visual) { - xine_t *this = (xine_t *)this_ro; plugin_node_t *node; xine_vo_driver_t *driver; @@ -690,9 +689,9 @@ xine_vo_driver_p xine_open_video_driver (xine_p this_ro, /* remember plugin id */ - if (xine_config_lookup_entry (this_ro, "video.driver", &entry)) { + if (xine_config_lookup_entry (this, "video.driver", &entry)) { entry.str_value = node->info->id; - xine_config_update_entry (this_ro, &entry); + xine_config_update_entry (this, &entry); } break; @@ -713,7 +712,7 @@ xine_vo_driver_p xine_open_video_driver (xine_p this_ro, * audio output plugins section */ -const char *const *xine_list_audio_output_plugins (xine_p this) { +const char *const *xine_list_audio_output_plugins (xine_t *this) { plugin_catalog_t *catalog; int i; @@ -737,7 +736,7 @@ const char *const *xine_list_audio_output_plugins (xine_p this) { return catalog->ids; } -const char *const *xine_list_video_output_plugins (xine_p this) { +const char *const *xine_list_video_output_plugins (xine_t *this) { plugin_catalog_t *catalog; int i; @@ -761,9 +760,8 @@ 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_t *xine_open_audio_driver (xine_t *this, const char *id, void *data) { - xine_t *this = (xine_t *)this_ro; plugin_node_t *node; xine_ao_driver_t *driver; @@ -789,9 +787,9 @@ xine_ao_driver_p xine_open_audio_driver (xine_p this_ro, const char *id, /* remember plugin id */ - if (xine_config_lookup_entry (this_ro, "audio.driver", &entry)) { + if (xine_config_lookup_entry (this, "audio.driver", &entry)) { entry.str_value = node->info->id; - xine_config_update_entry (this_ro, &entry); + xine_config_update_entry (this, &entry); } break; @@ -814,8 +812,8 @@ 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) { +char **xine_get_autoplay_mrls (xine_t *this, const char *plugin_id, + int *num_mrls) { plugin_catalog_t *catalog; plugin_node_t *node; @@ -844,8 +842,8 @@ const char *const *xine_get_autoplay_mrls (xine_p this, const char *plugin_id, /* * 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) { +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; plugin_node_t *node; diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 54d69de21..95ae918d9 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.160 2002/09/18 15:37:11 mroi Exp $ + * $Id: xine.c,v 1.161 2002/09/22 14:29:40 mroi Exp $ * * top-level xine functions * @@ -164,10 +164,9 @@ 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, +int xine_register_report_codec_cb(xine_t *this, xine_report_codec_cb_t report_codec, void *user_data) { - xine_t *this = (xine_t *)this_ro; this->report_codec_cb = report_codec; this->report_codec_user_data = user_data; @@ -265,8 +264,7 @@ void xine_stop_internal (xine_t *this) { printf ("xine_stop: done\n"); } -void xine_stop (xine_p this_ro) { - xine_t *this = (xine_t *)this_ro; +void xine_stop (xine_t *this) { pthread_mutex_lock (&this->xine_lock); xine_stop_internal(this); @@ -560,8 +558,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) { - xine_t *this = (xine_t *)this_ro; +int xine_open (xine_t *this, const char *mrl) { int ret; pthread_mutex_lock (&this->xine_lock); @@ -571,8 +568,7 @@ int xine_open (xine_p this_ro, const char *mrl) { return ret; } -int xine_play (xine_p this_ro, int start_pos, int start_time) { - xine_t *this = (xine_t *)this_ro; +int xine_play (xine_t *this, int start_pos, int start_time) { int ret; pthread_mutex_lock (&this->xine_lock); @@ -583,8 +579,7 @@ int xine_play (xine_p this_ro, int start_pos, int start_time) { } -int xine_eject (xine_p this_ro) { - xine_t *this = (xine_t *)this_ro; +int xine_eject (xine_t *this) { int status; @@ -604,8 +599,7 @@ int xine_eject (xine_p this_ro) { return status; } -void xine_exit (xine_p this_ro) { - xine_t *this = (xine_t *)this_ro; +void xine_exit (xine_t *this) { int i; @@ -656,7 +650,7 @@ void xine_exit (xine_p this_ro) { } -xine_p xine_new (void) { +xine_t *xine_new (void) { xine_t *this; int i; @@ -758,12 +752,9 @@ xine_p xine_new (void) { } -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; +void xine_init (xine_t *this, + xine_ao_driver_t *ao, + xine_vo_driver_t *vo) { static char *demux_strategies[] = {"default", "reverse", "content", "extension", NULL}; @@ -889,8 +880,7 @@ static int xine_get_current_position (xine_t *this) { return (int) share; } -int xine_get_status(xine_p this_ro) { - xine_t *this = (xine_t *)this_ro; +int xine_get_status(xine_t *this) { int status; status = this->status; @@ -960,9 +950,8 @@ static int xine_get_stream_length (xine_t *this) { return 0; } -int xine_get_pos_length (xine_p this_ro, int *pos_stream, +int xine_get_pos_length (xine_t *this, int *pos_stream, int *pos_time, int *length_time) { - xine_t *this = (xine_t *)this_ro; if (pos_stream) *pos_stream = xine_get_current_position (this); @@ -998,10 +987,9 @@ static int xine_set_audio_property(xine_t *this, int property, int value) { return ~value; } -int xine_get_current_frame (xine_p this_ro, int *width, int *height, +int xine_get_current_frame (xine_t *this, int *width, int *height, int *ratio_code, int *format, uint8_t *img) { - xine_t *this = (xine_t *)this_ro; vo_frame_t *frame; @@ -1040,8 +1028,7 @@ int xine_get_current_frame (xine_p this_ro, int *width, int *height, return 1; } -const char * xine_get_spu_lang (xine_p this_ro, int channel) { - xine_t *this = (xine_t *)this_ro; +const char * xine_get_spu_lang (xine_t *this, int channel) { if (this->cur_input_plugin) { if (this->cur_input_plugin->get_capabilities (this->cur_input_plugin) & INPUT_CAP_SPULANG) { @@ -1055,8 +1042,7 @@ const char * xine_get_spu_lang (xine_p this_ro, int channel) { return NULL; } -const char* xine_get_audio_lang (xine_p this_ro, int channel) { - xine_t *this = (xine_t *)this_ro; +const char* xine_get_audio_lang (xine_t *this, int channel) { if (this->cur_input_plugin) { if (this->cur_input_plugin->get_capabilities (this->cur_input_plugin) & INPUT_CAP_AUDIOLANG) { @@ -1083,11 +1069,11 @@ osd_renderer_t *xine_get_osd_renderer (xine_t *this) { /* * log functions */ -int xine_get_log_section_count (xine_p this_ro) { +int xine_get_log_section_count (xine_t *this) { return XINE_LOG_NUM; } -const char *const *xine_get_log_names (xine_p this_ro) { +const char *const *xine_get_log_names (xine_t *this) { static const char *log_sections[XINE_LOG_NUM + 1]; log_sections[XINE_LOG_MSG] = _("messages"); @@ -1097,8 +1083,7 @@ const char *const *xine_get_log_names (xine_p this_ro) { return log_sections; } -void xine_log (xine_p this_ro, int buf, const char *format, ...) { - xine_t *this = (xine_t *)this_ro; +void xine_log (xine_t *this, int buf, const char *format, ...) { va_list argp; @@ -1114,8 +1099,7 @@ void xine_log (xine_p this_ro, int buf, const char *format, ...) { va_end (argp); } -const char *const *xine_get_log (xine_p this_ro, int buf) { - xine_t *this = (xine_t *)this_ro; +const char *const *xine_get_log (xine_t *this, int buf) { if(buf >= XINE_LOG_NUM) return NULL; @@ -1123,18 +1107,18 @@ 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, xine_log_cb_t cb, void *user_data) { +void xine_register_log_cb (xine_t *this, xine_log_cb_t cb, void *user_data) { printf ("xine: xine_register_log_cb: not implemented yet.\n"); abort(); } -int xine_get_error (xine_p this_ro) { - return this_ro->err; +int xine_get_error (xine_t *this) { + return this->err; } -int xine_trick_mode (xine_p this_ro, int mode, int value) { +int xine_trick_mode (xine_t *this, 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 970989fff..541fe3f0a 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.21 2002/09/21 12:20:48 f1rmb Exp $ + * $Id: xine_interface.c,v 1.22 2002/09/22 14:29:40 mroi Exp $ * * convenience/abstraction layer, functions to implement * libxine's public interface @@ -74,7 +74,7 @@ int xine_check_version(int major, int minor, int sub) { * public config object access functions */ -const char* xine_config_register_string (xine_p self, +const char* xine_config_register_string (xine_t *self, const char *key, const char *def_value, const char *description, @@ -94,7 +94,7 @@ const char* xine_config_register_string (xine_p self, } -int xine_config_register_range (xine_p self, +int xine_config_register_range (xine_t *self, const char *key, int def_value, int min, int max, @@ -110,7 +110,7 @@ int xine_config_register_range (xine_p self, } -int xine_config_register_enum (xine_p self, +int xine_config_register_enum (xine_t *self, const char *key, int def_value, char **values, @@ -126,7 +126,7 @@ int xine_config_register_enum (xine_p self, } -int xine_config_register_num (xine_p self, +int xine_config_register_num (xine_t *self, const char *key, int def_value, const char *description, @@ -141,7 +141,7 @@ int xine_config_register_num (xine_p self, } -int xine_config_register_bool (xine_p self, +int xine_config_register_bool (xine_t *self, const char *key, int def_value, const char *description, @@ -163,7 +163,7 @@ int xine_config_register_bool (xine_p self, * and return status */ -static int xine_config_get_current_entry (xine_p this, +static int xine_config_get_current_entry (xine_t *this, xine_cfg_entry_t *entry) { config_values_t *config = this->config; @@ -194,7 +194,7 @@ static int xine_config_get_current_entry (xine_p this, /* * get first config item */ -int xine_config_get_first_entry (xine_p this, xine_cfg_entry_t *entry) { +int xine_config_get_first_entry (xine_t *this, xine_cfg_entry_t *entry) { int result; config_values_t *config = this->config; @@ -215,7 +215,7 @@ int xine_config_get_first_entry (xine_p this, xine_cfg_entry_t *entry) { * get next config item (iterate through the items) * this will return NULL when called after returning the last item */ -int xine_config_get_next_entry (xine_p this, xine_cfg_entry_t *entry) { +int xine_config_get_next_entry (xine_t *this, xine_cfg_entry_t *entry) { int result; config_values_t *config = this->config; @@ -241,7 +241,7 @@ int xine_config_get_next_entry (xine_p this, xine_cfg_entry_t *entry) { * search for a config entry by key */ -int xine_config_lookup_entry (xine_p this, const char *key, +int xine_config_lookup_entry (xine_t *this, const char *key, xine_cfg_entry_t *entry) { int result; config_values_t *config = this->config; @@ -261,7 +261,7 @@ int 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_t *this, const xine_cfg_entry_t *entry) { switch (entry->type) { case XINE_CONFIG_TYPE_RANGE: @@ -283,7 +283,7 @@ void xine_config_update_entry (xine_p this, xine_cfg_entry_t *entry) { } -void xine_config_reset (xine_p this) { +void xine_config_reset (xine_t *this) { config_values_t *config = this->config; cfg_entry_t *entry; @@ -304,14 +304,13 @@ void xine_config_reset (xine_p this) { pthread_mutex_unlock(&config->config_lock); } -int xine_gui_send_vo_data (xine_p this, +int xine_gui_send_vo_data (xine_t *this, int type, void *data) { return this->video_driver->gui_data_exchange (this->video_driver, type, data); } -void xine_set_param (xine_p this_ro, int param, int value) { - xine_t *this = (xine_t *)this_ro; +void xine_set_param (xine_t *this, int param, int value) { switch (param) { case XINE_PARAM_SPEED: @@ -366,7 +365,7 @@ void xine_set_param (xine_p this_ro, int param, int value) { } } -int xine_get_param (xine_p this, int param) { +int xine_get_param (xine_t *this, int param) { switch (param) { case XINE_PARAM_SPEED: @@ -410,7 +409,7 @@ int xine_get_param (xine_p this, int param) { return 0; } -uint32_t xine_get_stream_info (xine_p this, int info) { +uint32_t xine_get_stream_info (xine_t *this, int info) { switch (info) { @@ -445,7 +444,7 @@ uint32_t xine_get_stream_info (xine_p this, int info) { return 0; } -const char *xine_get_meta_info (xine_p this, int info) { +const char *xine_get_meta_info (xine_t *this, int info) { return this->meta_info[info]; } |