summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-04-18 15:52:38 +0000
committerhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-04-18 15:52:38 +0000
commitdbb001bae23b18295014c9fc925538902f956c35 (patch)
treea7198cff9124bed9cbf3665c6f325c641330e092
parentda39de73a8f773d2516eadd20ea2172efc3df2a3 (diff)
downloadmpv-dbb001bae23b18295014c9fc925538902f956c35.tar.bz2
mpv-dbb001bae23b18295014c9fc925538902f956c35.tar.xz
replace VO and VF numeric flags with #defined identifiers
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15213 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpcodecs/vd.c16
-rw-r--r--libmpcodecs/vd_zrmjpeg.c3
-rw-r--r--libmpcodecs/ve_divx4.c6
-rw-r--r--libmpcodecs/ve_libdv.c4
-rw-r--r--libmpcodecs/ve_nuv.c2
-rw-r--r--libmpcodecs/ve_qtvideo.c2
-rw-r--r--libmpcodecs/ve_vfw.c2
-rw-r--r--libmpcodecs/vf_flip.c3
-rw-r--r--libmpcodecs/vf_vo.c8
-rw-r--r--libvo/mga_common.c2
-rw-r--r--libvo/vesa_lvo.c3
-rw-r--r--libvo/vo_aa.c2
-rw-r--r--libvo/vo_bl.c2
-rw-r--r--libvo/vo_caca.c2
-rw-r--r--libvo/vo_cvidix.c2
-rw-r--r--libvo/vo_dfbmga.c4
-rw-r--r--libvo/vo_dga.c6
-rw-r--r--libvo/vo_directfb2.c10
-rw-r--r--libvo/vo_dxr3.c2
-rw-r--r--libvo/vo_fbdev.c6
-rw-r--r--libvo/vo_fbdev2.c2
-rw-r--r--libvo/vo_gif89a.c2
-rw-r--r--libvo/vo_gl.c4
-rw-r--r--libvo/vo_jpeg.c2
-rw-r--r--libvo/vo_md5sum.c2
-rw-r--r--libvo/vo_mga.c4
-rw-r--r--libvo/vo_mpegpes.c4
-rw-r--r--libvo/vo_null.c4
-rw-r--r--libvo/vo_png.c2
-rw-r--r--libvo/vo_pnm.c2
-rw-r--r--libvo/vo_sdl.c25
-rw-r--r--libvo/vo_svga.c4
-rw-r--r--libvo/vo_syncfb.c4
-rw-r--r--libvo/vo_tdfx_vid.c10
-rw-r--r--libvo/vo_tga.c2
-rw-r--r--libvo/vo_vesa.c8
-rw-r--r--libvo/vo_winvidix.c2
-rw-r--r--libvo/vo_x11.c14
-rw-r--r--libvo/vo_xmga.c8
-rw-r--r--libvo/vo_xover.c8
-rw-r--r--libvo/vo_xv.c10
-rw-r--r--libvo/vo_xvidix.c8
-rw-r--r--libvo/vo_xvmc.c8
-rw-r--r--libvo/vo_yuv4mpeg.c2
-rw-r--r--libvo/vo_zr.c2
45 files changed, 117 insertions, 113 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 4b20ab4fee..42b0697f2a 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -148,6 +148,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outf
// vo_functions_t* video_out=sh->video_out;
vf_instance_t* vf=sh->vfilter,*sc=NULL;
int palette=0;
+ int vocfg_flags=0;
if(!sh->disp_w || !sh->disp_h)
mp_msg(MSGT_DECVIDEO,MSGL_WARN, MSGTR_CodecDidNotSet);
@@ -188,16 +189,16 @@ csp_again:
if(out_fmt==(unsigned int)0xFFFFFFFF) continue;
flags=vf->query_format(vf,out_fmt);
mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X (i=%d) \n",vo_format_name(out_fmt),flags,i);
- if((flags&2) || (flags && j<0)){
+ if((flags&VFCAP_CSP_SUPPORTED_BY_HW) || (flags&VFCAP_CSP_SUPPORTED && j<0)){
// check (query) if codec really support this outfmt...
sh->outfmtidx=j; // pass index to the control() function this way
if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)==CONTROL_FALSE){
mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: codec query_format(%s) returned FALSE\n",vo_format_name(out_fmt));
continue;
}
- j=i; vo_flags=flags; if(flags&2) break;
+ j=i; vo_flags=flags; if(flags&VFCAP_CSP_SUPPORTED_BY_HW) break;
} else
- if(!palette && !(flags&3) && (out_fmt==IMGFMT_RGB8||out_fmt==IMGFMT_BGR8)){
+ if(!palette && !(flags&(VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_CSP_SUPPORTED)) && (out_fmt==IMGFMT_RGB8||out_fmt==IMGFMT_BGR8)){
sh->outfmtidx=j; // pass index to the control() function this way
if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)!=CONTROL_FALSE)
palette=1;
@@ -300,18 +301,23 @@ csp_again:
}
}
+ vocfg_flags = (fullscreen ? VOFLAG_FULLSCREEN:0)
+ | (vidmode ? VOFLAG_MODESWITCHING:0)
+ | (softzoom ? VOFLAG_SWSCALE:0)
+ | (flip ? VOFLAG_FLIPPING:0);
+
// Time to config libvo!
mp_msg(MSGT_CPLAYER,MSGL_V,"VO Config (%dx%d->%dx%d,flags=%d,'%s',0x%X)\n",
sh->disp_w,sh->disp_h,
screen_size_x,screen_size_y,
- fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
+ vocfg_flags,
"MPlayer",out_fmt);
vf->w = sh->disp_w;
vf->h = sh->disp_h;
if(vf_config_wrapper(vf,sh->disp_w,sh->disp_h,
screen_size_x,screen_size_y,
- fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3),
+ vocfg_flags,
out_fmt)==0){
// "MPlayer",out_fmt)){
mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_CannotInitVO);
diff --git a/libmpcodecs/vd_zrmjpeg.c b/libmpcodecs/vd_zrmjpeg.c
index 39a97e1e4b..660b306b25 100644
--- a/libmpcodecs/vd_zrmjpeg.c
+++ b/libmpcodecs/vd_zrmjpeg.c
@@ -9,6 +9,7 @@
#include "config.h"
#include "mp_msg.h"
+#include "vfcap.h"
/* some convenient #define's, is this portable enough? */
#define VERBOSE(...) mp_msg(MSGT_DECVIDEO, MSGL_V, "vd_zrmjpeg: " __VA_ARGS__)
@@ -38,7 +39,7 @@ typedef struct {
static int query_format(sh_video_t *sh, unsigned int format) {
vd_zrmjpeg_ctx_t *ctx = sh->context;
- if (format == ctx->preferred_csp) return CONTROL_TRUE;
+ if (format == ctx->preferred_csp) return VFCAP_CSP_SUPPORTED;
return CONTROL_FALSE;
}
diff --git a/libmpcodecs/ve_divx4.c b/libmpcodecs/ve_divx4.c
index 0e4a7e3c1d..29612ce0b4 100644
--- a/libmpcodecs/ve_divx4.c
+++ b/libmpcodecs/ve_divx4.c
@@ -376,13 +376,13 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
case IMGFMT_YV12:
case IMGFMT_IYUV:
case IMGFMT_I420:
- return 3; // no conversion
+ return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW; // no conversion
case IMGFMT_YUY2:
case IMGFMT_UYVY:
- return 1; // conversion
+ return VFCAP_CSP_SUPPORTED; // conversion
case IMGFMT_RGB24:
case IMGFMT_BGR24:
- return 1 | VFCAP_FLIPPED; // conversion+flipped
+ return VFCAP_CSP_SUPPORTED | VFCAP_FLIPPED; // conversion+flipped
}
return 0;
}
diff --git a/libmpcodecs/ve_libdv.c b/libmpcodecs/ve_libdv.c
index 22d9e92b4b..3e910d0dcf 100644
--- a/libmpcodecs/ve_libdv.c
+++ b/libmpcodecs/ve_libdv.c
@@ -66,8 +66,8 @@ static int control(struct vf_instance_s* vf, int request, void* data){
}
static int query_format(struct vf_instance_s* vf, unsigned int fmt){
- if(fmt==IMGFMT_YUY2) return 3;
- if(fmt==IMGFMT_RGB24) return 1;
+ if(fmt==IMGFMT_YUY2) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
+ if(fmt==IMGFMT_RGB24) return VFCAP_CSP_SUPPORTED;
return 0;
}
diff --git a/libmpcodecs/ve_nuv.c b/libmpcodecs/ve_nuv.c
index bee798617d..1cff1bfb42 100644
--- a/libmpcodecs/ve_nuv.c
+++ b/libmpcodecs/ve_nuv.c
@@ -93,7 +93,7 @@ static int control(struct vf_instance_s* vf, int request, void* data){
}
static int query_format(struct vf_instance_s* vf, unsigned int fmt){
- if(fmt==IMGFMT_I420) return 3;
+ if(fmt==IMGFMT_I420) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
return 0;
}
diff --git a/libmpcodecs/ve_qtvideo.c b/libmpcodecs/ve_qtvideo.c
index f871de2755..892a9d0235 100644
--- a/libmpcodecs/ve_qtvideo.c
+++ b/libmpcodecs/ve_qtvideo.c
@@ -166,7 +166,7 @@ static int control(struct vf_instance_s* vf, int request, void* data){
}
static int query_format(struct vf_instance_s* vf, unsigned int fmt){
- if(fmt==IMGFMT_YUY2) return 3;
+ if(fmt==IMGFMT_YUY2) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
return 0;
}
diff --git a/libmpcodecs/ve_vfw.c b/libmpcodecs/ve_vfw.c
index 1d31302085..511aa42e2d 100644
--- a/libmpcodecs/ve_vfw.c
+++ b/libmpcodecs/ve_vfw.c
@@ -234,7 +234,7 @@ static int control(struct vf_instance_s* vf, int request, void* data){
}
static int query_format(struct vf_instance_s* vf, unsigned int fmt){
- if(fmt==IMGFMT_BGR24) return 3 | VFCAP_FLIPPED;
+ if(fmt==IMGFMT_BGR24) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_FLIPPED;
return 0;
}
diff --git a/libmpcodecs/vf_flip.c b/libmpcodecs/vf_flip.c
index aab23b01dd..bca671c686 100644
--- a/libmpcodecs/vf_flip.c
+++ b/libmpcodecs/vf_flip.c
@@ -8,13 +8,14 @@
#include "mp_image.h"
#include "vf.h"
+#include "../libvo/video_out.h"
//===========================================================================//
static int config(struct vf_instance_s* vf,
int width, int height, int d_width, int d_height,
unsigned int flags, unsigned int outfmt){
- flags&=~8; // remove the FLIP flag
+ flags&=~VOFLAG_FLIPPING; // remove the FLIP flag
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
}
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c
index 476de8af92..08e3d12064 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -32,10 +32,10 @@ static int config(struct vf_instance_s* vf,
width, height,
d_width, d_height,
vo_format_name(outfmt),
- (flags&1)?" [fs]":"",
- (flags&2)?" [vm]":"",
- (flags&4)?" [zoom]":"",
- (flags&8)?" [flip]":"");
+ (flags&VOFLAG_FULLSCREEN)?" [fs]":"",
+ (flags&VOFLAG_MODESWITCHING)?" [vm]":"",
+ (flags&VOFLAG_SWSCALE)?" [zoom]":"",
+ (flags&VOFLAG_FLIPPING)?" [flip]":"");
mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Description: %s\n",info->name);
mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Author: %s\n", info->author);
if(info->comment && strlen(info->comment) > 0)
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 6adb31aa2e..1189e6a8f7 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -204,7 +204,7 @@ query_format(uint32_t format)
case IMGFMT_IYUV:
case IMGFMT_YUY2:
case IMGFMT_UYVY:
- return 3 | VFCAP_OSD|VFCAP_HWSCALE_UP|VFCAP_HWSCALE_DOWN|VFCAP_ACCEPT_STRIDE;
+ return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD|VFCAP_HWSCALE_UP|VFCAP_HWSCALE_DOWN|VFCAP_ACCEPT_STRIDE;
}
return 0;
}
diff --git a/libvo/vesa_lvo.c b/libvo/vesa_lvo.c
index 8b914475b2..2ab2c0d798 100644
--- a/libvo/vesa_lvo.c
+++ b/libvo/vesa_lvo.c
@@ -27,6 +27,7 @@
#include "fastmemcpy.h"
#include "osd.h"
#include "video_out.h"
+#include "libmpcodecs/vfcap.h"
#define WIDTH_ALIGN 32 /* should be 16 for rage:422 and 32 for rage:420 */
#define NUM_FRAMES 10
@@ -289,7 +290,7 @@ void vlvo_draw_osd(void)
uint32_t vlvo_query_info(uint32_t format)
{
if(verbose > 1) printf("vesa_lvo: query_format was called: %x (%s)\n",format,vo_format_name(format));
- return 1;
+ return VFCAP_CSP_SUPPORTED;
}
uint32_t vlvo_control(uint32_t request, void *data, ...)
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index 1332bbe63e..e89f7e4855 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -229,7 +229,7 @@ printosdprogbar(){
}
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 d_height, uint32_t flags, char *title,
uint32_t format) {
/*
* main init
diff --git a/libvo/vo_bl.c b/libvo/vo_bl.c
index 50ac0e41c0..e41874a8d9 100644
--- a/libvo/vo_bl.c
+++ b/libvo/vo_bl.c
@@ -214,7 +214,7 @@ static bl_properties_t bls[NO_BLS] = {
&udp_init, &udp_send, &udp_close } };
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)
+ uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
void * ptr;
diff --git a/libvo/vo_caca.c b/libvo/vo_caca.c
index c23504fed0..05ee4fd57e 100644
--- a/libvo/vo_caca.c
+++ b/libvo/vo_caca.c
@@ -137,7 +137,7 @@ static int resize ()
}
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)
+ uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
image_height = height;
image_width = width;
diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c
index a0f654122e..27393a5477 100644
--- a/libvo/vo_cvidix.c
+++ b/libvo/vo_cvidix.c
@@ -76,7 +76,7 @@ static uint32_t setup_vidix(){
}
static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,uint32_t d_height, uint32_t flags, char *title, uint32_t format){
- vo_fs = flags & 0x01;
+ vo_fs = flags & VOFLAG_FULLSCREEN;
if(!vo_config_count){
if(vo_screenwidth && vo_screenheight){
if(!vo_geometry)center=1;
diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c
index fef596f552..dbb9848091 100644
--- a/libvo/vo_dfbmga.c
+++ b/libvo/vo_dfbmga.c
@@ -547,7 +547,7 @@ static void release_config( void )
static uint32_t
config( uint32_t width, uint32_t height,
uint32_t d_width, uint32_t d_height,
- uint32_t fullscreen,
+ uint32_t flags,
char *title,
uint32_t format )
{
@@ -735,7 +735,7 @@ config( uint32_t width, uint32_t height,
out_height = screen_height;
aspect_save_screenres( out_width, out_height );
- aspect( &out_width, &out_height, (fullscreen & 0x01) ? A_ZOOM : A_NOZOOM );
+ aspect( &out_width, &out_height, (flags & VOFLAG_FULLSCREEN) ? A_ZOOM : A_NOZOOM );
if (in_width != out_width ||
in_height != out_height)
diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c
index feabdc3aa8..5632e7f142 100644
--- a/libvo/vo_dga.c
+++ b/libvo/vo_dga.c
@@ -627,7 +627,7 @@ static uint32_t config(uint32_t width, uint32_t height,
vo_dga_vp_width = mX;
vo_dga_vp_height = mY;
- if ((flags & 0x04) || (flags & 0x01))
+ if ((flags & VOFLAG_SWSCALE) || (flags & VOFLAG_FULLSCREEN))
{ /* -zoom or -fs */
scale_dstW = (d_width + 7) & ~7;
scale_dstH = d_height;
@@ -636,9 +636,9 @@ static uint32_t config(uint32_t width, uint32_t height,
aspect_save_screenres(mX, mY);
aspect_save_orig(scale_srcW, scale_srcH);
aspect_save_prescale(scale_dstW, scale_dstH);
- if (flags & 0x01) /* -fs */
+ if (flags & VOFLAG_FULLSCREEN) /* -fs */
aspect(&scale_dstW, &scale_dstH, A_ZOOM);
- else if (flags & 0x04) /* -fs */
+ else if (flags & VOFLAG_SWSCALE) /* -fs */
aspect(&scale_dstW, &scale_dstH, A_NOZOOM);
mp_msg(MSGT_VO, MSGL_INFO,
"vo_dga: Aspect corrected size for SwScaler: %4d x %4d.\n",
diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c
index 7f6b356546..1d60f79789 100644
--- a/libvo/vo_directfb2.c
+++ b/libvo/vo_directfb2.c
@@ -524,7 +524,7 @@ return DFENUM_OK;
#define CONFIG_ERROR -1
static uint32_t config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
- uint32_t d_height, uint32_t fullscreen, char *title,
+ uint32_t d_height, uint32_t flags, char *title,
uint32_t format)
{
/*
@@ -533,10 +533,10 @@ static uint32_t config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
// decode flags
- int fs = fullscreen & 0x01;
- int vm = fullscreen & 0x02;
- int zoom = fullscreen & 0x04;
- int flip = fullscreen & 0x08;
+ int fs = flags & VOFLAG_FULLSCREEN;
+ int vm = flags & VOFLAG_MODESWITCHING;
+ int zoom = flags & VOFLAG_SWSCALE;
+ int flip = flags & VOFLAG_FLIPPING;
DFBSurfaceDescription dsc;
DFBResult ret;
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index 1cb333dee0..92ccc4028d 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -418,7 +418,7 @@ void calculate_cvals(unsigned long mask, int *shift, int *prec)
}
}
-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 uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
int tmp1, tmp2, size;
em8300_register_t reg;
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index 5764dfc239..ed3fd62193 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -797,11 +797,11 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t format)
{
struct fb_cmap *cmap;
- int vm = flags & 0x02;
- int zoom = flags & 0x04;
+ int vm = flags & VOFLAG_MODESWITCHING;
+ int zoom = flags & VOFLAG_SWSCALE;
int vt_fd;
- fs = flags & 0x01;
+ fs = flags & VOFLAG_FULLSCREEN;
if(pre_init_err == -2)
{
diff --git a/libvo/vo_fbdev2.c b/libvo/vo_fbdev2.c
index 630139a6e7..7468e0bd4d 100644
--- a/libvo/vo_fbdev2.c
+++ b/libvo/vo_fbdev2.c
@@ -208,7 +208,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t format)
{
struct fb_cmap *cmap;
- int fs = flags & 0x01;
+ int fs = flags & VOFLAG_FULLSCREEN;
out_width = width;
out_height = height;
diff --git a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c
index 1842165d3d..bbe4f76f60 100644
--- a/libvo/vo_gif89a.c
+++ b/libvo/vo_gif89a.c
@@ -165,7 +165,7 @@ static uint32_t preinit(const char *arg)
}
static uint32_t config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
- uint32_t d_height, uint32_t fullscreen, char *title,
+ uint32_t d_height, uint32_t flags, char *title,
uint32_t format)
{
#ifdef HAVE_GIF_4
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 3011a5ce74..4c03bbaec0 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -163,7 +163,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
aspect(&d_width,&d_height,A_NOZOOM);
#ifdef X11_FULLSCREEN
-// if( flags&0x01 ){ // (-fs)
+// if( flags&VOFLAG_FULLSCREEN ){ // (-fs)
// aspect(&d_width,&d_height,A_ZOOM);
// }
#endif
@@ -214,7 +214,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
vo_x11_classhint( mDisplay,vo_window,"gl" );
vo_hidecursor(mDisplay,vo_window);
-// if ( flags&0x01 ) vo_x11_decoration( mDisplay,vo_window,0 );
+// if ( flags&VOFLAG_FULLSCREEN ) vo_x11_decoration( mDisplay,vo_window,0 );
XSelectInput(mDisplay, vo_window, StructureNotifyMask);
/* Tell other applications about this window */
XSetStandardProperties(mDisplay, vo_window, title, title, None, NULL, 0, &hint);
diff --git a/libvo/vo_jpeg.c b/libvo/vo_jpeg.c
index d1b0ef4ead..befda65ef2 100644
--- a/libvo/vo_jpeg.c
+++ b/libvo/vo_jpeg.c
@@ -144,7 +144,7 @@ void jpeg_mkdir(char *buf, int verbose) {
/* ------------------------------------------------------------------------- */
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 d_height, uint32_t flags, char *title,
uint32_t format)
{
char buf[BUFLENGTH];
diff --git a/libvo/vo_md5sum.c b/libvo/vo_md5sum.c
index 4ad300ce74..ba8a6b6b3c 100644
--- a/libvo/vo_md5sum.c
+++ b/libvo/vo_md5sum.c
@@ -136,7 +136,7 @@ static uint32_t preinit(const char *arg)
*/
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 d_height, uint32_t flags, char *title,
uint32_t format)
{
if (vo_config_count > 0 ) { /* Already configured */
diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c
index 9861c95ed2..ac87904cad 100644
--- a/libvo/vo_mga.c
+++ b/libvo/vo_mga.c
@@ -34,7 +34,7 @@ LIBVO_EXTERN(mga)
#define FBDEV "/dev/fb0"
-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 uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
// if (f >= 0) mga_uninit();
@@ -60,7 +60,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
aspect_save_prescale(d_width,d_height);
aspect_save_screenres(vo_screenwidth,vo_screenheight);
- if(fullscreen&0x01) { /* -fs */
+ if(fullscreen&VOFLAG_FULLSCREEN) { /* -fs */
aspect(&d_width,&d_height,A_ZOOM);
vo_fs = VO_TRUE;
} else {
diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c
index 2abc8141c6..71173da049 100644
--- a/libvo/vo_mpegpes.c
+++ b/libvo/vo_mpegpes.c
@@ -81,7 +81,7 @@ static vo_info_t 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)
+config(uint32_t s_width, uint32_t s_height, uint32_t width, uint32_t height, uint32_t flags, char *title, uint32_t format)
{
#ifdef HAVE_DVB
switch(s_height){
@@ -368,7 +368,7 @@ static uint32_t draw_slice(uint8_t *srcimg[], int stride[], int w,int h,int x0,i
static uint32_t
query_format(uint32_t format)
{
- if(format==IMGFMT_MPEGPES) return 3|VFCAP_TIMER;
+ if(format==IMGFMT_MPEGPES) return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_TIMER;
return 0;
}
diff --git a/libvo/vo_null.c b/libvo/vo_null.c
index 97fa750fe7..20200ad97c 100644
--- a/libvo/vo_null.c
+++ b/libvo/vo_null.c
@@ -66,11 +66,11 @@ draw_frame(uint8_t *src[])
static uint32_t
query_format(uint32_t format)
{
- return 1;
+ return VFCAP_CSP_SUPPORTED;
}
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)
+config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
image_width = width;
image_height = height;
diff --git a/libvo/vo_png.c b/libvo/vo_png.c
index 5173fbf64e..d28c4a1bec 100644
--- a/libvo/vo_png.c
+++ b/libvo/vo_png.c
@@ -41,7 +41,7 @@ struct pngdata {
};
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)
+config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
if(z_compression == 0) {
diff --git a/libvo/vo_pnm.c b/libvo/vo_pnm.c
index ebbc090cd7..47b123fe96 100644
--- a/libvo/vo_pnm.c
+++ b/libvo/vo_pnm.c
@@ -257,7 +257,7 @@ void pnm_mkdir(char *buf, int verbose) {
*/
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 d_height, uint32_t flags, char *title,
uint32_t format)
{
char buf[BUFLENGTH];
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 8ced65e36d..4e596536f7 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -155,11 +155,6 @@ static void setenv(const char *name, const char *val, int _xx)
#endif
-#define FS 0x01
-#define VM 0x02
-#define ZOOM 0x04
-#define FLIP 0x08
-
#ifdef SDL_ENABLE_LOCKS
#define SDL_OVR_LOCK(x) if (SDL_LockYUVOverlay (priv->overlay)) { \
if(verbose) printf("SDL: Couldn't lock YUV overlay\n"); \
@@ -690,7 +685,7 @@ static void set_fullmode (int mode) {
/* if we haven't set a fullmode yet, default to the lowest res fullmode first */
/* But select a mode where the full video enter */
- if(priv->X && priv->fulltype & FS) {
+ if(priv->X && priv->fulltype & VOFLAG_FULLSCREEN) {
screen_surface_w = priv->XWidth;
screen_surface_h = priv->XHeight;
}
@@ -726,7 +721,7 @@ static void set_fullmode (int mode) {
/* calculate new video size/aspect */
if(priv->mode == YUV) {
- if(priv->fulltype&FS)
+ if(priv->fulltype&VOFLAG_FULLSCREEN)
aspect_save_screenres(priv->XWidth, priv->XHeight);
aspect(&priv->dstwidth, &priv->dstheight, A_ZOOM);
@@ -868,28 +863,28 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
*/
// printf("SDL: flags are set to: %i\n", flags);
// printf("SDL: Width: %i Height: %i D_Width %i D_Height: %i\n", width, height, d_width, d_height);
- if(flags&FLIP) {
+ if(flags&VOFLAG_FLIPPING) {
if(verbose) printf("SDL: using flipped video (only with RGB/BGR/packed YUV)\n");
priv->flip = 1;
}
- if(flags&FS) {
+ if(flags&VOFLAG_FULLSCREEN) {
if(verbose) printf("SDL: setting zoomed fullscreen without modeswitching\n");
printf("SDL: Info - please use -vm or -zoom to switch to best resolution.\n");
- priv->fulltype = FS;
+ priv->fulltype = VOFLAG_FULLSCREEN;
set_fullmode(priv->fullmode);
/*if((priv->surface = SDL_SetVideoMode (d_width, d_height, priv->bpp, priv->sdlfullflags)))
SDL_ShowCursor(0);*/
} else
- if(flags&VM) {
+ if(flags&VOFLAG_MODESWITCHING) {
if(verbose) printf("SDL: setting zoomed fullscreen with modeswitching\n");
- priv->fulltype = VM;
+ priv->fulltype = VOFLAG_MODESWITCHING;
set_fullmode(priv->fullmode);
/*if((priv->surface = SDL_SetVideoMode (d_width ? d_width : width, d_height ? d_height :