From 31f9517d0a924c20dae8b9c6d5cc839c48b0311a Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Fri, 17 Aug 2001 16:15:36 +0000 Subject: Add xine_seek() and friends. CVS patchset: 446 CVS date: 2001/08/17 16:15:36 --- src/input/input_dvd.c | 14 +++++++++++--- src/input/input_file.c | 14 ++++++++++++-- src/input/input_net.c | 11 ++++++++++- src/input/input_plugin.h | 10 ++++++++-- src/input/input_rtp.c | 10 +++++++++- src/input/input_stdin_fifo.c | 12 ++++++++++-- src/input/input_vcd.c | 12 ++++++++++-- 7 files changed, 70 insertions(+), 13 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index c8dbadc6f..bc31976c7 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.18 2001/07/28 13:23:24 guenter Exp $ + * $Id: input_dvd.c,v 1.19 2001/08/17 16:15:36 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -405,6 +405,13 @@ static void dvd_plugin_close (input_plugin_t *this_gen) { closeDrive (this); } +/* + * + */ +static void dvd_plugin_stop (input_plugin_t *this_gen) { + dvd_plugin_close(this_gen); +} + /* * */ @@ -599,8 +606,8 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { xine_debug = config->lookup_int (config, "xine_debug", 0); - if (iface != 2) { - printf("vcd input plugin doesn't support plugin API version %d.\n" + if (iface != 3) { + 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" "plugin.\nInstalling current input plugins should help.\n", @@ -627,6 +634,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { 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.stop = dvd_plugin_stop; 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; diff --git a/src/input/input_file.c b/src/input/input_file.c index be260f66e..434626367 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.17 2001/07/11 10:15:27 f1rmb Exp $ + * $Id: input_file.c,v 1.18 2001/08/17 16:15:36 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -675,6 +675,15 @@ static void file_plugin_close (input_plugin_t *this_gen) { this->fh = -1; } +/* + * + */ +static void file_plugin_stop (input_plugin_t *this_gen) { + + xprintf (VERBOSE|INPUT, "stopping input\n"); + file_plugin_close(this_gen); +} + /* * */ @@ -706,7 +715,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { xine_debug = config->lookup_int (config, "xine_debug", 0); - if (iface != 2) { + if (iface != 3) { 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" @@ -730,6 +739,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { this->input_plugin.eject_media = file_plugin_eject_media; this->input_plugin.get_mrl = file_plugin_get_mrl; this->input_plugin.close = file_plugin_close; + this->input_plugin.stop = file_plugin_stop; this->input_plugin.get_description = file_plugin_get_description; this->input_plugin.get_identifier = file_plugin_get_identifier; this->input_plugin.get_autoplay_list = NULL; diff --git a/src/input/input_net.c b/src/input/input_net.c index 3d0e6170b..e6cd76f14 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -252,6 +252,14 @@ static void net_plugin_close (input_plugin_t *this_gen) { this->fh = -1; } +/* + * + */ +static void net_plugin_stop (input_plugin_t *this_gen) { + + net_plugin_close(this_gen); +} + /* * */ @@ -293,7 +301,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { xine_debug = config->lookup_int (config, "xine_debug", 0); - if (iface != 2) { + if (iface != 3) { 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" @@ -317,6 +325,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { 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.stop = net_plugin_stop; 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; diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index fa4e0a656..c6aa19131 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.11 2001/08/16 12:33:00 ehasenle Exp $ + * $Id: input_plugin.h,v 1.12 2001/08/17 16:15:36 f1rmb Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H @@ -33,7 +33,7 @@ extern "C" { #include "buffer.h" #include "configfile.h" -#define INPUT_PLUGIN_IFACE_VERSION 2 +#define INPUT_PLUGIN_IFACE_VERSION 3 /* * Return pointer of allocate/cleaned memory size *size*. @@ -233,6 +233,12 @@ struct input_plugin_s char * (*get_mrl) (input_plugin_t *this); + /* + * stop input source + */ + void (*stop) (input_plugin_t *this); + + /* * close input source */ diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index b18082609..31dcf403d 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -398,6 +398,13 @@ static void rtp_plugin_close (input_plugin_t *this_gen) { this->fh = -1; } +/* + * + */ +static void rtp_plugin_stop (input_plugin_t *this_gen) { + rtp_plugin_stop(this_gen); +} + /* * */ @@ -450,7 +457,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { xine_debug = config->lookup_int (config, "xine_debug", 0); - if (iface != 2) { + if (iface != 3) { 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" @@ -488,6 +495,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { this->input_plugin.get_blocksize = rtp_plugin_get_blocksize; this->input_plugin.eject_media = rtp_plugin_eject_media; this->input_plugin.close = rtp_plugin_close; + this->input_plugin.stop = rtp_plugin_stop; this->input_plugin.get_identifier = rtp_plugin_get_identifier; this->input_plugin.get_description = rtp_plugin_get_description; this->input_plugin.get_dir = NULL; diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c index 98f0c7c34..5a47c870b 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.10 2001/07/27 22:00:27 f1rmb Exp $ + * $Id: input_stdin_fifo.c,v 1.11 2001/08/17 16:15:36 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -217,6 +217,13 @@ static void stdin_plugin_close(input_plugin_t *this_gen) { this->fh = -1; } +/* + * + */ +static void stdin_plugin_stop(input_plugin_t *this_gen) { + stdin_plugin_close(this_gen); +} + /* * */ @@ -249,7 +256,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { xine_debug = config->lookup_int (config, "xine_debug", 0); - if (iface != 2) { + if (iface != 3) { 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" @@ -273,6 +280,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { this->input_plugin.eject_media = stdin_plugin_eject_media; this->input_plugin.get_mrl = stdin_plugin_get_mrl; this->input_plugin.close = stdin_plugin_close; + this->input_plugin.stop = stdin_plugin_stop; this->input_plugin.get_description = stdin_plugin_get_description; this->input_plugin.get_identifier = stdin_plugin_get_identifier; this->input_plugin.get_autoplay_list = NULL; diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 27142decc..657f013f7 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.18 2001/07/27 22:00:27 f1rmb Exp $ + * $Id: input_vcd.c,v 1.19 2001/08/17 16:15:36 f1rmb Exp $ */ #ifdef HAVE_CONFIG_H @@ -905,6 +905,13 @@ static void vcd_plugin_close (input_plugin_t *this_gen) { this->fd = -1; } +/* + * + */ +static void vcd_plugin_stop (input_plugin_t *this_gen) { + vcd_plugin_close(this_gen); +} + /* * */ @@ -1077,7 +1084,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { xine_debug = config->lookup_int (config, "xine_debug", 0); - if (iface != 2) { + if (iface != 3) { 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" @@ -1103,6 +1110,7 @@ input_plugin_t *init_input_plugin (int iface, config_values_t *config) { this->input_plugin.get_blocksize = vcd_plugin_get_blocksize; this->input_plugin.eject_media = vcd_plugin_eject_media; this->input_plugin.close = vcd_plugin_close; + this->input_plugin.stop = vcd_plugin_stop; this->input_plugin.get_identifier = vcd_plugin_get_identifier; this->input_plugin.get_description = vcd_plugin_get_description; this->input_plugin.get_dir = vcd_plugin_get_dir; -- cgit v1.2.3