aboutsummaryrefslogtreecommitdiffhomepage
path: root/libvo
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-02 14:24:23 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-02 14:24:23 +0000
commit844c8ffc48c7e7715c43a1290188f5bdfa289821 (patch)
tree84f08c54b7cce8b02b146221488939235da9fe28 /libvo
parentbbab104b7e5238c510f51a8e671b3d8f4fcbfa0a (diff)
Mark several uses of vo_functions_t as const to stop some of the current
hacks e.g. in vidix code from spreading. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25247 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/video_out.c10
-rw-r--r--libvo/video_out.h6
-rw-r--r--libvo/vo_dxr2.c2
-rw-r--r--libvo/vo_xover.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 53aeb3eca1..98feb468d7 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -147,7 +147,7 @@ extern vo_functions_t video_out_pnm;
extern vo_functions_t video_out_md5sum;
#endif
-vo_functions_t* video_out_drivers[] =
+const vo_functions_t* const video_out_drivers[] =
{
#ifdef HAVE_XVR100
&video_out_xvr100,
@@ -288,7 +288,7 @@ void list_video_out(void){
mp_msg(MSGT_GLOBAL, MSGL_INFO,"\n");
}
-vo_functions_t* init_best_video_out(char** vo_list){
+const vo_functions_t* init_best_video_out(char** vo_list){
int i;
// first try the preferred drivers, with their optional subdevice param:
if(vo_list && vo_list[0])
@@ -304,7 +304,7 @@ vo_functions_t* init_best_video_out(char** vo_list){
++vo_subdevice;
}
for(i=0;video_out_drivers[i];i++){
- vo_functions_t* video_driver=video_out_drivers[i];
+ const vo_functions_t* video_driver=video_out_drivers[i];
const vo_info_t *info = video_driver->info;
if(!strcmp(info->short_name,vo)){
// name matches, try it
@@ -323,14 +323,14 @@ vo_functions_t* init_best_video_out(char** vo_list){
// now try the rest...
vo_subdevice=NULL;
for(i=0;video_out_drivers[i];i++){
- vo_functions_t* video_driver=video_out_drivers[i];
+ const vo_functions_t* video_driver=video_out_drivers[i];
if(!video_driver->preinit(vo_subdevice))
return video_driver; // success!
}
return NULL;
}
-int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height,
+int config_video_out(const vo_functions_t *vo, uint32_t width, uint32_t height,
uint32_t d_width, uint32_t d_height, uint32_t flags,
char *title, uint32_t format) {
panscan_init();
diff --git a/libvo/video_out.h b/libvo/video_out.h
index ee31c8735b..443654692c 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -176,14 +176,14 @@ typedef struct vo_functions_s
} vo_functions_t;
-vo_functions_t* init_best_video_out(char** vo_list);
-int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height,
+const vo_functions_t* init_best_video_out(char** vo_list);
+int config_video_out(const vo_functions_t *vo, uint32_t width, uint32_t height,
uint32_t d_width, uint32_t d_height, uint32_t flags,
char *title, uint32_t format);
void list_video_out(void);
// NULL terminated array of all drivers
-extern vo_functions_t* video_out_drivers[];
+extern const vo_functions_t* const video_out_drivers[];
extern int vo_flags;
diff --git a/libvo/vo_dxr2.c b/libvo/vo_dxr2.c
index f2c9509b47..a424e5e6f3 100644
--- a/libvo/vo_dxr2.c
+++ b/libvo/vo_dxr2.c
@@ -37,7 +37,7 @@ static int movie_w,movie_h;
static int playing = 0;
// vo device used to blank the screen for the overlay init
-static vo_functions_t* sub_vo = NULL;
+static const vo_functions_t* sub_vo = NULL;
static uint8_t* sub_img = NULL;
static int sub_x,sub_y,sub_w,sub_h;
diff --git a/libvo/vo_xover.c b/libvo/vo_xover.c
index 9c1275b542..46f8f83fcf 100644
--- a/libvo/vo_xover.c
+++ b/libvo/vo_xover.c
@@ -67,7 +67,7 @@ static uint32_t window_width, window_height;
static uint32_t drwX, drwY, drwWidth, drwHeight, drwBorderWidth,
drwDepth, drwcX, drwcY, dwidth, dheight;
-static vo_functions_t* sub_vo = NULL;
+static const vo_functions_t* sub_vo = NULL;
static void set_window(int force_update)