diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-10-17 20:33:09 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-10-17 20:33:09 +0000 |
commit | a0eefaaee68440f3d798c1146ac2f4fcd79982a4 (patch) | |
tree | 70058a0f49b8a15010c92464124e89ecfe41aabf | |
parent | adadd9b06d2ef9df5d82bee0e7049b29322ff9f1 (diff) | |
download | xine-lib-a0eefaaee68440f3d798c1146ac2f4fcd79982a4.tar.gz xine-lib-a0eefaaee68440f3d798c1146ac2f4fcd79982a4.tar.bz2 |
demux / input plugin interface change, init functions now have access to the full xine_t *xine. This should enable stream plugins to register SCR plugins. WARNING: delete old input plugins, otherwise xine will crash
CVS patchset: 823
CVS date: 2001/10/17 20:33:09
-rw-r--r-- | src/demuxers/demux.h | 6 | ||||
-rw-r--r-- | src/demuxers/demux_asf.c | 12 | ||||
-rw-r--r-- | src/demuxers/demux_avi.c | 12 | ||||
-rw-r--r-- | src/demuxers/demux_elem.c | 8 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg.c | 12 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 10 | ||||
-rw-r--r-- | src/demuxers/demux_mpgaudio.c | 10 | ||||
-rw-r--r-- | src/demuxers/demux_ogg.c | 12 | ||||
-rw-r--r-- | src/demuxers/demux_pes.c | 12 | ||||
-rw-r--r-- | src/demuxers/demux_qt.c | 18 | ||||
-rw-r--r-- | src/demuxers/demux_ts.c | 12 | ||||
-rw-r--r-- | src/input/input_dvd.c | 14 | ||||
-rw-r--r-- | src/input/input_file.c | 16 | ||||
-rw-r--r-- | src/input/input_net.c | 13 | ||||
-rw-r--r-- | src/input/input_plugin.h | 11 | ||||
-rw-r--r-- | src/input/input_rtp.c | 13 | ||||
-rw-r--r-- | src/input/input_stdin_fifo.c | 15 | ||||
-rw-r--r-- | src/input/input_vcd.c | 15 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 10 |
19 files changed, 132 insertions, 99 deletions
diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h index 3bdcae1b1..7a52364d8 100644 --- a/src/demuxers/demux.h +++ b/src/demuxers/demux.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: demux.h,v 1.9 2001/09/01 14:32:59 guenter Exp $ + * $Id: demux.h,v 1.10 2001/10/17 20:33:09 guenter Exp $ */ #ifndef HAVE_DEMUX_H @@ -35,7 +35,7 @@ extern "C" { #include "input_plugin.h" #endif -#define DEMUXER_PLUGIN_IFACE_VERSION 3 +#define DEMUXER_PLUGIN_IFACE_VERSION 4 #define DEMUX_OK 0 #define DEMUX_FINISHED 1 @@ -135,7 +135,7 @@ struct demux_plugin_s /* * demuxer plugins should provide this (and only this!) function call: * - * demux_plugin_t *init_demux_plugin (int iface_version, config_values_t *cfg); + * demux_plugin_t *init_demux_plugin (int iface_version, xine_t *xine); */ #ifdef __cplusplus diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 548258850..1f9f53c8c 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.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: demux_asf.c,v 1.1 2001/10/14 00:18:27 guenter Exp $ + * $Id: demux_asf.c,v 1.2 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for asf streams * @@ -1076,11 +1076,12 @@ static int demux_asf_get_stream_length (demux_plugin_t *this_gen) { return this->length; } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { - demux_asf_t *this; + demux_asf_t *this; + config_values_t *config; - if (iface != 3) { + if (iface != 4) { printf( "demux_asf: plugin doesn't support plugin API version %d.\n" "demux_asf: this means there's a version mismatch between xine and this " "demux_asf: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -1088,7 +1089,8 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { return NULL; } - this = xmalloc (sizeof (demux_asf_t)); + this = xmalloc (sizeof (demux_asf_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 440ec0bcb..52b3f06cf 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.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: demux_avi.c,v 1.44 2001/10/07 22:11:22 guenter Exp $ + * $Id: demux_avi.c,v 1.45 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for avi streams * @@ -1195,11 +1195,12 @@ static int demux_avi_get_stream_length (demux_plugin_t *this_gen) { return 0; } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { - demux_avi_t *this; + demux_avi_t *this; + config_values_t *config; - if (iface != 3) { + if (iface != 4) { printf( "demux_avi: this plugin doesn't support plugin API version %d.\n" "demux_avi: this means there's a version mismatch between xine and this " "demux_avi: demuxer plugin.\nInstalling current demuxer plugins should help.\n", @@ -1207,7 +1208,8 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { return NULL; } - this = xmalloc (sizeof (demux_avi_t)); + this = xmalloc (sizeof (demux_avi_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c index c15ca3d39..d0ff7374a 100644 --- a/src/demuxers/demux_elem.c +++ b/src/demuxers/demux_elem.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: demux_elem.c,v 1.21 2001/10/03 17:15:43 jkeil Exp $ + * $Id: demux_elem.c,v 1.22 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for elementary mpeg streams * @@ -324,9 +324,10 @@ static int demux_mpeg_elem_get_stream_length(demux_plugin_t *this_gen) { /* * */ -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_mpeg_elem_t *this; + config_values_t *config; if (iface != 3) { printf( "demux_elem: plugin doesn't support plugin API version %d.\n" @@ -336,7 +337,8 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { return NULL; } - this = malloc (sizeof (demux_mpeg_elem_t)); + this = malloc (sizeof (demux_mpeg_elem_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = DEMUX_MPEG_ELEM_IFACE_VERSION; diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 155fa1ac5..a3d0f5939 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.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: demux_mpeg.c,v 1.36 2001/10/09 18:49:33 miguelfreitas Exp $ + * $Id: demux_mpeg.c,v 1.37 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -847,11 +847,12 @@ static int demux_mpeg_get_stream_length (demux_plugin_t *this_gen) { } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { - demux_mpeg_t *this; + demux_mpeg_t *this; + config_values_t *config; - if (iface != 3) { + if (iface != 4) { printf( "demux_mpeg: plugin doesn't support plugin API version %d.\n" "demux_mpeg: this means there's a version mismatch between xine and this " "demux_mpeg: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -859,7 +860,8 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { return NULL; } - this = xmalloc (sizeof (demux_mpeg_t)); + this = xmalloc (sizeof (demux_mpeg_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 004fbc23f..0f5cd1eda 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.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: demux_mpeg_block.c,v 1.53 2001/10/08 01:40:51 miguelfreitas Exp $ + * $Id: demux_mpeg_block.c,v 1.54 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -910,11 +910,12 @@ static int demux_mpeg_block_get_stream_length (demux_plugin_t *this_gen) { } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_mpeg_block_t *this; + config_values_t *config; - if (iface != 3) { + if (iface != 4) { printf( "demux_mpeg: plugin doesn't support plugin API version %d.\n" "demux_mpeg: this means there's a version mismatch between xine and this " "demux_mpeg: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -922,7 +923,8 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { return NULL; } - this = xmalloc (sizeof (demux_mpeg_block_t)); + this = xmalloc (sizeof (demux_mpeg_block_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 606cc8f82..94c0cb30e 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.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: demux_mpgaudio.c,v 1.22 2001/10/03 17:15:43 jkeil Exp $ + * $Id: demux_mpgaudio.c,v 1.23 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -420,11 +420,12 @@ static int demux_mpgaudio_get_stream_length (demux_plugin_t *this_gen) { } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_mpgaudio_t *this; + config_values_t *config; - if (iface != 3) { + if (iface != 4) { printf( "demux_mpeg: plugin doesn't support plugin API version %d.\n" "demux_mpeg: this means there's a version mismatch between xine and this " "demux_mpeg: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -432,7 +433,8 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { return NULL; } - this = malloc (sizeof (demux_mpgaudio_t)); + this = malloc (sizeof (demux_mpgaudio_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = DEMUX_MPGAUDIO_IFACE_VERSION; diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 4f6312e04..ea9a73578 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.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: demux_ogg.c,v 1.3 2001/10/15 00:49:09 guenter Exp $ + * $Id: demux_ogg.c,v 1.4 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for ogg streams * @@ -391,11 +391,12 @@ static int demux_ogg_get_stream_length (demux_plugin_t *this_gen) { return 0; } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { - demux_ogg_t *this; + demux_ogg_t *this; + config_values_t *config; - if (iface != 3) { + if (iface != 4) { printf( "demux_ogg: plugin doesn't support plugin API version %d.\n" "demux_ogg: this means there's a version mismatch between xine and this " "demux_ogg: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -403,7 +404,8 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { return NULL; } - this = xmalloc (sizeof (demux_ogg_t)); + this = xmalloc (sizeof (demux_ogg_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c index f493fc21c..25075b389 100644 --- a/src/demuxers/demux_pes.c +++ b/src/demuxers/demux_pes.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: demux_pes.c,v 1.8 2001/10/03 17:15:43 jkeil Exp $ + * $Id: demux_pes.c,v 1.9 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for mpeg 2 PES (Packetized Elementary Streams) * reads streams of variable blocksizes @@ -559,11 +559,12 @@ static int demux_pes_get_stream_length (demux_plugin_t *this_gen) { return 0; /* FIXME: implement */ } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { - demux_pes_t *this; + demux_pes_t *this; + config_values_t *config; - if (iface != 3) { + if (iface != 4) { printf( "demux_pes: plugin doesn't support plugin API version %d.\n" "demux_pes: this means there's a version mismatch between xine and this " "demux_pes: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -571,7 +572,8 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { return NULL; } - this = xmalloc (sizeof (demux_pes_t)); + this = xmalloc (sizeof (demux_pes_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = 3; diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index e9bfb573d..1c4cd67d1 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.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: demux_qt.c,v 1.6 2001/10/03 17:15:43 jkeil Exp $ + * $Id: demux_qt.c,v 1.7 2001/10/17 20:33:09 guenter Exp $ * * demultiplexer for quicktime streams, based on: * @@ -4377,19 +4377,21 @@ static int demux_qt_get_stream_length (demux_plugin_t *this_gen) { return this->video_step * quicktime_video_length (this->qt, 0); } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { - demux_qt_t *this; + demux_qt_t *this; + config_values_t *config; - if (iface != 3) { - printf( "demux_mpeg: plugin doesn't support plugin API version %d.\n" - "demux_mpeg: this means there's a version mismatch between xine and this " - "demux_mpeg: demuxer plugin.\nInstalling current demux plugins should help.\n", + if (iface != 4) { + printf( "demux_qt: plugin doesn't support plugin API version %d.\n" + "demux_qt: this means there's a version mismatch between xine and this " + "demux_qt: demuxer plugin.\nInstalling current demux plugins should help.\n", iface); return NULL; } - this = xmalloc (sizeof (demux_qt_t)); + this = xmalloc (sizeof (demux_qt_t)); + config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index ed782ec10..982e466a4 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.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: demux_ts.c,v 1.17 2001/10/03 17:15:43 jkeil Exp $ + * $Id: demux_ts.c,v 1.18 2001/10/17 20:33:09 guenter Exp $ * * Demultiplexer for MPEG2 Transport Streams. * @@ -967,12 +967,13 @@ static int demux_ts_get_stream_length (demux_plugin_t *this_gen) { } -demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { +demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { - demux_ts *this; - int i; + demux_ts *this; + config_values_t *config; + int i; - if (iface != 3) { + if (iface != 4) { printf("demux_ts: plugin doesn't support plugin API version %d.\n" "demux_ts: this means there's a version mismatch between xine and this " "demux_ts: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -984,6 +985,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) { * Initialise the generic plugin. */ this = xmalloc(sizeof(*this)); + config = xine->config; xine_debug = config->lookup_int(config, "xine_debug", 0); this->plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; this->plugin.open = demux_ts_open; 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); diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 2af397936..ec5908416 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.43 2001/10/06 17:40:38 heikos Exp $ + * $Id: load_plugins.c,v 1.44 2001/10/17 20:33:09 guenter Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -96,12 +96,12 @@ void load_demux_plugins (xine_t *this, str, dlerror()); } else { - void *(*initplug) (int, config_values_t *); + void *(*initplug) (int, xine_t *); if((initplug = dlsym(plugin, "init_demuxer_plugin")) != NULL) { demux_plugin_t *dxp; - dxp = (demux_plugin_t *) initplug(iface_version, config); + dxp = (demux_plugin_t *) initplug(iface_version, this); if (dxp) { this->demuxer_plugins[this->num_demuxer_plugins] = dxp; @@ -172,12 +172,12 @@ void load_input_plugins (xine_t *this, printf("load_plugins: cannot open input plugin %s:\n%s\n", str, dlerror()); } else { - void *(*initplug) (int, config_values_t *); + void *(*initplug) (int, xine_t *); if((initplug = dlsym(plugin, "init_input_plugin")) != NULL) { input_plugin_t *ip; - ip = (input_plugin_t *) initplug(iface_version, config); + ip = (input_plugin_t *) initplug(iface_version, this); if (ip) { this->input_plugins[this->num_input_plugins] = ip; |