Mercurial > mplayer.hg
changeset 11972:cda09732375e
removed usage of fb_dev_name, imported field parity reporting from dfbmga, fixed vsync handling in triple buffering mode
author | zdar |
---|---|
date | Tue, 17 Feb 2004 16:34:40 +0000 |
parents | 93d7290b0be9 |
children | f5efd4195730 |
files | libvo/vo_directfb2.c |
diffstat | 1 files changed, 29 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_directfb2.c Tue Feb 17 14:52:59 2004 +0000 +++ b/libvo/vo_directfb2.c Tue Feb 17 16:34:40 2004 +0000 @@ -105,6 +105,8 @@ static int framelocked = 0; // flipping mode flag (layer/surface) static int flipping = 0; +// tvnorm +static int tvnorm = -1; // scaling flag static int stretch = 0; // pictrure position @@ -126,11 +128,6 @@ ******************************/ /* command line/config file options */ -#ifdef HAVE_FBDEV -extern char *fb_dev_name; -#else -char *fb_dev_name; -#endif char *dfb_params; static int layer_id = -1; static int buffer_mode = 1; @@ -299,9 +296,6 @@ * (set options) */ - if (!fb_dev_name && !(fb_dev_name = getenv("FRAMEBUFFER"))) fb_dev_name = strdup("/dev/fb0"); - DFBCHECK (DirectFBSetOption ("fbdev",fb_dev_name)); - // uncomment this if you do not wish to create a new vt for DirectFB // DFBCHECK (DirectFBSetOption ("no-vt-switch","")); @@ -309,7 +303,7 @@ // DFBCHECK (DirectFBSetOption ("vt-switching","")); // uncomment this if you want to hide gfx cursor (req dfb >=0.9.9) - DFBCHECK (DirectFBSetOption ("no-cursor","")); + DFBCHECK (DirectFBSetOption ("no-cursor","")); // bg color fix DFBCHECK (DirectFBSetOption ("bg-color","00000000")); @@ -657,6 +651,7 @@ DFBCHECK (dfb->GetDisplayLayer( dfb, params.id, &layer)); #if DIRECTFBVERSION > 916 + mp_msg(MSGT_VO, MSGL_INFO,"DirectFB: Config - switching layer to exclusive mode\n"); ret = layer->SetCooperativeLevel (layer, DLSCL_EXCLUSIVE); if (DFB_OK != ret) { @@ -809,6 +804,19 @@ } } } + mp_msg( MSGT_VO, MSGL_INFO, "DirectFB: Requested field parity: "); + switch (field_parity) { + case -1: + mp_msg( MSGT_VO, MSGL_INFO, "Don't care\n"); + break; + case 0: + mp_msg( MSGT_VO, MSGL_INFO, "Top field first\n"); + break; + case 1: + mp_msg( MSGT_VO, MSGL_INFO, "Bottom field first\n"); + break; + } + #endif @@ -834,6 +842,7 @@ )) { ret = primary->Flip(primary,NULL,0); if (ret==DFB_OK) { + flipping = 1; #if DIRECTFBVERSION > 913 primary->Clear(primary,0,0,0,0xff); #ifdef TRIPLE @@ -841,10 +850,10 @@ if (caps & DSCAPS_TRIPLE) { primary->Flip(primary,NULL,0); primary->Clear(primary,0,0,0,0xff); + flipping = 2; } #endif #endif - flipping = 1; } }; @@ -993,9 +1002,19 @@ }; +#ifdef TRIPLE + switch (flipping) { + case 1: DFBCHECK (primary->Flip (primary, NULL, DSFLIP_WAIT)); + break; + case 2: DFBCHECK (primary->Flip (primary, NULL, DSFLIP_ONSYNC)); + break; + default:; // should never reach here + } +#else if (flipping) { DFBCHECK (primary->Flip (primary, NULL, DSFLIP_WAITFORSYNC)); } +#endif }