video_out.h: change VOCTRL_* defines to enum

Convert the list of VOCTLR_* defines to an enum, dropping some unused
values. This resolves a collision between VOCTRL_XOVERLAY_SET_COLORKEY
and VOCTRL_REDRAW_OSD, which had the same value (the XOVERLAY one was
only used by vo_xvr100 and vo_tdfx, so this didn't matter much in
practice).
This commit is contained in:
harklu 2011-08-22 22:24:07 +02:00 committed by Uoti Urpala
parent a24e333fca
commit 8cc5ba5ab8
1 changed files with 56 additions and 54 deletions

View File

@ -35,72 +35,74 @@
#define VO_EVENT_REINIT 8 #define VO_EVENT_REINIT 8
#define VO_EVENT_MOVE 16 #define VO_EVENT_MOVE 16
/* Obsolete: VOCTRL_QUERY_VAA 1 */ enum mp_voctrl {
/* does the device support the required format */ /* does the device support the required format */
#define VOCTRL_QUERY_FORMAT 2 VOCTRL_QUERY_FORMAT = 1,
/* signal a device reset seek */ /* signal a device reset seek */
#define VOCTRL_RESET 3 VOCTRL_RESET,
/* used to switch to fullscreen */ /* used to switch to fullscreen */
#define VOCTRL_FULLSCREEN 5 VOCTRL_FULLSCREEN,
/* signal a device pause */ /* signal a device pause */
#define VOCTRL_PAUSE 7 VOCTRL_PAUSE,
/* start/resume playback */ /* start/resume playback */
#define VOCTRL_RESUME 8 VOCTRL_RESUME,
/* libmpcodecs direct rendering: */ /* libmpcodecs direct rendering */
#define VOCTRL_GET_IMAGE 9 VOCTRL_GET_IMAGE,
#define VOCTRL_DRAW_IMAGE 13 VOCTRL_DRAW_IMAGE,
#define VOCTRL_SET_SPU_PALETTE 14 VOCTRL_SET_SPU_PALETTE,
/* decoding ahead: */ VOCTRL_GET_PANSCAN,
#define VOCTRL_GET_NUM_FRAMES 10 VOCTRL_SET_PANSCAN,
#define VOCTRL_GET_FRAME_NUM 11 VOCTRL_SET_EQUALIZER, // struct voctrl_set_equalizer_args
#define VOCTRL_SET_FRAME_NUM 12 VOCTRL_GET_EQUALIZER, // struct voctrl_get_equalizer_args
#define VOCTRL_GET_PANSCAN 15 VOCTRL_DUPLICATE_FRAME,
#define VOCTRL_SET_PANSCAN 16
/* equalizer controls */ VOCTRL_START_SLICE,
#define VOCTRL_SET_EQUALIZER 17
// Vo can be used by xover
VOCTRL_XOVERLAY_SUPPORT,
VOCTRL_XOVERLAY_SET_COLORKEY, // mp_colorkey_t
VOCTRL_XOVERLAY_SET_WIN,
VOCTRL_REDRAW_OSD,
VOCTRL_ONTOP,
VOCTRL_ROOTWIN,
VOCTRL_BORDER,
VOCTRL_DRAW_EOSD,
VOCTRL_GET_EOSD_RES, // struct mp_eosd_res
VOCTRL_SET_DEINTERLACE,
VOCTRL_GET_DEINTERLACE,
VOCTRL_UPDATE_SCREENINFO,
VOCTRL_SET_YUV_COLORSPACE,
VOCTRL_GET_YUV_COLORSPACE,
};
// VOCTRL_SET_EQUALIZER
struct voctrl_set_equalizer_args { struct voctrl_set_equalizer_args {
const char *name; const char *name;
int value; int value;
}; };
#define VOCTRL_GET_EQUALIZER 18
// VOCTRL_GET_EQUALIZER
struct voctrl_get_equalizer_args { struct voctrl_get_equalizer_args {
const char *name; const char *name;
int *valueptr; int *valueptr;
}; };
/* Frame duplication */
#define VOCTRL_DUPLICATE_FRAME 20
// ... 21
#define VOCTRL_START_SLICE 21
#define VOCTRL_ONTOP 25 // VOCTRL_XOVERLAY_SET_COLORKEY
#define VOCTRL_ROOTWIN 26
#define VOCTRL_BORDER 27
#define VOCTRL_DRAW_EOSD 28
#define VOCTRL_GET_EOSD_RES 29
typedef struct mp_eosd_res {
int w, h; // screen dimensions, including black borders
int mt, mb, ml, mr; // borders (top, bottom, left, right)
} mp_eosd_res_t;
#define VOCTRL_SET_DEINTERLACE 30
#define VOCTRL_GET_DEINTERLACE 31
#define VOCTRL_UPDATE_SCREENINFO 32
#define VOCTRL_SET_YUV_COLORSPACE 33
#define VOCTRL_GET_YUV_COLORSPACE 34
// Vo can be used by xover
#define VOCTRL_XOVERLAY_SUPPORT 22
#define VOCTRL_XOVERLAY_SET_COLORKEY 24
typedef struct { typedef struct {
uint32_t x11; // The raw x11 color uint32_t x11; // The raw x11 color
uint16_t r,g,b; uint16_t r,g,b;
} mp_colorkey_t; } mp_colorkey_t;
#define VOCTRL_XOVERLAY_SET_WIN 23 //VOCTRL_GET_EOSD_RES
#define VOCTRL_REDRAW_OSD 24 typedef struct mp_eosd_res {
int w, h; // screen dimensions, including black borders
int mt, mb, ml, mr; // borders (top, bottom, left, right)
} mp_eosd_res_t;
typedef struct { typedef struct {
int x,y; int x,y;