summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_cda.c47
-rw-r--r--src/input/input_dvd.c235
-rw-r--r--src/input/input_file.c38
-rw-r--r--src/input/input_http.c25
-rw-r--r--src/input/input_mms.c26
-rw-r--r--src/input/input_net.c28
-rw-r--r--src/input/input_rtp.c29
-rw-r--r--src/input/input_stdin_fifo.c26
-rw-r--r--src/input/input_vcd.c30
-rw-r--r--src/input/net_buf_ctrl.c4
10 files changed, 244 insertions, 244 deletions
diff --git a/src/input/input_cda.c b/src/input/input_cda.c
index 3c5981d87..dbf0d51fb 100644
--- a/src/input/input_cda.c
+++ b/src/input/input_cda.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000-2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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.28 2002/07/05 17:32:01 mroi Exp $
+ * $Id: input_cda.c,v 1.29 2002/09/04 23:31:08 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -196,22 +196,22 @@ static void _cda_stop_cd(cdainfo_t *);
/*
* Callbacks for configuratoin changes.
*/
-static void device_change_cb(void *data, cfg_entry_t *cfg) {
+static void device_change_cb(void *data, xine_cfg_entry_t *cfg) {
cda_input_plugin_t *this = (cda_input_plugin_t *) data;
this->cda->device_name = cfg->str_value;
}
-static void server_change_cb(void *data, cfg_entry_t *cfg) {
+static void server_change_cb(void *data, xine_cfg_entry_t *cfg) {
cda_input_plugin_t *this = (cda_input_plugin_t *) data;
this->cddb.server = cfg->str_value;
}
-static void port_change_cb(void *data, cfg_entry_t *cfg) {
+static void port_change_cb(void *data, xine_cfg_entry_t *cfg) {
cda_input_plugin_t *this = (cda_input_plugin_t *) data;
this->cddb.port = cfg->num_value;
}
-static void cachedir_change_cb(void *data, cfg_entry_t *cfg) {
+static void cachedir_change_cb(void *data, xine_cfg_entry_t *cfg) {
cda_input_plugin_t *this = (cda_input_plugin_t *) data;
this->cddb.cache_dir = cfg->str_value;
@@ -1429,7 +1429,7 @@ static buf_element_t *cda_plugin_read_block (input_plugin_t *this_gen,
if(this->xine->speed != this->speed) {
int old_status = this->cda->status;
this->speed = this->xine->speed;
- if((this->speed == SPEED_PAUSE) && this->cda->status == CDA_PLAY) {
+ if((this->speed == XINE_SPEED_PAUSE) && this->cda->status == CDA_PLAY) {
_cda_pause_cd(this->cda);
}
else {
@@ -1782,23 +1782,13 @@ static void cda_plugin_dispose (input_plugin_t *this_gen ) {
/*
* Initialize plugin.
*/
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
cda_input_plugin_t *this;
config_values_t *config;
int i;
_ENTER_FUNC();
- if (iface != 8) {
- LOG_MSG(xine,
- _("cda input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n"),
- iface);
- return NULL;
- }
-
this = (cda_input_plugin_t *) xine_xmalloc(sizeof(cda_input_plugin_t));
config = xine->config;
@@ -1840,22 +1830,22 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->cda->device_name = config->register_string(config, "input.cda_device", CDROM,
_("path to your local cd audio device file"),
- NULL,
+ NULL, 10,
device_change_cb, (void *) this);
this->cddb.server = config->register_string(config, "input.cda_cddb_server", CDDB_SERVER,
- _("cddbp server name"), NULL,
+ _("cddbp server name"), NULL, 10,
server_change_cb, (void *) this);
this->cddb.port = config->register_num(config, "input.cda_cddb_port", CDDB_PORT,
- _("cddbp server port"), NULL,
+ _("cddbp server port"), NULL, 10,
port_change_cb, (void *) this);
this->cddb.fd = -1;
this->cddb.cache_dir = config->register_string(config, "input.cda_cddb_cachedir",
(_cda_cddb_get_default_location()),
- _("cddbp cache directory"), NULL,
+ _("cddbp cache directory"), NULL, 20,
cachedir_change_cb, (void *) this);
this->mrls = (mrl_t **) xine_xmalloc(sizeof(mrl_t*));
@@ -1865,3 +1855,14 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
return (input_plugin_t *) this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "cda", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 46d3a9a02..c2ea4d3bb 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.71 2002/09/04 10:48:36 mroi Exp $
+ * $Id: input_dvd.c,v 1.72 2002/09/04 23:31:08 guenter Exp $
*
*/
@@ -171,7 +171,7 @@ static void flush_buffers(dvdnav_input_plugin_t *this);
static void xine_dvdnav_send_button_update(dvdnav_input_plugin_t *this, int mode);
/* Callback on device name change */
-static void device_change_cb(void *data, cfg_entry_t *cfg) {
+static void device_change_cb(void *data, xine_cfg_entry_t *cfg) {
dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t *) data;
this->dvd_device = cfg->str_value;
@@ -182,12 +182,12 @@ static uint32_t dvdnav_plugin_get_capabilities (input_plugin_t *this_gen) {
return INPUT_CAP_AUTOPLAY | INPUT_CAP_BLOCK | INPUT_CAP_CLUT |
#if CAN_SEEK
- INPUT_CAP_SEEKABLE | INPUT_CAP_VARIABLE_BITRATE |
+ INPUT_CAP_SEEKABLE | INPUT_CAP_VARIABLE_BITRATE |
#endif
INPUT_CAP_AUDIOLANG | INPUT_CAP_SPULANG | INPUT_CAP_GET_DIR | INPUT_CAP_CHAPTERS;
}
-void read_ahead_cb(void *this_gen, cfg_entry_t *entry) {
+void read_ahead_cb(void *this_gen, xine_cfg_entry_t *entry) {
dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t*)this_gen;
if(!this)
@@ -199,7 +199,7 @@ void read_ahead_cb(void *this_gen, cfg_entry_t *entry) {
dvdnav_set_readahead_flag(this->dvdnav, entry->num_value);
}
-void region_changed_cb(void *this_gen, cfg_entry_t *entry) {
+void region_changed_cb (void *this_gen, xine_cfg_entry_t *entry) {
dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t*)this_gen;
if(!this)
@@ -218,7 +218,7 @@ void region_changed_cb(void *this_gen, cfg_entry_t *entry) {
}
}
-void language_changed_cb(void *this_gen, cfg_entry_t *entry) {
+void language_changed_cb(void *this_gen, xine_cfg_entry_t *entry) {
dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t*)this_gen;
if(!this)
@@ -385,7 +385,7 @@ static int dvdnav_plugin_open (input_plugin_t *this_gen, char *mrl) {
dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t *) this_gen;
dvdnav_status_t ret;
char *intended_dvd_device;
- cfg_entry_t *region_entry, *lang_entry, *cache_entry;
+ xine_cfg_entry_t *region_entry, *lang_entry, *cache_entry;
trace_print("Called\n");
/* printf("input_dvd: open1: dvdnav=%p opened=%d\n",this->dvdnav, this->opened); */
@@ -507,22 +507,22 @@ static int dvdnav_plugin_open (input_plugin_t *this_gen, char *mrl) {
/* Set region code */
- region_entry = this->config->lookup_entry(this->config,
- "input.dvd_region");
+ region_entry = xine_config_lookup_entry (this->xine,
+ "input.dvd_region");
if(region_entry) {
region_changed_cb(this, region_entry);
}
/* Set languages */
- lang_entry = this->config->lookup_entry(this->config,
- "input.dvdnav_language");
+ lang_entry = xine_config_lookup_entry(this->xine,
+ "input.dvdnav_language");
if(lang_entry) {
language_changed_cb(this, lang_entry);
}
/* Set cache usage */
- cache_entry = this->config->lookup_entry(this->config,
- "input.dvdnav_use_readahead");
+ cache_entry = xine_config_lookup_entry(this->xine,
+ "input.dvdnav_use_readahead");
if(cache_entry) {
read_ahead_cb(this, cache_entry);
}
@@ -1384,129 +1384,122 @@ check_solaris_vold_device(dvdnav_input_plugin_t *this)
}
#endif
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
dvdnav_input_plugin_t *this;
config_values_t *config = xine->config;
void *dvdcss;
trace_print("Called\n");
- switch (iface) {
- case 8:
- this = (dvdnav_input_plugin_t *) malloc (sizeof (dvdnav_input_plugin_t));
-
- this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
- this->input_plugin.get_capabilities = dvdnav_plugin_get_capabilities;
- this->input_plugin.open = dvdnav_plugin_open;
- this->input_plugin.read = dvdnav_plugin_read;
- this->input_plugin.read_block = dvdnav_plugin_read_block;
- this->input_plugin.seek = dvdnav_plugin_seek;
- this->input_plugin.get_current_pos = dvdnav_plugin_get_current_pos;
- this->input_plugin.get_length = dvdnav_plugin_get_length;
- this->input_plugin.get_blocksize = dvdnav_plugin_get_blocksize;
- this->input_plugin.get_dir = dvdnav_plugin_get_dir;
- this->input_plugin.eject_media = dvdnav_plugin_eject_media;
- this->input_plugin.get_mrl = dvdnav_plugin_get_mrl;
- this->input_plugin.stop = dvdnav_plugin_stop;
- this->input_plugin.close = dvdnav_plugin_close;
- this->input_plugin.get_description = dvdnav_plugin_get_description;
- this->input_plugin.get_identifier = dvdnav_plugin_get_identifier;
- this->input_plugin.get_autoplay_list = dvdnav_plugin_get_autoplay_list;
- this->input_plugin.get_optional_data = dvdnav_plugin_get_optional_data;
- this->input_plugin.is_branch_possible = NULL;
- this->input_plugin.dispose = dvdnav_plugin_dispose;
-
- this->config = config;
- this->xine = xine;
- this->dvdnav = NULL;
- this->opened = 0;
- this->buttonN = 0;
- this->typed_buttonN = 0;
- this->dvd_name[0] = 0;
- this->dvd_name_length = 0;
- this->mrls = NULL;
- this->num_mrls = 0;
-
- pthread_mutex_init(&this->buf_mutex, NULL);
- this->mem_stack = 0;
-
- xine_register_event_listener(this->xine, dvdnav_event_listener, this);
- this->dvd_device = config->register_string(config,
- "input.dvd_device",
- DVD_PATH,
- "device used for dvd drive",
- NULL,
- device_change_cb, (void *)this);
- this->current_dvd_device = this->dvd_device;
-
- if ((dvdcss = dlopen("libdvdcss.so.2", RTLD_LAZY)) != NULL) {
- /* we have found libdvdcss, enable the specific config options */
+ this = (dvdnav_input_plugin_t *) malloc (sizeof (dvdnav_input_plugin_t));
+
+ this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
+ this->input_plugin.get_capabilities = dvdnav_plugin_get_capabilities;
+ this->input_plugin.open = dvdnav_plugin_open;
+ this->input_plugin.read = dvdnav_plugin_read;
+ this->input_plugin.read_block = dvdnav_plugin_read_block;
+ this->input_plugin.seek = dvdnav_plugin_seek;
+ this->input_plugin.get_current_pos = dvdnav_plugin_get_current_pos;
+ this->input_plugin.get_length = dvdnav_plugin_get_length;
+ this->input_plugin.get_blocksize = dvdnav_plugin_get_blocksize;
+ this->input_plugin.get_dir = dvdnav_plugin_get_dir;
+ this->input_plugin.eject_media = dvdnav_plugin_eject_media;
+ this->input_plugin.get_mrl = dvdnav_plugin_get_mrl;
+ this->input_plugin.stop = dvdnav_plugin_stop;
+ this->input_plugin.close = dvdnav_plugin_close;
+ this->input_plugin.get_description = dvdnav_plugin_get_description;
+ this->input_plugin.get_identifier = dvdnav_plugin_get_identifier;
+ this->input_plugin.get_autoplay_list = dvdnav_plugin_get_autoplay_list;
+ this->input_plugin.get_optional_data = dvdnav_plugin_get_optional_data;
+ this->input_plugin.is_branch_possible = NULL;
+ this->input_plugin.dispose = dvdnav_plugin_dispose;
+
+ this->config = config;
+ this->xine = xine;
+ this->dvdnav = NULL;
+ this->opened = 0;
+ this->buttonN = 0;
+ this->typed_buttonN = 0;
+ this->dvd_name[0] = 0;
+ this->dvd_name_length = 0;
+ this->mrls = NULL;
+ this->num_mrls = 0;
+
+ pthread_mutex_init(&this->buf_mutex, NULL);
+ this->mem_stack = 0;
+
+ xine_register_event_listener(this->xine, dvdnav_event_listener, this);
+ this->dvd_device = config->register_string(config,
+ "input.dvd_device",
+ DVD_PATH,
+ "device used for dvd drive",
+ NULL,
+ 0, device_change_cb, (void *)this);
+ this->current_dvd_device = this->dvd_device;
+
+ if ((dvdcss = dlopen("libdvdcss.so.2", RTLD_LAZY)) != NULL) {
+ /* we have found libdvdcss, enable the specific config options */
#ifndef HAVE_DVDNAV
- char *raw_device;
+ char *raw_device;
#endif
- static char *decrypt_modes[] = { "key", "disc", "title", NULL };
- int mode;
-
+ static char *decrypt_modes[] = { "key", "disc", "title", NULL };
+ int mode;
+
#ifndef HAVE_DVDNAV
- /* only our local copy of libdvdread supports raw device reads,
- * so we don't provide this option, when we are using a shared version
- * of libdvdnav/libdvdread */
- raw_device = config->register_string(config, "input.dvd_raw_device",
- RDVD_PATH, "raw device set up for dvd access",
- NULL, NULL, NULL);
- if (raw_device) xine_setenv("DVDCSS_RAW_DEVICE", raw_device, 0);
+ /* only our local copy of libdvdread supports raw device reads,
+ * so we don't provide this option, when we are using a shared version
+ * of libdvdnav/libdvdread */
+ raw_device = config->register_string(config, "input.dvd_raw_device",
+ RDVD_PATH, "raw device set up for dvd access",
+ NULL, 10, NULL, NULL);
+ if (raw_device) xine_setenv("DVDCSS_RAW_DEVICE", raw_device, 0);
#endif
-
- mode = config->register_enum(config, "input.css_decryption_method", 0,
- decrypt_modes, "the css decryption method libdvdcss should use",
- NULL, NULL, NULL);
- xine_setenv("DVDCSS_METHOD", decrypt_modes[mode], 0);
-
- dlclose(dvdcss);
- }
-
- config->register_num(config, "input.dvd_region",
- 1,
- "Region that DVD player claims "
- "to be (1 -> 8)",
- "This only needs to be changed "
- "if your DVD jumps to a screen "
- "complaining about region code ",
- region_changed_cb,
- this);
- config->register_string(config, "input.dvdnav_language",
- "en",
- "The default language for dvd",
- "The dvdnav plugin tries to use this "
- "language as a default. This must be a"
- "two character ISO country code.",
- language_changed_cb, this);
- config->register_bool(config, "input.dvdnav_use_readahead",
- 1,
- "Do we use read-ahead caching?",
- "This "
- "may lead to jerky playback on low-end "
- "machines.",
- read_ahead_cb, this);
+ mode = config->register_enum(config, "input.css_decryption_method", 0,
+ decrypt_modes, "the css decryption method libdvdcss should use",
+ NULL, 10, NULL, NULL);
+ xine_setenv("DVDCSS_METHOD", decrypt_modes[mode], 0);
+
+ dlclose(dvdcss);
+ }
+
+ config->register_num(config, "input.dvd_region",
+ 1,
+ "Region that DVD player claims "
+ "to be (1 -> 8)",
+ "This only needs to be changed "
+ "if your DVD jumps to a screen "
+ "complaining about region code ",
+ 0, region_changed_cb,
+ this);
+ config->register_string(config, "input.dvdnav_language",
+ "en",
+ "The default language for dvd",
+ "The dvdnav plugin tries to use this "
+ "language as a default. This must be a"
+ "two character ISO country code.",
+ 0, language_changed_cb, this);
+ config->register_bool(config, "input.dvdnav_use_readahead",
+ 1,
+ "Do we use read-ahead caching?",
+ "This "
+ "may lead to jerky playback on low-end "
+ "machines.",
+ 10, read_ahead_cb, this);
+
#ifdef __sun
- check_solaris_vold_device(this);
+ check_solaris_vold_device(this);
#endif
- return (input_plugin_t *) this;
- break;
- default:
- printf ("DVD Navigator input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n",
- iface);
- return NULL;
- }
+ return this;
}
+
/*
* $Log: input_dvd.c,v $
+ * Revision 1.72 2002/09/04 23:31:08 guenter
+ * merging in the new_api branch ... unfortunately video_out / vo_scale is broken now ... matthias/miguel: please fix it :-)
+ *
* Revision 1.71 2002/09/04 10:48:36 mroi
* - handle numeric events for button selection (maybe this makes some
* dvd's easter eggs accesible)
@@ -1576,3 +1569,9 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
* First stage of DVD plugin -> dvdnav conversion
*
*/
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "dvd", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/input/input_file.c b/src/input/input_file.c
index 4dee6db02..24d22f4ec 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.52 2002/07/05 17:32:02 mroi Exp $
+ * $Id: input_file.c,v 1.53 2002/09/04 23:31:08 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -110,12 +110,12 @@ typedef struct {
/*
* Callback for config changes.
*/
-static void hidden_bool_cb(void *data, cfg_entry_t *cfg) {
+static void hidden_bool_cb(void *data, xine_cfg_entry_t *cfg) {
file_input_plugin_t *this = (file_input_plugin_t *) data;
this->show_hidden_files = cfg->num_value;
}
-static void origin_change_cb(void *data, cfg_entry_t *cfg) {
+static void origin_change_cb(void *data, xine_cfg_entry_t *cfg) {
file_input_plugin_t *this = (file_input_plugin_t *) data;
this->origin_path = cfg->str_value;
@@ -847,24 +847,11 @@ static void file_plugin_dispose (input_plugin_t *this_gen ) {
free (this);
}
-/*
- *
- */
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
file_input_plugin_t *this;
config_values_t *config;
- if (iface != 8) {
- LOG_MSG(xine,
- _("file input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n"),
- iface);
- return NULL;
- }
-
this = (file_input_plugin_t *) xine_xmalloc (sizeof (file_input_plugin_t));
config = xine->config;
this->xine = xine;
@@ -906,12 +893,23 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->origin_path = config->register_string(this->config, "input.file_origin_path",
current_dir, _("origin path to grab file mrls"),
- NULL, origin_change_cb, (void *) this);
+ NULL, 0, origin_change_cb, (void *) this);
}
this->show_hidden_files = this->config->register_bool(this->config, "input.file_hidden_files",
1, _("hidden files displaying."),
- NULL, hidden_bool_cb, (void *) this);
+ NULL, 10, hidden_bool_cb, (void *) this);
- return (input_plugin_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "file", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
diff --git a/src/input/input_http.c b/src/input/input_http.c
index 80561f7b0..84ffad158 100644
--- a/src/input/input_http.c
+++ b/src/input/input_http.c
@@ -685,21 +685,11 @@ static void http_plugin_dispose (input_plugin_t *this_gen ) {
free (this_gen);
}
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
http_input_plugin_t *this;
config_values_t *config;
- if (iface != 8) {
- xine_log (xine, XINE_LOG_PLUGIN,
- _("http input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n"),
- iface);
- return NULL;
- }
-
this = (http_input_plugin_t *) xine_xmalloc(sizeof(http_input_plugin_t));
config = xine->config;
this->xine = xine;
@@ -730,5 +720,16 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->curpos = 0;
this->nbc = NULL;
- return (input_plugin_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "http", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
diff --git a/src/input/input_mms.c b/src/input/input_mms.c
index fcc415671..d378f880b 100644
--- a/src/input/input_mms.c
+++ b/src/input/input_mms.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_mms.c,v 1.15 2002/07/05 17:32:02 mroi Exp $
+ * $Id: input_mms.c,v 1.16 2002/09/04 23:31:08 guenter Exp $
*
* mms input plugin based on work from major mms
*/
@@ -284,20 +284,11 @@ static void mms_plugin_dispose (input_plugin_t *this_gen ) {
free (this);
}
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
mms_input_plugin_t *this;
config_values_t *config;
- if (iface != 8) {
- printf ("mms input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n",
- iface);
- return NULL;
- }
-
this = (mms_input_plugin_t *) malloc (sizeof (mms_input_plugin_t));
config = xine->config;
this->xine = xine;
@@ -328,5 +319,16 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->curpos = 0;
this->nbc = NULL;
- return &this->input_plugin;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "mms", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
diff --git a/src/input/input_net.c b/src/input/input_net.c
index 7ea5c8b23..1b023e38e 100644
--- a/src/input/input_net.c
+++ b/src/input/input_net.c
@@ -331,24 +331,11 @@ static void net_plugin_dispose (input_plugin_t *this_gen ) {
free (this_gen);
}
-/*
- *
- */
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
net_input_plugin_t *this;
config_values_t *config;
- if (iface != 8) {
- LOG_MSG(xine,
- _("net input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n"),
- iface);
- return NULL;
- }
-
this = (net_input_plugin_t *) xine_xmalloc(sizeof(net_input_plugin_t));
config = xine->config;
this->xine = xine;
@@ -380,5 +367,16 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->curpos = 0;
this->nbc = NULL;
- return (input_plugin_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "tcp", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c
index 44886ca7c..cbce3e7db 100644
--- a/src/input/input_rtp.c
+++ b/src/input/input_rtp.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000-2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -503,22 +503,12 @@ static void rtp_plugin_dispose (input_plugin_t *this_gen ) {
/*
*
*/
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
rtp_input_plugin_t *this;
config_values_t *config;
int bufn;
- if (iface != 8) {
- LOG_MSG(xine,
- _("rtp input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n"),
- iface);
- return NULL;
- }
-
this = (rtp_input_plugin_t *) xine_xmalloc(sizeof(rtp_input_plugin_t));
config = xine->config;
@@ -564,5 +554,16 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->mrl = NULL;
this->config = config;
- return (input_plugin_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "rtp", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c
index cf77dc6c5..4dd3f1116 100644
--- a/src/input/input_stdin_fifo.c
+++ b/src/input/input_stdin_fifo.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_stdin_fifo.c,v 1.28 2002/07/05 17:32:02 mroi Exp $
+ * $Id: input_stdin_fifo.c,v 1.29 2002/09/04 23:31:08 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -347,21 +347,11 @@ static void stdin_plugin_dispose (input_plugin_t *this_gen ) {
}
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
stdin_input_plugin_t *this;
config_values_t *config;
- if (iface != 8) {
- xine_log (xine, XINE_LOG_PLUGIN,
- _("stdin/fifo input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n"),
- iface);
- return NULL;
- }
-
this = (stdin_input_plugin_t *) xine_xmalloc(sizeof(stdin_input_plugin_t));
config = xine->config;
this->xine = xine;
@@ -393,5 +383,15 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->curpos = 0;
this->nbc = NULL;
- return (input_plugin_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "stdin", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index dae0fdb20..61d368835 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.46 2002/07/05 17:32:02 mroi Exp $
+ * $Id: input_vcd.c,v 1.47 2002/09/04 23:31:08 guenter Exp $
*
*/
@@ -142,7 +142,7 @@ typedef struct {
/*
* Callback for configuratoin changes.
*/
-static void device_change_cb(void *data, cfg_entry_t *cfg) {
+static void device_change_cb (void *data, xine_cfg_entry_t *cfg) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) data;
this->device = cfg->str_value;
@@ -1135,22 +1135,12 @@ static void vcd_plugin_dispose (input_plugin_t *this_gen ) {
/*
*
*/
-input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
+void *init_input_plugin (xine_t *xine, void *data) {
vcd_input_plugin_t *this;
config_values_t *config;
int i;
- if (iface != 8) {
- LOG_MSG(xine,
- _("vcd input plugin doesn't support plugin API version %d.\n"
- "PLUGIN DISABLED.\n"
- "This means there's a version mismatch between xine and this input"
- "plugin.\nInstalling current input plugins should help.\n"),
- iface);
- return NULL;
- }
-
this = (vcd_input_plugin_t *) xine_xmalloc(sizeof(vcd_input_plugin_t));
config = xine->config;
this->xine = xine;
@@ -1182,7 +1172,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->device = config->register_string(config, "input.vcd_device", CDROM,
_("path to your local vcd device file"),
- NULL, device_change_cb, (void *)this);
+ NULL, 10, device_change_cb, (void *)this);
this->mrls = (mrl_t **) xine_xmalloc(sizeof(mrl_t*));
this->mrls_allocated_entries = 0;
@@ -1191,5 +1181,15 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
this->mrl = NULL;
this->config = config;
- return (input_plugin_t *) this;
+ return this;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_INPUT, 8, "vcd", XINE_VERSION_CODE, NULL, init_input_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c
index a3e7a9b78..3065e5885 100644
--- a/src/input/net_buf_ctrl.c
+++ b/src/input/net_buf_ctrl.c
@@ -79,14 +79,14 @@ void nbc_check_buffers (nbc_t *this) {
}
}
- this->xine->metronom->set_speed (this->xine->metronom, SPEED_PAUSE);
+ this->xine->metronom->set_speed (this->xine->metronom, XINE_SPEED_PAUSE);
this->xine->metronom->set_option (this->xine->metronom, METRONOM_SCR_ADJUSTABLE, 0);
if (this->xine->audio_out)
this->xine->audio_out->audio_paused = 2;
this->buffering = 1;
} else if ( (fifo_fill>this->high_water_mark) && (this->buffering)) {
- this->xine->metronom->set_speed (this->xine->metronom, SPEED_NORMAL);
+ this->xine->metronom->set_speed (this->xine->metronom, XINE_SPEED_NORMAL);
this->xine->metronom->set_option (this->xine->metronom, METRONOM_SCR_ADJUSTABLE, 1);
if (this->xine->audio_out)
this->xine->audio_out->audio_paused = 0;