summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xine.h6
-rw-r--r--include/xine/input_plugin.h2
-rw-r--r--src/input/input_bluray.c8
-rw-r--r--src/input/input_cdda.c4
-rw-r--r--src/input/input_dvb.c4
-rw-r--r--src/input/input_dvd.c15
-rw-r--r--src/input/input_vcd.c2
-rw-r--r--src/vdr/input_vdr.c10
-rw-r--r--src/xine-engine/load_plugins.c4
9 files changed, 22 insertions, 33 deletions
diff --git a/include/xine.h b/include/xine.h
index d6f54b7d9..c04e270c2 100644
--- a/include/xine.h
+++ b/include/xine.h
@@ -1105,9 +1105,9 @@ xine_mrl_t **xine_get_browse_mrls (xine_t *self,
const char *const *xine_get_autoplay_input_plugin_ids (xine_t *self) XINE_PROTECTED;
/* get autoplay MRL list from input plugin named <plugin_id> */
-char **xine_get_autoplay_mrls (xine_t *self,
- const char *plugin_id,
- int *num_mrls) XINE_PROTECTED;
+const char * const *xine_get_autoplay_mrls (xine_t *self,
+ const char *plugin_id,
+ int *num_mrls) XINE_PROTECTED;
/* get a list of file extensions for file types supported by xine
* the list is separated by spaces
diff --git a/include/xine/input_plugin.h b/include/xine/input_plugin.h
index 1d2e0bb43..ca7ec73fa 100644
--- a/include/xine/input_plugin.h
+++ b/include/xine/input_plugin.h
@@ -72,7 +72,7 @@ struct input_class_s {
* generate autoplay list, optional: may be NULL
* return value: list of MRLs
*/
- char ** (*get_autoplay_list) (input_class_t *this, int *num_files);
+ const char * const * (*get_autoplay_list) (input_class_t *this, int *num_files);
/*
* close down, free all resources
diff --git a/src/input/input_bluray.c b/src/input/input_bluray.c
index 2897af83a..293116944 100644
--- a/src/input/input_bluray.c
+++ b/src/input/input_bluray.c
@@ -1539,13 +1539,13 @@ static void free_xine_playlist(bluray_input_class_t *this)
this->xine_playlist_size = 0;
}
-static char **bluray_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
+static const char * const *bluray_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
{
static const char * const autoplay_list[] = { "bluray:/", NULL };
*num_files = 1;
- return (char**)autoplay_list;
+ return autoplay_list;
}
static xine_mrl_t **bluray_class_get_dir(input_class_t *this_gen, const char *filename, int *nFiles)
@@ -1691,13 +1691,13 @@ static void *bluray_init_plugin (xine_t *xine, void *data)
return this;
}
-static char **bd_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
+static const char * const *bd_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
{
static const char * const autoplay_list[] = { "bd:/", NULL };
*num_files = 1;
- return (char **)autoplay_list;
+ return autoplay_list;
}
static void *bd_init_plugin (xine_t *xine, void *data)
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c
index 08229874c..6f6f23ef2 100644
--- a/src/input/input_cdda.c
+++ b/src/input/input_cdda.c
@@ -2451,7 +2451,7 @@ static void free_autoplay_list(cdda_input_class_t *this)
}
}
-static char ** cdda_class_get_autoplay_list (input_class_t *this_gen,
+static const char * const * cdda_class_get_autoplay_list (input_class_t *this_gen,
int *num_files) {
cdda_input_class_t *this = (cdda_input_class_t *) this_gen;
@@ -2529,7 +2529,7 @@ static char ** cdda_class_get_autoplay_list (input_class_t *this_gen,
free_cdrom_toc(toc);
if (ip != this->ip) free(ip);
- return this->autoplaylist;
+ return (const char * const *)this->autoplaylist;
}
static input_plugin_t *cdda_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream,
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index b5833871f..14fac6eec 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -3178,7 +3178,7 @@ static int dvb_class_eject_media (input_class_t *this_gen) {
}
-static char **dvb_class_get_autoplay_list(input_class_t * this_gen,
+static const char * const *dvb_class_get_autoplay_list(input_class_t * this_gen,
int *num_files)
{
dvb_input_class_t *class = (dvb_input_class_t *) this_gen;
@@ -3247,7 +3247,7 @@ static char **dvb_class_get_autoplay_list(input_class_t * this_gen,
*num_files = num_channels + lastchannel_enable.num_value;
class->numchannels = *num_files;
- return class->autoplaylist;
+ return (const char * const *)class->autoplaylist;
}
static void *init_class (xine_t *xine, void *data) {
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index c46481271..8bf8ab580 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -157,10 +157,6 @@
# endif /* _MSC_VER */
#endif
-/* Array to hold MRLs returned by get_autoplay_list */
-#define MAX_DIR_ENTRIES 1250
-#define MAX_STR_LEN 255
-
#if defined (__FreeBSD__)
# define off64_t off_t
# define lseek64 lseek
@@ -236,8 +232,6 @@ typedef struct {
int32_t region;
int32_t play_single_chapter;
- const char *filelist[MAX_DIR_ENTRIES];
-
} dvd_input_class_t;
static void dvd_handle_events(dvd_input_plugin_t *this);
@@ -1709,17 +1703,16 @@ static xine_mrl_t **dvd_class_get_dir (input_class_t *this_gen,
}
#endif
-static char **dvd_class_get_autoplay_list (input_class_t *this_gen,
+static const char * const *dvd_class_get_autoplay_list (input_class_t *this_gen,
int *num_files) {
- dvd_input_class_t *this = (dvd_input_class_t *) this_gen;
+ static const char * const filelist[] = {"dvd:/", NULL};
+
trace_print("get_autoplay_list entered\n");
- this->filelist[0] = "dvd:/";
- this->filelist[1] = NULL;
*num_files = 1;
- return this->filelist;
+ return filelist;
}
static void dvd_class_dispose(input_class_t *this_gen) {
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index b15130500..6eee5075a 100644
--- a/src/input/input_vcd.c
+++ b/src/input/input_vcd.c
@@ -1058,7 +1058,7 @@ static char ** vcd_class_get_autoplay_list (input_class_t *this_gen, int *num_fi
/* printf ("%d tracks\n", this->total_tracks); */
- return this->filelist;
+ return (const char * const *)this->filelist;
}
static void *init_class (xine_t *xine, void *data) {
diff --git a/src/vdr/input_vdr.c b/src/vdr/input_vdr.c
index 9a6ced8d0..793d1b41b 100644
--- a/src/vdr/input_vdr.c
+++ b/src/vdr/input_vdr.c
@@ -178,7 +178,6 @@ typedef struct
{
input_class_t input_class;
xine_t *xine;
- const char *mrls[ 2 ];
}
vdr_input_class_t;
@@ -2740,13 +2739,13 @@ static input_plugin_t *vdr_class_get_instance(input_class_t *cls_gen, xine_strea
/*
* vdr input plugin class stuff
*/
-static char **vdr_class_get_autoplay_list(input_class_t *this_gen,
+static const char * const *vdr_class_get_autoplay_list(input_class_t *this_gen,
int *num_files)
{
- vdr_input_class_t *class = (vdr_input_class_t *)this_gen;
+ static const char * const mrls[] = {"vdr:/" VDR_ABS_FIFO_DIR "/stream#demux:mpeg_pes", NULL};
*num_files = 1;
- return (char **)class->mrls;
+ return mrls;
}
void *vdr_input_init_plugin(xine_t *xine, void *data)
@@ -2759,9 +2758,6 @@ void *vdr_input_init_plugin(xine_t *xine, void *data)
this->xine = xine;
- this->mrls[ 0 ] = "vdr:/" VDR_ABS_FIFO_DIR "/stream#demux:mpeg_pes";
- this->mrls[ 1 ] = 0;
-
this->input_class.get_instance = vdr_class_get_instance;
this->input_class.identifier = "VDR";
this->input_class.description = N_("VDR display device plugin");
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 3063ba4df..7623008dd 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -2028,8 +2028,8 @@ void xine_close_video_driver (xine_t *this, xine_video_port_t *vo_port) {
* get autoplay mrl list from input plugin
*/
-char **xine_get_autoplay_mrls (xine_t *this, const char *plugin_id,
- int *num_mrls) {
+const char * const *xine_get_autoplay_mrls (xine_t *this, const char *plugin_id,
+ int *num_mrls) {
plugin_catalog_t *catalog;
plugin_node_t *node;