summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/input')
-rw-r--r--src/input/input_cda.c10
-rw-r--r--src/input/input_dvd.c22
-rw-r--r--src/input/input_file.c6
-rw-r--r--src/input/input_plugin.h6
-rw-r--r--src/input/input_vcd.c10
5 files changed, 29 insertions, 25 deletions
diff --git a/src/input/input_cda.c b/src/input/input_cda.c
index 202db5af6..6409da03e 100644
--- a/src/input/input_cda.c
+++ b/src/input/input_cda.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_cda.c,v 1.33 2002/09/06 18:13:10 mroi Exp $
+ * $Id: input_cda.c,v 1.34 2002/09/22 14:29:40 mroi Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1619,7 +1619,7 @@ static char *cda_plugin_get_identifier (input_plugin_t *this_gen) {
/*
* Get dir.
*/
-static const xine_mrl_t *const *cda_plugin_get_dir (input_plugin_t *this_gen,
+static xine_mrl_t **cda_plugin_get_dir (input_plugin_t *this_gen,
const char *filename, int *nEntries) {
cda_input_plugin_t *this = (cda_input_plugin_t *) this_gen;
int i;
@@ -1695,13 +1695,13 @@ static const xine_mrl_t *const *cda_plugin_get_dir (input_plugin_t *this_gen,
_LEAVE_FUNC();
- return (const xine_mrl_t *const *)this->mrls;
+ return this->mrls;
}
/*
* Get autoplay.
*/
-static const char *const *cda_plugin_get_autoplay_list (input_plugin_t *this_gen, int *nFiles) {
+static char **cda_plugin_get_autoplay_list (input_plugin_t *this_gen, int *nFiles) {
cda_input_plugin_t *this = (cda_input_plugin_t *) this_gen;
int i;
@@ -1743,7 +1743,7 @@ static const char *const *cda_plugin_get_autoplay_list (input_plugin_t *this_gen
_LEAVE_FUNC();
- return (const char *const *)this->filelist;
+ return this->filelist;
}
/*
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 7aff937a2..e2faa731c 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,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.88 2002/09/20 13:24:53 mroi Exp $
+ * $Id: input_dvd.c,v 1.89 2002/09/22 14:29:40 mroi Exp $
*
*/
@@ -82,7 +82,7 @@
#include "xine_internal.h"
/* Print debug messages? */
-#define INPUT_DEBUG
+/* #define INPUT_DEBUG */
/* Print trace messages? */
/* #define INPUT_DEBUG_TRACE */
@@ -874,7 +874,7 @@ static uint32_t dvdnav_plugin_get_blocksize (input_plugin_t *this_gen) {
return DVD_BLOCK_SIZE;
}
-static const xine_mrl_t *const *dvdnav_plugin_get_dir (input_plugin_t *this_gen,
+static xine_mrl_t **dvdnav_plugin_get_dir (input_plugin_t *this_gen,
const char *filename, int *nFiles) {
dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t*)this_gen;
@@ -883,7 +883,7 @@ static const xine_mrl_t *const *dvdnav_plugin_get_dir (input_plugin_t *this_gen,
dvdnav_build_mrl_list((dvdnav_input_plugin_t *) this_gen);
*nFiles = this->num_mrls;
- return (const xine_mrl_t *const *)this->mrls;
+ return this->mrls;
}
static int dvdnav_umount_media(char *device)
@@ -1354,7 +1354,7 @@ static int dvdnav_plugin_get_optional_data (input_plugin_t *this_gen,
return INPUT_OPTIONAL_UNSUPPORTED;
}
-static const char *const *dvdnav_plugin_get_autoplay_list (input_plugin_t *this_gen,
+static char **dvdnav_plugin_get_autoplay_list (input_plugin_t *this_gen,
int *nFiles) {
dvdnav_input_plugin_t *this = (dvdnav_input_plugin_t *) this_gen;
int titles, i;
@@ -1376,7 +1376,7 @@ static const char *const *dvdnav_plugin_get_autoplay_list (input_plugin_t *this_
filelist2[i] = &(filelist[i][0]);
}
filelist2[*nFiles] = NULL;
- return (const char *const *)filelist2;
+ return filelist2;
/* Return a list of all titles */
snprintf (&(filelist[0][0]), MAX_STR_LEN, "dvd://");
filelist2[0] = &(filelist[0][0]);
@@ -1392,7 +1392,7 @@ static const char *const *dvdnav_plugin_get_autoplay_list (input_plugin_t *this_
printf("input_dvd: get_autoplay_list exiting opened=%d dvdnav=%p\n",this->opened, this->dvdnav);
#endif
- return (const char *const *)filelist2;
+ return filelist2;
}
void dvdnav_plugin_dispose(input_plugin_t *this_gen) {
@@ -1547,8 +1547,12 @@ static void *init_input_plugin (xine_t *xine, void *data) {
/*
* $Log: input_dvd.c,v $
- * Revision 1.88 2002/09/20 13:24:53 mroi
- * another bit of language display tweaking
+ * Revision 1.89 2002/09/22 14:29:40 mroi
+ * API review part I
+ * - bring our beloved xine_t * back (no more const there)
+ * - remove const on some input plugin functions
+ * where the data changes with media (dvd, ...) changes
+ * and is therefore not const
*
* Revision 1.86 2002/09/18 10:03:07 jcdutton
* Fix a seg fault.
diff --git a/src/input/input_file.c b/src/input/input_file.c
index 3a413d680..2550cd2ca 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.59 2002/09/19 00:23:29 guenter Exp $
+ * $Id: input_file.c,v 1.60 2002/09/22 14:29:40 mroi Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -427,7 +427,7 @@ static int is_a_dir(char *filepathname) {
/*
*
*/
-static const xine_mrl_t *const *file_plugin_get_dir (input_plugin_t *this_gen,
+static xine_mrl_t **file_plugin_get_dir (input_plugin_t *this_gen,
const char *filename, int *nFiles) {
file_input_plugin_t *this = (file_input_plugin_t *) this_gen;
struct dirent *pdirent;
@@ -740,7 +740,7 @@ static const xine_mrl_t *const *file_plugin_get_dir (input_plugin_t *this_gen,
}
*/
- return (const xine_mrl_t *const *)this->mrls;
+ return this->mrls;
}
/*
diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h
index 039f11962..360cd9447 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.30 2002/09/06 18:13:11 mroi Exp $
+ * $Id: input_plugin.h,v 1.31 2002/09/22 14:29:40 mroi Exp $
*/
#ifndef HAVE_INPUT_PLUGIN_H
@@ -199,7 +199,7 @@ struct input_plugin_s
* ls function
* return value: NULL => filename is a file, **char=> filename is a dir
*/
- const xine_mrl_t *const * (*get_dir) (input_plugin_t *this, const char *filename, int *nFiles);
+ xine_mrl_t ** (*get_dir) (input_plugin_t *this, const char *filename, int *nFiles);
/*
@@ -246,7 +246,7 @@ struct input_plugin_s
* generate autoplay list
* return value: list of MRLs
*/
- const char *const * (*get_autoplay_list) (input_plugin_t *this, int *nFiles);
+ char ** (*get_autoplay_list) (input_plugin_t *this, int *nFiles);
/*
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index 7db42ae72..a246cf8b7 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.51 2002/09/06 18:13:11 mroi Exp $
+ * $Id: input_vcd.c,v 1.52 2002/09/22 14:29:40 mroi Exp $
*
*/
@@ -974,7 +974,7 @@ static char *vcd_plugin_get_identifier (input_plugin_t *this_gen) {
/*
*
*/
-static const xine_mrl_t *const *vcd_plugin_get_dir (input_plugin_t *this_gen,
+static xine_mrl_t **vcd_plugin_get_dir (input_plugin_t *this_gen,
const char *filename, int *nEntries) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
@@ -1054,13 +1054,13 @@ static const xine_mrl_t *const *vcd_plugin_get_dir (input_plugin_t *this_gen,
this->mrls[*nEntries] = NULL;
- return (const xine_mrl_t *const *)this->mrls;
+ return this->mrls;
}
/*
*
*/
-static const char *const *vcd_plugin_get_autoplay_list (input_plugin_t *this_gen,
+static char **vcd_plugin_get_autoplay_list (input_plugin_t *this_gen,
int *nFiles) {
vcd_input_plugin_t *this = (vcd_input_plugin_t *) this_gen;
@@ -1101,7 +1101,7 @@ static const char *const *vcd_plugin_get_autoplay_list (input_plugin_t *this_gen
this->filelist[i - 1] = (char *) realloc(this->filelist[i-1], sizeof(char *));
this->filelist[i - 1] = NULL;
- return (const char *const *)this->filelist;
+ return this->filelist;
}
/*