# HG changeset patch # User atmos4 # Date 1013526364 0 # Node ID 95fa3901cafc881bfcefd64105874bcec41a2523 # Parent a093bb34b7231cd562c48414e4370cb8e5939b13 add vsync support for doublebuffering to vo_vesa diff -r a093bb34b723 -r 95fa3901cafc cfg-mplayer.h --- a/cfg-mplayer.h Tue Feb 12 10:36:43 2002 +0000 +++ b/cfg-mplayer.h Tue Feb 12 15:06:04 2002 +0000 @@ -37,6 +37,7 @@ #ifndef USE_LIBVO2 extern int vo_doublebuffering; +extern int vo_vsync; extern int vo_fsmode; extern int vo_dbpp; /* gamma correction */ @@ -248,6 +249,8 @@ {"fsmode", &vo_fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 15, NULL}, {"double", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"nodouble", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 1, 0, NULL}, + {"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL}, + {"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"brightness",&vo_gamma_brightness, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL}, {"saturation",&vo_gamma_saturation, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL}, {"contrast",&vo_gamma_contrast, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL}, diff -r a093bb34b723 -r 95fa3901cafc libvo/video_out.c --- a/libvo/video_out.c Tue Feb 12 10:36:43 2002 +0000 +++ b/libvo/video_out.c Tue Feb 12 15:06:04 2002 +0000 @@ -41,6 +41,7 @@ int vo_dheight=0; int vo_dbpp=0; int vo_doublebuffering = 0; +int vo_vsync = 0; int vo_fsmode = 0; int vo_pts=0; // for hw decoding diff -r a093bb34b723 -r 95fa3901cafc libvo/video_out.h --- a/libvo/video_out.h Tue Feb 12 10:36:43 2002 +0000 +++ b/libvo/video_out.h Tue Feb 12 15:06:04 2002 +0000 @@ -177,6 +177,7 @@ extern int vo_dbpp; extern int vo_doublebuffering; +extern int vo_vsync; extern int vo_fsmode; extern int vo_pts; diff -r a093bb34b723 -r 95fa3901cafc libvo/vo_vesa.c --- a/libvo/vo_vesa.c Tue Feb 12 10:36:43 2002 +0000 +++ b/libvo/vo_vesa.c Tue Feb 12 15:06:04 2002 +0000 @@ -114,7 +114,7 @@ static char sbuff[80]; if((err & VBE_VESA_ERROR_MASK) == VBE_VESA_ERROR_MASK) { - sprintf(sbuff,"VESA failed = 0x4f%x",(err & VBE_VESA_ERRCODE_MASK)>>8); + sprintf(sbuff,"VESA failed = 0x4f%02x",(err & VBE_VESA_ERRCODE_MASK)>>8); retval = sbuff; } else @@ -361,7 +361,7 @@ if(vo_doublebuffering && multi_size > 1) { int err; - if((err=vbeSetDisplayStart(multi_buff[multi_idx],1)) != VBE_OK) + if((err=vbeSetDisplayStart(multi_buff[multi_idx],vo_vsync)) != VBE_OK) { vesa_term(); PRINT_VBE_ERR("vbeSetDisplayStart",err); @@ -375,10 +375,10 @@ else if(tripple_buffering) { - vbeSetScheduledDisplayStart(multi_buffer[multi_idx],1); + vbeSetScheduledDisplayStart(multi_buff[multi_idx],vo_vsync); multi_idx++; if(multi_idx > 2) multi_idx = 0; - win.ptr = dga_buffer = video_base + multi_buffer[multi_idx]; + win.ptr = dga_buffer = video_base + multi_buff[multi_idx]; } */ }