aboutsummaryrefslogtreecommitdiffhomepage
path: root/libvo
diff options
context:
space:
mode:
authorGravatar alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-11 15:22:10 +0000
committerGravatar alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-11 15:22:10 +0000
commit6811f963587915918875b21b93927784a8680dc9 (patch)
treedc0d9fd36677fbf99fe15ebc73dc313eec47b610 /libvo
parent35dc94a7925de590af7e5db55e3b07becfbbe049 (diff)
removed get_info, using the same sheme as in libmpcodecs instead
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8149 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/video_out.c4
-rw-r--r--libvo/video_out.h7
-rw-r--r--libvo/video_out_internal.h3
-rw-r--r--libvo/vo_3dfx.c12
-rw-r--r--libvo/vo_aa.c12
-rw-r--r--libvo/vo_bl.c10
-rw-r--r--libvo/vo_dfbmga.c11
-rw-r--r--libvo/vo_dga.c11
-rw-r--r--libvo/vo_directfb.c11
-rw-r--r--libvo/vo_directfb2.c11
-rw-r--r--libvo/vo_directx.c12
-rw-r--r--libvo/vo_dxr2.c16
-rw-r--r--libvo/vo_dxr3.c7
-rw-r--r--libvo/vo_fbdev.c11
-rw-r--r--libvo/vo_ggi.c13
-rw-r--r--libvo/vo_gif89a.c11
-rw-r--r--libvo/vo_gl.c13
-rw-r--r--libvo/vo_gl2.c12
-rw-r--r--libvo/vo_jpeg.c12
-rw-r--r--libvo/vo_md5.c12
-rw-r--r--libvo/vo_mga.c10
-rw-r--r--libvo/vo_mpegpes.c11
-rw-r--r--libvo/vo_null.c13
-rw-r--r--libvo/vo_pgm.c12
-rw-r--r--libvo/vo_png.c12
-rw-r--r--libvo/vo_sdl.c12
-rw-r--r--libvo/vo_svga.c10
-rw-r--r--libvo/vo_syncfb.c12
-rw-r--r--libvo/vo_tdfxfb.c7
-rw-r--r--libvo/vo_vesa.c13
-rw-r--r--libvo/vo_x11.c8
-rw-r--r--libvo/vo_xmga.c8
-rw-r--r--libvo/vo_xv.c8
-rw-r--r--libvo/vo_xvidix.c10
-rw-r--r--libvo/vo_yuv4mpeg.c10
-rw-r--r--libvo/vo_zr.c10
36 files changed, 103 insertions, 274 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index d426b4381d..d86777f886 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -196,7 +196,7 @@ void list_video_out(){
int i=0;
mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableVideoOutputDrivers);
while (video_out_drivers[i]) {
- const vo_info_t *info = video_out_drivers[i++]->get_info ();
+ const vo_info_t *info = video_out_drivers[i++]->info;
printf("\t%s\t%s\n", info->short_name, info->name);
}
printf("\n");
@@ -215,7 +215,7 @@ vo_functions_t* init_best_video_out(char** vo_list){
}
for(i=0;video_out_drivers[i];i++){
vo_functions_t* video_driver=video_out_drivers[i];
- const vo_info_t *info = video_driver->get_info();
+ const vo_info_t *info = video_driver->info;
if(!strcmp(info->short_name,vo)){
// name matches, try it
if(!video_driver->preinit(vo_subdevice))
diff --git a/libvo/video_out.h b/libvo/video_out.h
index f856ab56c8..118b14e65b 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -77,6 +77,7 @@ typedef struct vo_info_s
typedef struct vo_functions_s
{
+ vo_info_t *info;
/*
* Preinitializes driver (real INITIALIZATION)
* arg - currently it's vo_subdevice
@@ -103,12 +104,6 @@ typedef struct vo_functions_s
uint32_t (*control)(uint32_t request, void *data, ...);
/*
- * Return driver information.
- * returns : read-only pointer to a vo_info_t structure.
- */
- const vo_info_t* (*get_info)(void);
-
- /*
* Display a new RGB/BGR frame of the video to the screen.
* params:
* src[0] - pointer to the image
diff --git a/libvo/video_out_internal.h b/libvo/video_out_internal.h
index e2688eb750..7137a78e76 100644
--- a/libvo/video_out_internal.h
+++ b/libvo/video_out_internal.h
@@ -30,7 +30,6 @@ static uint32_t control(uint32_t request, void *data, ...);
static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t d_height, uint32_t fullscreen, char *title,
uint32_t format);
-static const vo_info_t* get_info(void);
static uint32_t draw_frame(uint8_t *src[]);
static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y);
static void draw_osd(void);
@@ -42,10 +41,10 @@ static uint32_t preinit(const char *);
#define LIBVO_EXTERN(x) vo_functions_t video_out_##x =\
{\
+ &info,\
preinit,\
config,\
control,\
- get_info,\
draw_frame,\
draw_slice,\
draw_osd,\
diff --git a/libvo/vo_3dfx.c b/libvo/vo_3dfx.c
index d5891c71d4..bf4cdf303f 100644
--- a/libvo/vo_3dfx.c
+++ b/libvo/vo_3dfx.c
@@ -30,8 +30,6 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN(3dfx)
-
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
@@ -51,7 +49,7 @@ LIBVO_EXTERN(3dfx)
#include "fastmemcpy.h"
-static vo_info_t vo_info =
+static vo_info_t info =
{
"3dfx (/dev/3dfx)",
"3dfx",
@@ -59,6 +57,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(3dfx)
+
static uint32_t is_fullscreen = 1;
static uint32_t vidwidth;
@@ -421,12 +421,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static uint32_t
draw_frame(uint8_t *src[])
{
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index cfcc097370..d64446a80f 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -41,15 +41,15 @@
#define MESSAGE_SIZE 512
#define MESSAGE_DEKO " +++ %s +++ "
-LIBVO_EXTERN(aa)
-
- static vo_info_t vo_info = {
+ static vo_info_t info = {
"AAlib",
"aa",
"Alban Bedel <albeu@free.fr> and Folke Ashberg <folke@ashberg.de>",
""
};
+LIBVO_EXTERN(aa)
+
/* aa's main context we use */
aa_context *c;
aa_renderparams *p;
@@ -338,12 +338,6 @@ query_format(uint32_t format) {
return 0;
}
-static const vo_info_t*
-get_info(void) {
- /* who i am? */
- return (&vo_info);
-}
-
static uint32_t
draw_frame(uint8_t *src[]) {
int stride[3] = { 0 , 0 , 0 };
diff --git a/libvo/vo_bl.c b/libvo/vo_bl.c
index 0ab7762342..4d2cf9f27d 100644
--- a/libvo/vo_bl.c
+++ b/libvo/vo_bl.c
@@ -36,9 +36,7 @@
#include "../cfgparser.h"
#include "fastmemcpy.h"
-LIBVO_EXTERN (bl)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"Blinkenlights driver: http://www.blinkenlights.de",
"bl",
@@ -46,6 +44,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN (bl)
+
/* General variables */
static unsigned char *image = NULL;
@@ -220,10 +220,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
return 0;
}
-static const vo_info_t* get_info(void) {
- return &vo_info;
-}
-
static void draw_osd(void) {
}
diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c
index d1eb86be44..95d4c00fdc 100644
--- a/libvo/vo_dfbmga.c
+++ b/libvo/vo_dfbmga.c
@@ -52,15 +52,15 @@
#define min(x,y) (((x)<(y))?(x):(y))
#endif
-LIBVO_EXTERN(dfbmga)
-
-static vo_info_t vo_info = {
+static vo_info_t info = {
"DirectFB / Matrox G400",
"dfbmga",
"Ville Syrjala <syrjala@sci.fi>",
""
};
+LIBVO_EXTERN(dfbmga)
+
extern int verbose;
/******************************
@@ -466,11 +466,6 @@ query_format( uint32_t format )
return 0;
}
-static const vo_info_t *get_info( void )
-{
- return &vo_info;
-}
-
static void
vo_draw_alpha_lut8( int w, int h,
unsigned char* src,
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c
index 8b0d3962f3..9e63eed9c6 100644
--- a/libvo/vo_dga.c
+++ b/libvo/vo_dga.c
@@ -60,8 +60,6 @@
#include "../postproc/rgb2rgb.h"
#include "aspect.h"
-LIBVO_EXTERN( dga )
-
#include <X11/Xlib.h>
#include <X11/extensions/xf86dga.h>
@@ -75,7 +73,7 @@ LIBVO_EXTERN( dga )
#include "../mp_msg.h"
-static vo_info_t vo_info =
+static vo_info_t info =
{
#ifdef HAVE_DGA2
"DGA ( Direct Graphic Access V2.0 )",
@@ -91,6 +89,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN( dga )
+
//------------------------------------------------------------------
@@ -457,11 +457,6 @@ static uint32_t draw_slice( uint8_t *src[],int stride[],
//---------------------------------------------------------
-static const vo_info_t* get_info( void )
-{ return &vo_info; }
-
-//---------------------------------------------------------
-
static uint32_t query_format( uint32_t format )
{
diff --git a/libvo/vo_directfb.c b/libvo/vo_directfb.c
index a553502b40..40bf9f7780 100644
--- a/libvo/vo_directfb.c
+++ b/libvo/vo_directfb.c
@@ -65,15 +65,15 @@
#define min(x,y) (((x)<(y))?(x):(y))
#endif
-LIBVO_EXTERN(directfb)
-
-static vo_info_t vo_info = {
+static vo_info_t info = {
"Direct Framebuffer Device",
"directfb",
"Jiri Svoboda Jiri.Svoboda@seznam.cz",
""
};
+LIBVO_EXTERN(directfb)
+
extern int verbose;
/******************************
@@ -1079,11 +1079,6 @@ static uint32_t query_format(uint32_t format)
return 0;
}
-static const vo_info_t *get_info(void)
-{
- return &vo_info;
-}
-
static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src,
unsigned char *srca, int stride)
{
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c
index 380e69fa51..69dafe5d63 100644
--- a/libvo/vo_directfb2.c
+++ b/libvo/vo_directfb2.c
@@ -57,15 +57,15 @@
#endif
-LIBVO_EXTERN(directfb)
-
-static vo_info_t vo_info = {
+static vo_info_t info = {
"Direct Framebuffer Device",
"directfb",
"Jiri Svoboda Jiri.Svoboda@seznam.cz",
"v 2.0 (for DirectFB version >=0.9.13)"
};
+LIBVO_EXTERN(directfb)
+
extern int verbose;
/******************************
@@ -668,11 +668,6 @@ static uint32_t config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
return 0;
}
-static const vo_info_t *get_info(void)
-{
- return &vo_info;
-}
-
extern void mplayer_put_key(int code);
#include "../linux/keycodes.h"
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 9969062046..c5be5e3a01 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -100,10 +100,7 @@ static directx_fourcc_caps g_ddpf[] =
};
#define NUM_FORMATS (sizeof(g_ddpf) / sizeof(g_ddpf[0]))
-
-LIBVO_EXTERN(directx)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"Directx DDraw YUV/RGB/BGR renderer",
"directx",
@@ -111,6 +108,7 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(directx)
static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src,
unsigned char *srca, int stride)
@@ -305,12 +303,6 @@ static uint32_t Directx_CreateClipper()
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static void uninit(void)
{
if (g_lpddclipper != NULL) g_lpddclipper->lpVtbl->Release(g_lpddclipper);
diff --git a/libvo/vo_dxr2.c b/libvo/vo_dxr2.c
index 87deb894e8..e9235ba35b 100644
--- a/libvo/vo_dxr2.c
+++ b/libvo/vo_dxr2.c
@@ -25,7 +25,6 @@
#include <dxr2ioctl.h>
-LIBVO_EXTERN (dxr2)
extern char *get_path(char *filename);
@@ -134,13 +133,15 @@ config_t dxr2_opts[] = {
{ NULL,NULL, 0, 0, 0, 0, NULL}
};
-static vo_info_t vo_info = {
+static vo_info_t info = {
"DXR2 video out",
"dxr2",
"Alban Bedel <albeu@free.fr> and Tobias Diedrich <ranma@gmx.at>",
""
};
+LIBVO_EXTERN (dxr2)
+
static char *ucodesearchpath[] = {
"/usr/local/lib/dxr2/dvd12.ux",
"/usr/lib/dxr2/dvd12.ux",
@@ -577,7 +578,7 @@ static int dxr2_load_vga_params(dxr2_vgaParams_t* vga,char* name) {
}
static int dxr2_setup_vga_params(void) {
- const vo_info_t* vi = sub_vo->get_info();
+ const vo_info_t* vi = sub_vo->info;
dxr2_vgaParams_t vga;
int loaded = dxr2_load_vga_params(&vga,(char*)vi->short_name);
@@ -793,7 +794,7 @@ static uint32_t config(uint32_t s_width, uint32_t s_height, uint32_t width, uint
}
// Does the sub vo support the x11 stuff
// Fix me : test the other x11 vo's and enable them
- if(strcmp(sub_vo->get_info()->short_name,"x11") == 0)
+ if(strcmp(sub_vo->info->short_name,"x11") == 0)
sub_vo_win = 1;
else
sub_vo_win = 0;
@@ -861,11 +862,6 @@ static uint32_t config(uint32_t s_width, uint32_t s_height, uint32_t width, uint
return VO_ERROR;
}
-static const vo_info_t* get_info(void)
-{
- return &vo_info;
-}
-
static void clear_alpha(int x0,int y0, int w,int h) {
uint8_t* src[] = { sub_img , NULL, NULL };
int stride[] = { movie_w * 3, 0, 0 };
@@ -965,7 +961,7 @@ static uint32_t preinit(const char *arg) {
if(use_ol) {
if (arg) {
for(n = 0 ; video_out_drivers[n] != NULL ; n++) {
- const vo_info_t* vi = video_out_drivers[n]->get_info();
+ const vo_info_t* vi = video_out_drivers[n]->info;
if(!vi)
continue;
if(strcasecmp(arg,vi->short_name) == 0)
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index 0d187ed974..db61596704 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -129,7 +129,7 @@
#define SPU_SUPPORT
-static vo_info_t vo_info =
+static vo_info_t info =
{
"DXR3/H+ video out",
"dxr3",
@@ -609,11 +609,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
return 0;
}
-static const vo_info_t* get_info(void)
-{
- return &vo_info;
-}
-
static void draw_alpha(int x, int y, int w, int h, unsigned char* src, unsigned char *srca, int srcstride)
{
#ifdef SPU_SUPPORT
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index bea7837ab5..94ffb5e5f4 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -37,15 +37,15 @@
extern vo_functions_t video_out_png;
#endif
-LIBVO_EXTERN(fbdev)
-
-static vo_info_t vo_info = {
+static vo_info_t info = {
"Framebuffer Device",
"fbdev",
"Szabolcs Berecz <szabi@inf.elte.hu>",
""
};
+LIBVO_EXTERN(fbdev)
+
extern int verbose;
#ifdef CONFIG_VIDIX
@@ -1127,11 +1127,6 @@ static uint32_t query_format(uint32_t format)
return 0;
}
-static const vo_info_t *get_info(void)
-{
- return &vo_info;
-}
-
static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src,
unsigned char *srca, int stride)
{
diff --git a/libvo/vo_ggi.c b/libvo/vo_ggi.c
index 4fd4b105eb..258a32dd75 100644
--- a/libvo/vo_ggi.c
+++ b/libvo/vo_ggi.c
@@ -41,11 +41,7 @@
#undef GGI_FLIP
-#include "../libmpcodecs/mp_image.h"
-
-LIBVO_EXTERN (ggi)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"General Graphics Interface (GGI) output",
"ggi",
@@ -53,6 +49,8 @@ static vo_info_t vo_info =
"under developement"
};
+LIBVO_EXTERN (ggi)
+
static struct ggi_conf_s {
char *driver;
@@ -270,11 +268,6 @@ db_ok:
return(0);
}
-static const vo_info_t *get_info(void)
-{
- return &vo_info;
-}
-
static uint32_t get_image(mp_image_t *mpi)
{
/* GGI DirectRendering supports (yet) only BGR/RGB modes */
diff --git a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c
index 4cb9b8b0ad..a7c931a115 100644
--- a/libvo/vo_gif89a.c
+++ b/libvo/vo_gif89a.c
@@ -23,9 +23,7 @@
#define GIFWHORE_version 0.90
-LIBVO_EXTERN (gif89a)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"GIF89a (out.gif)",
"gif89a",
@@ -33,6 +31,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN (gif89a)
+
extern int verbose;
extern int vo_config_count;
@@ -115,11 +115,6 @@ static uint32_t config
return 0;
}
-static const vo_info_t* get_info(void)
-{
- return &vo_info;
-}
-
/* forward declaration */
int gif_reduce(int width, int height, unsigned char *source, unsigned char *destination, unsigned char *palette);
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index a05bbee9d5..170c8d3c54 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -15,9 +15,6 @@
#include "video_out.h"
#include "video_out_internal.h"
-
-LIBVO_EXTERN(gl)
-
#include <X11/Xlib.h>
#include <X11/Xutil.h>
//#include <X11/keysym.h>
@@ -30,7 +27,7 @@ LIBVO_EXTERN(gl)
#include "x11_common.h"
#include "aspect.h"
-static vo_info_t vo_info =
+static vo_info_t info =
{
"X11 (OpenGL)",
"gl",
@@ -38,6 +35,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(gl)
+
/* local data */
static unsigned char *ImageData=NULL;
@@ -245,12 +244,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static void check_events(void)
{
int e=vo_x11_check_events(mDisplay);
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 2a12f555c5..c4624db3a3 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -17,8 +17,6 @@
#include "video_out_internal.h"
#include "sub.h"
-LIBVO_EXTERN(gl2)
-
#include <X11/Xlib.h>
#include <X11/Xutil.h>
//#include <X11/keysym.h>
@@ -34,7 +32,7 @@ LIBVO_EXTERN(gl2)
#define NDEBUG
//#undef NDEBUG
-static vo_info_t vo_info =
+static vo_info_t info =
{
"X11 (OpenGL) - multiple textures version",
"gl2",
@@ -42,6 +40,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(gl2)
+
/* private prototypes */
static const char * tweaks_used =
@@ -981,12 +981,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static int gl_handlekey(int key)
{
if(key=='a'||key=='A')
diff --git a/libvo/vo_jpeg.c b/libvo/vo_jpeg.c
index be57e0e339..62d83cf7b7 100644
--- a/libvo/vo_jpeg.c
+++ b/libvo/vo_jpeg.c
@@ -22,9 +22,7 @@
#include "../postproc/swscale.h"
#include "../postproc/rgb2rgb.h"
-LIBVO_EXTERN (jpeg)
-
-static vo_info_t vo_info=
+static vo_info_t info=
{
"JPEG file",
"jpeg",
@@ -32,6 +30,8 @@ static vo_info_t vo_info=
""
};
+LIBVO_EXTERN (jpeg)
+
#define RGB 0
#define BGR 1
@@ -104,12 +104,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static uint32_t jpeg_write( uint8_t * name,uint8_t * buffer )
{
FILE * o;
diff --git a/libvo/vo_md5.c b/libvo/vo_md5.c
index 9aa1951d75..ab3de18181 100644
--- a/libvo/vo_md5.c
+++ b/libvo/vo_md5.c
@@ -22,9 +22,7 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN (md5)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"MD5 sum",
"md5",
@@ -32,6 +30,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN (md5)
+
extern vo_functions_t video_out_pgm;
extern char vo_pgm_filename[24];
@@ -44,12 +44,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
return video_out_pgm.config (width, height, d_width,d_height,fullscreen, title, format);
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static void draw_osd(void)
{
}
diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c
index 4d744a73a7..c8397e8cab 100644
--- a/libvo/vo_mga.c
+++ b/libvo/vo_mga.c
@@ -10,8 +10,6 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN(mga)
-
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
@@ -22,7 +20,7 @@ LIBVO_EXTERN(mga)
#include "sub.h"
#include "aspect.h"
-static vo_info_t vo_info =
+static vo_info_t info =
{
"Matrox G200/G4x0/G550 overlay (/dev/mga_vid)",
"mga",
@@ -30,6 +28,7 @@ static vo_info_t vo_info =
"Based on some code by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>"
};
+LIBVO_EXTERN(mga)
#include "mga_common.c"
@@ -83,11 +82,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
return mga_init(width,height,format);
}
-static const vo_info_t* get_info(void)
-{
- return &vo_info;
-}
-
static void uninit(void)
{
printf("vo: uninit!\n");
diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c
index 97ef734b31..0e186ca23f 100644
--- a/libvo/vo_mpegpes.c
+++ b/libvo/vo_mpegpes.c
@@ -47,12 +47,10 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN (mpegpes)
-
int vo_mpegpes_fd=-1;
int vo_mpegpes_fd2=-1;
-static vo_info_t vo_info =
+static vo_info_t info =
{
#ifdef HAVE_DVB
"Mpeg-PES to DVB card",
@@ -64,6 +62,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN (mpegpes)
+
static uint32_t
config(uint32_t s_width, uint32_t s_height, uint32_t width, uint32_t height, uint32_t fullscreen, char *title, uint32_t format)
{
@@ -142,11 +142,6 @@ static uint32_t preinit(const char *arg){
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
static void draw_osd(void)
{
diff --git a/libvo/vo_null.c b/libvo/vo_null.c
index 9cec3f96c7..97fa750fe7 100644
--- a/libvo/vo_null.c
+++ b/libvo/vo_null.c
@@ -29,10 +29,7 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN(null)
-
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"Null video output",
"null",
@@ -40,6 +37,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(null)
+
static uint32_t image_width, image_height;
//static uint32_t
@@ -78,12 +77,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static void
uninit(void)
{
diff --git a/libvo/vo_pgm.c b/libvo/vo_pgm.c
index 0f894fdd64..16fc5789d3 100644
--- a/libvo/vo_pgm.c
+++ b/libvo/vo_pgm.c
@@ -22,9 +22,7 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN (pgm)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"PGM file",
"pgm",
@@ -32,6 +30,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN (pgm)
+
static int image_width;
static int image_height;
static char header[1024];
@@ -53,12 +53,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static void draw_osd(void)
{
}
diff --git a/libvo/vo_png.c b/libvo/vo_png.c
index 512f07933d..58c2b17efe 100644
--- a/libvo/vo_png.c
+++ b/libvo/vo_png.c
@@ -18,9 +18,7 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN (png)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"PNG file",
"png",
@@ -28,6 +26,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN (png)
+
extern int verbose;
int z_compression = Z_NO_COMPRESSION;
static int framenum = 0;
@@ -62,12 +62,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
struct pngdata create_png (char * fname, int image_width, int image_height, int swapped)
{
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index ef2b7f0faf..15a1ee1538 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -124,13 +124,11 @@
#include "../input/input.h"
#include "../input/mouse.h"
-LIBVO_EXTERN(sdl)
-
extern int verbose;
int sdl_noxv;
int sdl_forcexv;
-static vo_info_t vo_info =
+static vo_info_t info =
{
"SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)",
"sdl",
@@ -138,6 +136,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(sdl)
+
#include <SDL.h>
//#include <SDL/SDL_syswm.h>
@@ -1570,12 +1570,6 @@ query_format(uint32_t format)
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static void
uninit(void)
diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c
index b1c5c2a26d..3f9d623862 100644
--- a/libvo/vo_svga.c
+++ b/libvo/vo_svga.c
@@ -72,15 +72,15 @@ static uint8_t checked = 0;
static uint32_t x_pos, y_pos;
-LIBVO_EXTERN(svga)
-
-static vo_info_t vo_info = {
+static vo_info_t info = {
"SVGAlib",
"svga",
"Zoltan Mark Vician <se7en@sch.bme.hu>",
""
};
+LIBVO_EXTERN(svga)
+
static uint32_t preinit(const char *arg)
{
int i;
@@ -479,10 +479,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
return (0);
}
-static const vo_info_t* get_info(void) {
- return (&vo_info);
-}
-
static uint32_t draw_frame(uint8_t *src[]) {
uint8_t *s=src[0];
#if 0
diff --git a/libvo/vo_syncfb.c b/libvo/vo_syncfb.c
index 271934f251..0ff4d98fe6 100644
--- a/libvo/vo_syncfb.c
+++ b/libvo/vo_syncfb.c
@@ -34,8 +34,6 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN(syncfb)
-
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
@@ -46,7 +44,7 @@ LIBVO_EXTERN(syncfb)
#include "fastmemcpy.h"
-static vo_info_t vo_info =
+static vo_info_t info =
{
"Matrox G200/G400 Synchronous framebuffer (/dev/syncfb)",
"syncfb",
@@ -54,6 +52,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(syncfb)
+
/* deinterlacing on? looks only good in 50 Hz(PAL) or 60 Hz(NTSC) modes */
static int vo_conf_deinterlace = 0;
@@ -431,12 +431,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- return &vo_info;
-}
-
static void
uninit(void)
diff --git a/libvo/vo_tdfxfb.c b/libvo/vo_tdfxfb.c
index 443972a849..3b211fd050 100644
--- a/libvo/vo_tdfxfb.c
+++ b/libvo/vo_tdfxfb.c
@@ -45,9 +45,7 @@
#include "aspect.h"
#include "sub.h"
-LIBVO_EXTERN(tdfxfb)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"3Dfx Banshee/Voodoo3/Voodoo5",
"tdfxfb",
@@ -55,6 +53,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(tdfxfb)
+
/* Some registers on the card */
#define S2S_STRECH_BLT 2 // BLT + Strech
#define S2S_IMMED (1 << 8) // Do it immediatly
@@ -513,4 +513,3 @@ static uint32_t control(uint32_t request, void *data, ...)
/* Dummy funcs */
static void check_events(void) {}
-static const vo_info_t* get_info(void) { return &vo_info; }
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 000b49a5b5..4dd2096c79 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -45,7 +45,6 @@
#include "../postproc/swscale.h"
-LIBVO_EXTERN(vesa)
#ifdef HAVE_PNG
extern vo_functions_t video_out_png;
@@ -68,7 +67,7 @@ extern char *monitor_dotclock_str;
#define UNUSED(x) ((void)(x)) /**< Removes warning about unused arguments */
-static vo_info_t vo_info =
+static vo_info_t info =
{
"VESA VBE 2.0 video output",
"vesa",
@@ -76,6 +75,8 @@ static vo_info_t vo_info =
"Requires ROOT privileges"
};
+LIBVO_EXTERN(vesa)
+
/* driver data */
struct win_frame
@@ -987,14 +988,6 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
return 0;
}
-static const vo_info_t*
-get_info(void)
-{
- if(verbose > 2)
- printf("vo_vesa: get_info was called\n");
- return &vo_info;
-}
-
static void
uninit(void)
{
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 2ef8a871e7..a5e0dc311e 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -8,7 +8,6 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN( x11 )
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -33,7 +32,7 @@ LIBVO_EXTERN( x11 )
#include "../mplayer.h"
#endif
-static vo_info_t vo_info =
+static vo_info_t info =
{
"X11 ( XImage/Shm )",
"x11",
@@ -41,6 +40,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN( x11 )
+
/* private prototypes */
static void Display_Image ( XImage * myximage,unsigned char *ImageData );
static void (*draw_alpha_fnc)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride);
@@ -432,9 +433,6 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
return 0;
}
-static const vo_info_t* get_info( void )
-{ return &vo_info; }
-
static void Display_Image( XImage *myximage,uint8_t *ImageData )
{
#ifdef HAVE_SHM
diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c
index 7b8c7f28bb..93fef90973 100644
--- a/libvo/vo_xmga.c
+++ b/libvo/vo_xmga.c
@@ -17,7 +17,6 @@
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN( xmga )
#include <sys/ioctl.h>
#include <unistd.h>
@@ -48,7 +47,7 @@ static unsigned int timerd=0;
#include "../Gui/interface.h"
#endif
-static vo_info_t vo_info =
+static vo_info_t info =
{
"Matrox G200/G4x0/G550 overlay in X11 window (using /dev/mga_vid)",
"xmga",
@@ -56,6 +55,9 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN( xmga )
+
+
static XGCValues wGCV;
static uint32_t mDepth;
@@ -221,8 +223,6 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
return 0;
}
-static const vo_info_t* get_info( void ){ return &vo_info; }
-
static void uninit(void){
mp_msg(MSGT_VO,MSGL_V,"vo: uninit!\n");
mga_uninit();
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 77d26a5761..cdfaf90adb 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -25,7 +25,6 @@ Buffer allocation:
#include "video_out.h"
#include "video_out_internal.h"
-LIBVO_EXTERN(xv)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -43,7 +42,7 @@ LIBVO_EXTERN(xv)
#include "../Gui/interface.h"
#endif
-static vo_info_t vo_info =
+static vo_info_t info =
{
"X11/Xv",
"xv",
@@ -51,6 +50,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(xv)
+
#include <X11/extensions/Xv.h>
#include <X11/extensions/Xvlib.h>
// FIXME: dynamically allocate this stuff
@@ -448,9 +449,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
return 0;
}
-static const vo_info_t * get_info(void)
-{ return &vo_info; }
-
static void allocate_xvimage(int foo)
{
/*
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index df149e987a..a4599debfe 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -37,9 +37,8 @@
#include "../Gui/interface.h"
#endif
-LIBVO_EXTERN(xvidix)
-static vo_info_t vo_info =
+static vo_info_t info =
{
"X11 (VIDIX)",
"xvidix",
@@ -47,6 +46,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN(xvidix)
+
#define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */
/* X11 related variables */
@@ -342,11 +343,6 @@ else
return(0);
}
-static const vo_info_t *get_info(void)
-{
- return(&vo_info);
-}
-
static void check_events(void)
{
const int event = vo_x11_check_events(mDisplay);
diff --git a/libvo/vo_yuv4mpeg.c b/libvo/vo_yuv4mpeg.c
index 0a6cb3a14f..8d4f40227e 100644
--- a/libvo/vo_yuv4mpeg.c
+++ b/libvo/vo_yuv4mpeg.c
@@ -37,9 +37,8 @@
#include "fastmemcpy.h"
#include "../postproc/rgb2rgb.h"
-LIBVO_EXTERN (yuv4mpeg)
-static vo_info_t vo_info =
+static vo_info_t info =
{
"yuv4mpeg output for mjpegtools (to \"stream.yuv\")",
"yuv4mpeg",
@@ -47,6 +46,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN (yuv4mpeg)
+
static int image_width;
static int image_height;
@@ -139,11 +140,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
return 0;
}
-static const vo_info_t* get_info(void)
-{
- return &vo_info;
-}
-
/* Only use when h divisable by 2! */
static void swap_fields(uint8_t *ptr, const int h, const int stride)
{
diff --git a/libvo/vo_zr.c b/libvo/vo_zr.c
index 912735231f..3d6489ece9 100644
--- a/libvo/vo_zr.c
+++ b/libvo/vo_zr.c
@@ -30,9 +30,7 @@
#include "jpeg_enc.h"
-LIBVO_EXTERN (zr)
-
-static vo_info_t vo_info =
+static vo_info_t info =
{
"Zoran ZR360[56]7/ZR36060 Driver (DC10(+)/buz/lml33/MatroxRR)",
"zr",
@@ -40,6 +38,8 @@ static vo_info_t vo_info =
""
};
+LIBVO_EXTERN (zr)
+
#define ZR_MAX_DEVICES 4
/* General variables */
@@ -474,10 +474,6 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
return 0;
}
-static const vo_info_t* get_info(void) {
- return &vo_info;
-}
-
static void draw_osd(void) {
}