Mercurial > mplayer.hg
changeset 15212:05aa13cdf92f
replace VO and VF numeric flags with #defined identifiers
line wrap: on
line diff
--- a/libmpcodecs/vd.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/vd.c Mon Apr 18 15:52:38 2005 +0000 @@ -148,6 +148,7 @@ // 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 @@ 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 @@ } } + 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);
--- a/libmpcodecs/vd_zrmjpeg.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/vd_zrmjpeg.c Mon Apr 18 15:52:38 2005 +0000 @@ -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 @@ 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; }
--- a/libmpcodecs/ve_divx4.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/ve_divx4.c Mon Apr 18 15:52:38 2005 +0000 @@ -376,13 +376,13 @@ 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; }
--- a/libmpcodecs/ve_libdv.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/ve_libdv.c Mon Apr 18 15:52:38 2005 +0000 @@ -66,8 +66,8 @@ } 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; }
--- a/libmpcodecs/ve_nuv.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/ve_nuv.c Mon Apr 18 15:52:38 2005 +0000 @@ -93,7 +93,7 @@ } 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; }
--- a/libmpcodecs/ve_qtvideo.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/ve_qtvideo.c Mon Apr 18 15:52:38 2005 +0000 @@ -166,7 +166,7 @@ } 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; }
--- a/libmpcodecs/ve_vfw.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/ve_vfw.c Mon Apr 18 15:52:38 2005 +0000 @@ -234,7 +234,7 @@ } 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; }
--- a/libmpcodecs/vf_flip.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/vf_flip.c Mon Apr 18 15:52:38 2005 +0000 @@ -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); }
--- a/libmpcodecs/vf_vo.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libmpcodecs/vf_vo.c Mon Apr 18 15:52:38 2005 +0000 @@ -32,10 +32,10 @@ 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)
--- a/libvo/mga_common.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/mga_common.c Mon Apr 18 15:52:38 2005 +0000 @@ -204,7 +204,7 @@ 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; }
--- a/libvo/vesa_lvo.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vesa_lvo.c Mon Apr 18 15:52:38 2005 +0000 @@ -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 @@ 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, ...)
--- a/libvo/vo_aa.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_aa.c Mon Apr 18 15:52:38 2005 +0000 @@ -229,7 +229,7 @@ } 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
--- a/libvo/vo_bl.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_bl.c Mon Apr 18 15:52:38 2005 +0000 @@ -214,7 +214,7 @@ &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;
--- a/libvo/vo_caca.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_caca.c Mon Apr 18 15:52:38 2005 +0000 @@ -137,7 +137,7 @@ } 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;
--- a/libvo/vo_cvidix.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_cvidix.c Mon Apr 18 15:52:38 2005 +0000 @@ -76,7 +76,7 @@ } 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;
--- a/libvo/vo_dfbmga.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_dfbmga.c Mon Apr 18 15:52:38 2005 +0000 @@ -547,7 +547,7 @@ 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 @@ 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)
--- a/libvo/vo_dga.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_dga.c Mon Apr 18 15:52:38 2005 +0000 @@ -627,7 +627,7 @@ 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 @@ 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",
--- a/libvo/vo_directfb2.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_directfb2.c Mon Apr 18 15:52:38 2005 +0000 @@ -524,7 +524,7 @@ #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 @@ // 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;
--- a/libvo/vo_dxr3.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_dxr3.c Mon Apr 18 15:52:38 2005 +0000 @@ -418,7 +418,7 @@ } } -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;
--- a/libvo/vo_fbdev.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_fbdev.c Mon Apr 18 15:52:38 2005 +0000 @@ -797,11 +797,11 @@ 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) {
--- a/libvo/vo_fbdev2.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_fbdev2.c Mon Apr 18 15:52:38 2005 +0000 @@ -208,7 +208,7 @@ uint32_t format) { struct fb_cmap *cmap; - int fs = flags & 0x01; + int fs = flags & VOFLAG_FULLSCREEN; out_width = width; out_height = height;
--- a/libvo/vo_gif89a.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_gif89a.c Mon Apr 18 15:52:38 2005 +0000 @@ -165,7 +165,7 @@ } 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
--- a/libvo/vo_gl.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_gl.c Mon Apr 18 15:52:38 2005 +0000 @@ -163,7 +163,7 @@ 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 @@ 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);
--- a/libvo/vo_jpeg.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_jpeg.c Mon Apr 18 15:52:38 2005 +0000 @@ -144,7 +144,7 @@ /* ------------------------------------------------------------------------- */ 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];
--- a/libvo/vo_md5sum.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_md5sum.c Mon Apr 18 15:52:38 2005 +0000 @@ -136,7 +136,7 @@ */ 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 */
--- a/libvo/vo_mga.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_mga.c Mon Apr 18 15:52:38 2005 +0000 @@ -34,7 +34,7 @@ #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 @@ 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 {
--- a/libvo/vo_mpegpes.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_mpegpes.c Mon Apr 18 15:52:38 2005 +0000 @@ -81,7 +81,7 @@ 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 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; }
--- a/libvo/vo_null.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_null.c Mon Apr 18 15:52:38 2005 +0000 @@ -66,11 +66,11 @@ 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;
--- a/libvo/vo_png.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_png.c Mon Apr 18 15:52:38 2005 +0000 @@ -41,7 +41,7 @@ }; 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) {
--- a/libvo/vo_pnm.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_pnm.c Mon Apr 18 15:52:38 2005 +0000 @@ -257,7 +257,7 @@ */ 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];
--- a/libvo/vo_sdl.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_sdl.c Mon Apr 18 15:52:38 2005 +0000 @@ -155,11 +155,6 @@ #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 @@ /* 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 @@ /* 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 @@ */ // 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 : height, priv->bpp, priv->sdlfullflags))) SDL_ShowCursor(0);*/ } else - if(flags&ZOOM) { + if(flags&VOFLAG_SWSCALE) { if(verbose) printf("SDL: setting zoomed fullscreen with modeswitching\n"); - priv->fulltype = ZOOM; + priv->fulltype = VOFLAG_SWSCALE; set_fullmode(priv->fullmode); } else { @@ -904,7 +899,7 @@ } else { if(verbose) printf("SDL: setting zoomed fullscreen with modeswitching\n"); - priv->fulltype = ZOOM; + priv->fulltype = VOFLAG_SWSCALE; set_fullmode(priv->fullmode); } }
--- a/libvo/vo_svga.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_svga.c Mon Apr 18 15:52:38 2005 +0000 @@ -399,7 +399,7 @@ // This function is called to init the video driver for specific mode // 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 d_height, uint32_t flags, char *title, uint32_t format) { int32_t req_w = width;// (d_width > 0 ? d_width : width); int32_t req_h = height;// (d_height > 0 ? d_height : height); @@ -408,7 +408,7 @@ uint32_t accflags; if(verbose) - printf("vo_svga: config(%i, %i, %i, %i, %08x, %s, %08x)\n", width, height, + printf("vo_svga: config(%i, %i, %i, %i, %08x, %s, %08x)\n", width, height, d_width, d_height, flags, title, format); //Only RGB modes supported if (!IMGFMT_IS_RGB(format) && !IMGFMT_IS_BGR(format)) {assert(0);return -1;}
--- a/libvo/vo_syncfb.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_syncfb.c Mon Apr 18 15:52:38 2005 +0000 @@ -342,12 +342,12 @@ case IMGFMT_YV12: // case IMGFMT_RGB|24: // case IMGFMT_BGR|24: - return 1; + return VFCAP_CSP_SUPPORTED; } return 0; } -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) { uint_32 frame_size;
--- a/libvo/vo_tdfx_vid.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_tdfx_vid.c Mon Apr 18 15:52:38 2005 +0000 @@ -214,7 +214,7 @@ switch(format) { case IMGFMT_BGR8: if(tdfx_cfg.screen_format == TDFX_VID_FORMAT_BGR8) - return 3 | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE; + return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE; return 0; case IMGFMT_YUY2: case IMGFMT_UYVY: @@ -226,19 +226,19 @@ case IMGFMT_I420: if(tdfx_cfg.screen_format == TDFX_VID_FORMAT_BGR8) return 0; - return 3 | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE; + return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE; } return 0; } 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(tdfx_fd < 0) return 1; // When we are run as sub vo we must follow the size gaven to us - if(!(fullscreen & VOFLAG_XOVERLAY_SUB_VO)) { + if(!(flags & VOFLAG_XOVERLAY_SUB_VO)) { if(!vo_screenwidth) vo_screenwidth = tdfx_cfg.screen_width; if(!vo_screenheight) @@ -248,7 +248,7 @@ aspect_save_prescale(d_width,d_height); aspect_save_screenres(vo_screenwidth,vo_screenheight); - if(fullscreen&0x01) { /* -fs */ + if(flags&VOFLAG_FULLSCREEN) { /* -fs */ aspect(&d_width,&d_height,A_ZOOM); vo_fs = VO_TRUE; } else {
--- a/libvo/vo_tga.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_tga.c Mon Apr 18 15:52:38 2005 +0000 @@ -178,7 +178,7 @@ return VO_TRUE; } -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) { /* buffer for alpha */ if(line_buff){ free(line_buff); line_buff=NULL; }
--- a/libvo/vo_vesa.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_vesa.c Mon Apr 18 15:52:38 2005 +0000 @@ -468,7 +468,7 @@ #ifdef CONFIG_VIDIX if(vidix_name)return(vidix_query_fourcc(format)); #endif - return 1 | VFCAP_OSD | VFCAP_SWSCALE | VFCAP_ACCEPT_STRIDE; /* due new SwScale code */ + return VFCAP_CSP_SUPPORTED | VFCAP_OSD | VFCAP_SWSCALE | VFCAP_ACCEPT_STRIDE; /* due new SwScale code */ } static void paintBkGnd( void ) @@ -634,12 +634,12 @@ return -1; } if(subdev_flags == 0xFFFFFFFFUL) return -1; - if(flags & 0x8) + if(flags & VOFLAG_FLIPPING) { printf("vo_vesa: switch -flip is not supported\n"); } - if(flags & 0x04) use_scaler = 1; - if(flags & 0x01) + if(flags & VOFLAG_SWSCALE) use_scaler = 1; + if(flags & VOFLAG_FULLSCREEN) { if(use_scaler) use_scaler = 2; else fs_mode = 1;
--- a/libvo/vo_winvidix.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_winvidix.c Mon Apr 18 15:52:38 2005 +0000 @@ -179,7 +179,7 @@ vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2; geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight); - vo_fs = flags&0x01; + vo_fs = flags&VOFLAG_FULLSCREEN; aspect(&d_width, &d_height, A_NOZOOM);
--- a/libvo/vo_x11.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_x11.c Mon Apr 18 15:52:38 2005 +0000 @@ -293,13 +293,13 @@ vo_dwidth = d_width; vo_dheight = d_height; - if (flags & 0x03) + if (flags & (VOFLAG_FULLSCREEN|VOFLAG_MODESWITCHING)) fullscreen = 1; - if (flags & 0x02) + if (flags & VOFLAG_MODESWITCHING) vm = 1; - if (flags & 0x08) + if (flags & VOFLAG_FLIPPING) Flip_Flag = 1; - zoomFlag = flags & 0x04; + zoomFlag = flags & VOFLAG_SWSCALE; int_pause = 0; // if(!fullscreen) zoomFlag=1; //it makes no sense to avoid zooming on windowd mode @@ -690,10 +690,10 @@ if (IMGFMT_BGR_DEPTH(format) <= 8) return 0; // TODO 8bpp not yet fully implemented if (IMGFMT_BGR_DEPTH(format) == vo_depthonscreen) - return 3 | VFCAP_OSD | VFCAP_SWSCALE | VFCAP_FLIP | + return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD | VFCAP_SWSCALE | VFCAP_FLIP | VFCAP_ACCEPT_STRIDE; else - return 1 | VFCAP_OSD | VFCAP_SWSCALE | VFCAP_FLIP | + return VFCAP_CSP_SUPPORTED | VFCAP_OSD | VFCAP_SWSCALE | VFCAP_FLIP | VFCAP_ACCEPT_STRIDE; } @@ -709,7 +709,7 @@ case IMGFMT_I420: case IMGFMT_IYUV: case IMGFMT_YV12: - return 1 | VFCAP_OSD | VFCAP_SWSCALE | VFCAP_ACCEPT_STRIDE; + return VFCAP_CSP_SUPPORTED | VFCAP_OSD | VFCAP_SWSCALE | VFCAP_ACCEPT_STRIDE; } return 0; }
--- a/libvo/vo_xmga.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_xmga.c Mon Apr 18 15:52:38 2005 +0000 @@ -177,7 +177,7 @@ else #endif { - if (flags & 1) + if (flags & VOFLAG_FULLSCREEN) aspect(&dwidth, &dheight, A_ZOOM); XGetWindowAttributes(mDisplay, mRootWin, &attribs); @@ -237,13 +237,13 @@ XStoreName(mDisplay, vo_window, mTitle); XMapWindow(mDisplay, vo_window); - if (flags & 1) + if (flags & VOFLAG_FULLSCREEN) vo_x11_fullscreen(); #ifdef HAVE_XINERAMA vo_x11_xinerama_move(mDisplay, vo_window); #endif - } else if (!(flags & 1)) + } else if (!(flags & VOFLAG_FULLSCREEN)) XMoveResizeWindow(mDisplay, vo_window, vo_dx, vo_dy, vo_dwidth, vo_dheight); } @@ -254,7 +254,7 @@ } // !GUI - if ((flags & 1) && (!WinID)) + if ((flags & VOFLAG_FULLSCREEN) && (!WinID)) { vo_dx = 0; vo_dy = 0;
--- a/libvo/vo_xover.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_xover.c Mon Apr 18 15:52:38 2005 +0000 @@ -270,7 +270,7 @@ #endif #ifdef X11_FULLSCREEN - if ( ( flags&1 )||(flags & 0x04) ) aspect(&d_width, &d_height, A_ZOOM); + if ( ( flags&VOFLAG_FULLSCREEN )||(flags & VOFLAG_SWSCALE) ) aspect(&d_width, &d_height, A_ZOOM); #endif dwidth = d_width; dheight = d_height; @@ -317,12 +317,12 @@ XStoreName(mDisplay, vo_window, title); XMapWindow(mDisplay, vo_window); - if ( flags&1 ) vo_x11_fullscreen(); + if ( flags&VOFLAG_FULLSCREEN ) vo_x11_fullscreen(); #ifdef HAVE_XINERAMA vo_x11_xinerama_move(mDisplay, vo_window); #endif - } else if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,vo_dx,vo_dy,vo_dwidth,vo_dheight ); + } else if ( !(flags&VOFLAG_FULLSCREEN) ) XMoveResizeWindow( mDisplay,vo_window,vo_dx,vo_dy,vo_dwidth,vo_dheight ); } if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc ); @@ -331,7 +331,7 @@ } #endif - if ( ( !WinID )&&( flags&1 ) ) { vo_dx=0; vo_dy=0; vo_dwidth=vo_screenwidth; vo_dheight=vo_screenheight; vo_fs=1; } + if ( ( !WinID )&&( flags&VOFLAG_FULLSCREEN ) ) { vo_dx=0; vo_dy=0; vo_dwidth=vo_screenwidth; vo_dheight=vo_screenheight; vo_fs=1; } if(sub_vo->config(image_width,image_height,vo_dwidth,vo_dheight, flags | VOFLAG_XOVERLAY_SUB_VO,NULL,format)) {
--- a/libvo/vo_xv.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_xv.c Mon Apr 18 15:52:38 2005 +0000 @@ -188,10 +188,10 @@ vo_dheight = d_height; #ifdef HAVE_XF86VM - if (flags & 0x02) + if (flags & VOFLAG_MODESWITCHING) vm = 1; #endif - flip_flag = flags & 8; + flip_flag = flags & VOFLAG_FLIPPING; num_buffers = vo_doublebuffering ? (vo_directrendering ? NUM_BUFFERS : 2) : 1; @@ -331,7 +331,7 @@ NULL, 0, &hint); vo_x11_sizehint(hint.x, hint.y, hint.width, hint.height, 0); XMapWindow(mDisplay, vo_window); - if (flags & 1) + if (flags & VOFLAG_FULLSCREEN) vo_x11_fullscreen(); else { @@ -346,7 +346,7 @@ if (!vo_fs) XMoveResizeWindow(mDisplay, vo_window, hint.x, hint.y, hint.width, hint.height); - if (flags & 1 && !vo_fs) + if (flags & VOFLAG_FULLSCREEN && !vo_fs) vo_x11_fullscreen(); // handle -fs on non-first file } @@ -405,7 +405,7 @@ #endif aspect(&vo_dwidth, &vo_dheight, A_NOZOOM); - if (((flags & 1) && (WinID <= 0)) || vo_fs) + if (((flags & VOFLAG_FULLSCREEN) && (WinID <= 0)) || vo_fs) { aspect(&vo_dwidth, &vo_dheight, A_ZOOM); drwX =
--- a/libvo/vo_xvidix.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_xvidix.c Mon Apr 18 15:52:38 2005 +0000 @@ -301,7 +301,7 @@ #endif #ifdef X11_FULLSCREEN - if ((flags & 1) || (flags & 0x04)) + if ((flags & VOFLAG_FULLSCREEN) || (flags & VOFLAG_SWSCALE)) aspect(&d_width, &d_height, A_ZOOM); #endif dwidth = d_width; @@ -367,13 +367,13 @@ XStoreName(mDisplay, vo_window, title); XMapWindow(mDisplay, vo_window); - if (flags & 1) + if (flags & VOFLAG_FULLSCREEN) vo_x11_fullscreen(); #ifdef HAVE_XINERAMA vo_x11_xinerama_move(mDisplay, vo_window); #endif - } else if (!(flags & 1)) + } else if (!(flags & VOFLAG_FULLSCREEN)) XMoveResizeWindow(mDisplay, vo_window, vo_dx, vo_dy, vo_dwidth, vo_dheight); } @@ -385,7 +385,7 @@ } #endif - if ((!WinID) && (flags & 1)) + if ((!WinID) && (flags & VOFLAG_FULLSCREEN)) { vo_dx = 0; vo_dy = 0;
--- a/libvo/vo_xvmc.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_xvmc.c Mon Apr 18 15:52:38 2005 +0000 @@ -602,7 +602,7 @@ vo_dwidth=d_width; vo_dheight=d_height; #ifdef HAVE_XF86VM - if( flags&0x02 ) vm = 1; + if( flags&VOFLAG_MODESWITCHING ) vm = 1; #endif aspect_save_screenres(vo_screenwidth,vo_screenheight); @@ -686,7 +686,7 @@ XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); XSetWMNormalHints( mDisplay,vo_window,&hint ); XMapWindow(mDisplay, vo_window); - if ( flags&1 ) vo_x11_fullscreen(); + if ( flags&VOFLAG_FULLSCREEN ) vo_x11_fullscreen(); else { #ifdef HAVE_XINERAMA vo_x11_xinerama_move(mDisplay,vo_window); @@ -697,7 +697,7 @@ // vo_fs set means we were already at fullscreen vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); if ( !vo_fs ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height ); - if ( flags&1 && !vo_fs ) vo_x11_fullscreen(); // handle -fs on non-first file + if ( flags&VOFLAG_FULLSCREEN && !vo_fs ) vo_x11_fullscreen(); // handle -fs on non-first file } // vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); @@ -719,7 +719,7 @@ } aspect(&vo_dwidth,&vo_dheight,A_NOZOOM); - if ( (( flags&1 )&&( WinID <= 0 )) || vo_fs ) + if ( (( flags&VOFLAG_FULLSCREEN )&&( WinID <= 0 )) || vo_fs ) { aspect(&vo_dwidth,&vo_dheight,A_ZOOM); drwX=( vo_screenwidth - (vo_dwidth > vo_screenwidth?vo_screenwidth:vo_dwidth) ) / 2;
--- a/libvo/vo_yuv4mpeg.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_yuv4mpeg.c Mon Apr 18 15:52:38 2005 +0000 @@ -79,7 +79,7 @@ #define Y4M_IS_INTERLACED (config_interlace != Y4M_ILACE_NONE) 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 (image_width == width && image_height == height &&
--- a/libvo/vo_zr.c Mon Apr 18 14:35:11 2005 +0000 +++ b/libvo/vo_zr.c Mon Apr 18 15:52:38 2005 +0000 @@ -301,7 +301,7 @@ 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) { int i, tmp, stretchx, stretchy; framenum = 0;