summaryrefslogtreecommitdiff
path: root/src/input/input_dvd.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-07-01 23:37:04 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-07-01 23:37:04 +0000
commit8c396ce1103c341f504a84323532640b65dd4397 (patch)
tree14ca8b50bc26e84282a8d999fb73a02ba94e3a9c /src/input/input_dvd.c
parentf95fc68504d2abfc8405d3c873f565982a2e0fc3 (diff)
downloadxine-lib-8c396ce1103c341f504a84323532640b65dd4397.tar.gz
xine-lib-8c396ce1103c341f504a84323532640b65dd4397.tar.bz2
extended input plugin api for interactive menus and seamless branching
CVS patchset: 239 CVS date: 2001/07/01 23:37:04
Diffstat (limited to 'src/input/input_dvd.c')
-rw-r--r--src/input/input_dvd.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 968af4ce2..e095e5461 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.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_dvd.c,v 1.11 2001/06/23 14:05:47 f1rmb Exp $
+ * $Id: input_dvd.c,v 1.12 2001/07/01 23:37:04 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -554,57 +554,57 @@ static int dvd_plugin_get_optional_data (input_plugin_t *this_gen,
*
*/
input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
+
dvd_input_plugin_t *this;
+ int i;
xine_debug = config->lookup_int (config, "xine_debug", 0);
- switch (iface) {
- case 1: {
- int i;
-
- this = (dvd_input_plugin_t *) malloc (sizeof (dvd_input_plugin_t));
+ if (iface != 2) {
+ printf("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;
+ }
- for (i = 0; i < MAX_DIR_ENTRIES; i++) {
- this->filelist[i] = (char *) malloc (256);
- this->filelist2[i] = (char *) malloc (256);
- this->mrls[i] = (mrl_t *) malloc(sizeof(mrl_t));
+
+ this = (dvd_input_plugin_t *) malloc (sizeof (dvd_input_plugin_t));
+
+ for (i = 0; i < MAX_DIR_ENTRIES; i++) {
+ this->filelist[i] = (char *) malloc (256);
+ this->filelist2[i] = (char *) malloc (256);
+ this->mrls[i] = (mrl_t *) malloc(sizeof(mrl_t));
this->mrls[i]->mrl = (char *) malloc (256);
- }
-
- this->mrls_allocated_entries = MAX_DIR_ENTRIES;
-
- this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
- this->input_plugin.get_capabilities = dvd_plugin_get_capabilities;
- this->input_plugin.open = dvd_plugin_open;
- this->input_plugin.read = dvd_plugin_read;
- this->input_plugin.read_block = dvd_plugin_read_block;
- this->input_plugin.seek = dvd_plugin_seek;
- this->input_plugin.get_current_pos = dvd_plugin_get_current_pos;
- this->input_plugin.get_length = dvd_plugin_get_length;
- this->input_plugin.get_blocksize = dvd_plugin_get_blocksize;
- this->input_plugin.eject_media = dvd_plugin_eject_media;
- this->input_plugin.close = dvd_plugin_close;
- this->input_plugin.get_identifier = dvd_plugin_get_identifier;
- this->input_plugin.get_description = dvd_plugin_get_description;
- this->input_plugin.get_dir = dvd_plugin_get_dir;
- this->input_plugin.get_mrl = dvd_plugin_get_mrl;
- this->input_plugin.get_autoplay_list = dvd_plugin_get_autoplay_list;
- this->input_plugin.get_optional_data = dvd_plugin_get_optional_data;
-
- // this->fh = -1;
- this->mrl = NULL;
- this->config = config;
-
- return (input_plugin_t *) this;
- }
- break;
- default:
- fprintf(stderr,
- "Dvd 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->mrls_allocated_entries = MAX_DIR_ENTRIES;
+
+ this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
+ this->input_plugin.get_capabilities = dvd_plugin_get_capabilities;
+ this->input_plugin.open = dvd_plugin_open;
+ this->input_plugin.read = dvd_plugin_read;
+ this->input_plugin.read_block = dvd_plugin_read_block;
+ this->input_plugin.seek = dvd_plugin_seek;
+ this->input_plugin.get_current_pos = dvd_plugin_get_current_pos;
+ this->input_plugin.get_length = dvd_plugin_get_length;
+ this->input_plugin.get_blocksize = dvd_plugin_get_blocksize;
+ this->input_plugin.eject_media = dvd_plugin_eject_media;
+ this->input_plugin.close = dvd_plugin_close;
+ this->input_plugin.get_identifier = dvd_plugin_get_identifier;
+ this->input_plugin.get_description = dvd_plugin_get_description;
+ this->input_plugin.get_dir = dvd_plugin_get_dir;
+ this->input_plugin.get_mrl = dvd_plugin_get_mrl;
+ this->input_plugin.get_autoplay_list = dvd_plugin_get_autoplay_list;
+ this->input_plugin.get_optional_data = dvd_plugin_get_optional_data;
+ this->input_plugin.handle_input_event= NULL;
+ this->input_plugin.is_branch_possible= NULL;
+
+ this->mrl = NULL;
+ this->config = config;
+ this->dvd_fd = -1;
+ this->raw_fd = -1;
+
+ return (input_plugin_t *) this;
}