diff options
Diffstat (limited to 'src/xine-engine')
-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 |
5 files changed, 65 insertions, 86 deletions
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]; } |