From 4ae1571dda7f29737939a91445bef2885bd0ebea Mon Sep 17 00:00:00 2001 From: arpi Date: Thu, 22 Aug 2002 23:03:51 +0000 Subject: General Timing Formula algorithm from a scratch. vo_vesa.c so now adjust the timing to highest possible refresh rate using the monitor capabilities from a config file. patch by Rudolf Marek git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7070 b3059339-0415-0410-9bf9-f77b7e298cf2 --- linux/vbelib.c | 20 ++++++++++++++++++++ linux/vbelib.h | 1 + 2 files changed, 21 insertions(+) (limited to 'linux') diff --git a/linux/vbelib.c b/linux/vbelib.c index 704371958b..d3fc9a445f 100644 --- a/linux/vbelib.c +++ b/linux/vbelib.c @@ -376,6 +376,26 @@ int vbeGetMode(unsigned *mode) return retval; } +int vbeGetPixelClock(unsigned *mode,unsigned *pixel_clock) // in Hz +{ + struct LRMI_regs r; + int retval; + memset(&r,0,sizeof(struct LRMI_regs)); + r.eax = 0x4f0b; + r.ebx = 0; + r.edx = *mode; + r.ecx = *pixel_clock; + if(!VBE_LRMI_int(0x10,&r)) return VBE_VM86_FAIL; + retval = r.eax & 0xffff; + if(retval == 0x4f) + { + *pixel_clock = r.ecx; + retval = VBE_OK; + } + return retval; +} + + int vbeSaveState(void **data) { struct LRMI_regs r; diff --git a/linux/vbelib.h b/linux/vbelib.h index 957c2fb550..c1ae08beb8 100644 --- a/linux/vbelib.h +++ b/linux/vbelib.h @@ -199,6 +199,7 @@ extern int vbeGetControllerInfo(struct VbeInfoBlock *); extern int vbeGetModeInfo(unsigned mode,struct VesaModeInfoBlock *); extern int vbeSetMode(unsigned mode,struct VesaCRTCInfoBlock *); extern int vbeGetMode(unsigned *mode); +extern int vbeGetPixelClock(unsigned *mode,unsigned *pixel_clock); extern int vbeSaveState(void **data); /* note never copy this data */ extern int vbeRestoreState(void *data); extern int vbeGetWindow(unsigned *win_num); /* win_A=0 or win_B=1 */ -- cgit v1.2.3