summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_dvd.c14
-rw-r--r--src/input/input_file.c16
-rw-r--r--src/input/input_net.c13
-rw-r--r--src/input/input_plugin.h11
-rw-r--r--src/input/input_rtp.c13
-rw-r--r--src/input/input_stdin_fifo.c15
-rw-r--r--src/input/input_vcd.c15
7 files changed, 55 insertions, 42 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 28c20ded7..918c9aa1a 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.32 2001/10/08 18:06:34 jkeil Exp $
+ * $Id: input_dvd.c,v 1.33 2001/10/17 20:33:09 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -732,14 +732,13 @@ static int dvd_plugin_get_optional_data (input_plugin_t *this_gen,
}
-input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
+input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
dvd_input_plugin_t *this;
+ config_values_t *config;
int i;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- if (iface != 3) {
+ if (iface != 4) {
printf("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"
@@ -747,9 +746,10 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
iface);
return NULL;
}
-
- this = (dvd_input_plugin_t *) xmalloc (sizeof (dvd_input_plugin_t));
+ this = (dvd_input_plugin_t *) xmalloc (sizeof (dvd_input_plugin_t));
+ config = xine->config;
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
for (i = 0; i < MAX_DIR_ENTRIES; i++) {
this->filelist[i] = (char *) xmalloc (256);
diff --git a/src/input/input_file.c b/src/input/input_file.c
index f8be3e342..bf104087e 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.25 2001/10/08 18:06:34 jkeil Exp $
+ * $Id: input_file.c,v 1.26 2001/10/17 20:33:09 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -735,12 +735,12 @@ static int file_plugin_get_optional_data (input_plugin_t *this_gen,
/*
*
*/
-input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
- file_input_plugin_t *this;
+input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
- xine_debug = config->lookup_int (config, "xine_debug", 0);
+ file_input_plugin_t *this;
+ config_values_t *config;
- if (iface != 3) {
+ if (iface != 4) {
printf("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"
@@ -749,8 +749,10 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
return NULL;
}
- this = (file_input_plugin_t *) xmalloc (sizeof (file_input_plugin_t));
-
+ this = (file_input_plugin_t *) xmalloc (sizeof (file_input_plugin_t));
+ config = xine->config;
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
+
this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
this->input_plugin.get_capabilities = file_plugin_get_capabilities;
this->input_plugin.open = file_plugin_open;
diff --git a/src/input/input_net.c b/src/input/input_net.c
index 6266fd305..af74335cd 100644
--- a/src/input/input_net.c
+++ b/src/input/input_net.c
@@ -296,13 +296,12 @@ static int net_plugin_get_optional_data (input_plugin_t *this_gen,
/*
*
*/
-input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
+input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
net_input_plugin_t *this;
+ config_values_t *config;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- if (iface != 3) {
+ if (iface != 4) {
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"
@@ -311,8 +310,10 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
return NULL;
}
- this = (net_input_plugin_t *) xmalloc(sizeof(net_input_plugin_t));
-
+ this = (net_input_plugin_t *) xmalloc(sizeof(net_input_plugin_t));
+ config = xine->config;
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
+
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;
diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h
index c6aa19131..979ff9ca1 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.12 2001/08/17 16:15:36 f1rmb Exp $
+ * $Id: input_plugin.h,v 1.13 2001/10/17 20:33:09 guenter Exp $
*/
#ifndef HAVE_INPUT_PLUGIN_H
@@ -33,7 +33,7 @@ extern "C" {
#include "buffer.h"
#include "configfile.h"
-#define INPUT_PLUGIN_IFACE_VERSION 3
+#define INPUT_PLUGIN_IFACE_VERSION 4
/*
* Return pointer of allocate/cleaned memory size *size*.
@@ -309,6 +309,13 @@ struct input_plugin_s
#define INPUT_EVENT_KEYPRESS 2
#define INPUT_EVENT_MOUSEMOVE 3
+/*
+ * each input plugin _must_ implement this function:
+ *
+ * input_plugin_t *init_input_plugin (int iface, xine_t *xine) ;
+ *
+ */
+
#ifdef __cplusplus
}
#endif
diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c
index eaebb5a8f..b83d7ebf2 100644
--- a/src/input/input_rtp.c
+++ b/src/input/input_rtp.c
@@ -455,14 +455,13 @@ static int rtp_plugin_get_optional_data (input_plugin_t *this_gen,
/*
*
*/
-input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
+input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
rtp_input_plugin_t *this;
- int bufn;
+ config_values_t *config;
+ int bufn;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- if (iface != 3) {
+ if (iface != 4) {
printf("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"
@@ -472,7 +471,9 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
}
- this = (rtp_input_plugin_t *) xmalloc(sizeof(rtp_input_plugin_t));
+ this = (rtp_input_plugin_t *) xmalloc(sizeof(rtp_input_plugin_t));
+ config = xine->config;
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
for (bufn = 0; bufn < N_BUFFERS; bufn++) {
input_buffer_t *buf = xmalloc(sizeof(input_buffer_t));
diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c
index 57abf7005..b13271833 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.13 2001/10/05 17:36:28 jkeil Exp $
+ * $Id: input_stdin_fifo.c,v 1.14 2001/10/17 20:33:09 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -251,13 +251,12 @@ static int stdin_plugin_get_optional_data (input_plugin_t *this_gen,
/*
*
*/
-input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
+input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
stdin_input_plugin_t *this;
+ config_values_t *config;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- if (iface != 3) {
+ if (iface != 4) {
printf("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"
@@ -266,8 +265,10 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
return NULL;
}
- this = (stdin_input_plugin_t *) xmalloc(sizeof(stdin_input_plugin_t));
-
+ this = (stdin_input_plugin_t *) xmalloc(sizeof(stdin_input_plugin_t));
+ config = xine->config;
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
+
this->input_plugin.interface_version = INPUT_PLUGIN_IFACE_VERSION;
this->input_plugin.get_capabilities = stdin_plugin_get_capabilities;
this->input_plugin.open = stdin_plugin_open;
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index c596510f2..74b83073e 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.27 2001/10/08 18:06:34 jkeil Exp $
+ * $Id: input_vcd.c,v 1.28 2001/10/17 20:33:09 guenter Exp $
*
*/
@@ -1093,14 +1093,13 @@ static int vcd_plugin_get_optional_data (input_plugin_t *this_gen,
/*
*
*/
-input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
+input_plugin_t *init_input_plugin (int iface, xine_t *xine) {
vcd_input_plugin_t *this;
- int i;
+ config_values_t *config;
+ int i;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- if (iface != 3) {
+ if (iface != 4) {
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"
@@ -1109,7 +1108,9 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) {
return NULL;
}
- this = (vcd_input_plugin_t *) xmalloc(sizeof(vcd_input_plugin_t));
+ this = (vcd_input_plugin_t *) xmalloc(sizeof(vcd_input_plugin_t));
+ config = xine->config;
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
for (i = 0; i < 100; i++) {
this->filelist[i] = (char *) xmalloc (256);