summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
7 files changed, 18 insertions, 29 deletions
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;