summaryrefslogtreecommitdiff
path: root/src/input/input_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/input_net.c')
-rw-r--r--src/input/input_net.c71
1 files changed, 35 insertions, 36 deletions
diff --git a/src/input/input_net.c b/src/input/input_net.c
index df2ee9e83..10df55896 100644
--- a/src/input/input_net.c
+++ b/src/input/input_net.c
@@ -293,42 +293,41 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
xine_debug = config->lookup_int (config, "xine_debug", 0);
- switch (iface) {
- case 1:
- this = (net_input_plugin_t *) malloc (sizeof (net_input_plugin_t));
-
- this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
- this->input_plugin.get_capabilities = net_plugin_get_capabilities;
- this->input_plugin.open = net_plugin_open;
- this->input_plugin.read = net_plugin_read;
- this->input_plugin.read_block = NULL;
- this->input_plugin.seek = NULL;
- this->input_plugin.get_current_pos = net_plugin_get_current_pos;
- this->input_plugin.get_length = net_plugin_get_length;
- this->input_plugin.get_blocksize = net_plugin_get_blocksize;
- this->input_plugin.get_dir = NULL;
- this->input_plugin.eject_media = net_plugin_eject_media;
- this->input_plugin.get_mrl = net_plugin_get_mrl;
- this->input_plugin.close = net_plugin_close;
- this->input_plugin.get_description = net_plugin_get_description;
- this->input_plugin.get_identifier = net_plugin_get_identifier;
- this->input_plugin.get_autoplay_list = NULL;
- this->input_plugin.get_optional_data = net_plugin_get_optional_data;
-
- this->fh = -1;
- this->mrl = NULL;
- this->config = config;
- this->curpos = 0;
-
- return (input_plugin_t *) this;
- break;
- default:
- fprintf(stderr,
- "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);
+ if (iface != 2) {
+ printf("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 *) malloc (sizeof (net_input_plugin_t));
+
+ this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
+ this->input_plugin.get_capabilities = net_plugin_get_capabilities;
+ this->input_plugin.open = net_plugin_open;
+ this->input_plugin.read = net_plugin_read;
+ this->input_plugin.read_block = NULL;
+ this->input_plugin.seek = NULL;
+ this->input_plugin.get_current_pos = net_plugin_get_current_pos;
+ this->input_plugin.get_length = net_plugin_get_length;
+ this->input_plugin.get_blocksize = net_plugin_get_blocksize;
+ this->input_plugin.get_dir = NULL;
+ this->input_plugin.eject_media = net_plugin_eject_media;
+ this->input_plugin.get_mrl = net_plugin_get_mrl;
+ this->input_plugin.close = net_plugin_close;
+ this->input_plugin.get_description = net_plugin_get_description;
+ this->input_plugin.get_identifier = net_plugin_get_identifier;
+ this->input_plugin.get_autoplay_list = NULL;
+ this->input_plugin.get_optional_data = net_plugin_get_optional_data;
+ this->input_plugin.handle_input_event= NULL;
+ this->input_plugin.is_branch_possible= NULL;
+
+ this->fh = -1;
+ this->mrl = NULL;
+ this->config = config;
+ this->curpos = 0;
+
+ return (input_plugin_t *) this;
}