Mercurial > mplayer.hg
changeset 12021:cd33d1e3b709
move refreshrate and adapter_num variables to video_out because they might be usefull for other drivers, too
author | faust3 |
---|---|
date | Sat, 13 Mar 2004 16:48:52 +0000 |
parents | 1604d07d3539 |
children | 293141b57c01 |
files | cfg-mplayer.h libvo/video_out.c libvo/video_out.h libvo/vo_directx.c |
diffstat | 4 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/cfg-mplayer.h Sat Mar 13 16:37:12 2004 +0000 +++ b/cfg-mplayer.h Sat Mar 13 16:48:52 2004 +0000 @@ -292,10 +292,8 @@ {"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"nograbpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 1, 0, NULL}, -#ifdef HAVE_DIRECTX - {"adapter", &adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL}, - {"refreshrate",&refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL}, -#endif + {"adapter", &vo_adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL}, + {"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL}, #ifdef HAVE_X11 // x11,xv,xmga,xvidix {"wid", &WinID, CONF_TYPE_INT, 0, 0, 0, NULL},
--- a/libvo/video_out.c Sat Mar 13 16:37:12 2004 +0000 +++ b/libvo/video_out.c Sat Mar 13 16:48:52 2004 +0000 @@ -41,6 +41,8 @@ int vo_fsmode = 0; float vo_panscan = 0.0f; int vo_ontop = 0; +int vo_adapter_num=0; +int vo_refresh_rate=0; int vo_pts=0; // for hw decoding float vo_fps=0; // for mp1e rte
--- a/libvo/video_out.h Sat Mar 13 16:37:12 2004 +0000 +++ b/libvo/video_out.h Sat Mar 13 16:48:52 2004 +0000 @@ -196,6 +196,8 @@ extern int vo_fs; extern int vo_fsmode; extern float vo_panscan; +extern int vo_adapter_num; +extern int vo_refresh_rate; extern int vo_gamma_brightness; extern int vo_gamma_saturation;
--- a/libvo/vo_directx.c Sat Mar 13 16:37:12 2004 +0000 +++ b/libvo/vo_directx.c Sat Mar 13 16:48:52 2004 +0000 @@ -58,8 +58,6 @@ static uint32_t nooverlay = 0; //NonOverlay mode static DWORD destcolorkey; //colorkey for our surface static COLORREF windowcolor = RGB(0,0,16); //windowcolor == colorkey -int adapter_num=0; -int refresh_rate=0; static int adapter_count=0; static GUID selected_guid; static GUID *selected_guid_ptr = NULL; @@ -180,7 +178,7 @@ if(g_lpddsPrimary)g_lpddsPrimary->lpVtbl->Release(g_lpddsPrimary); g_lpddsPrimary=NULL; - if(vidmode)g_lpdd->lpVtbl->SetDisplayMode(g_lpdd,vm_width,vm_height,vm_bpp,refresh_rate,0); + if(vidmode)g_lpdd->lpVtbl->SetDisplayMode(g_lpdd,vm_width,vm_height,vm_bpp,vo_refresh_rate,0); ZeroMemory(&ddsd, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); //set flags and create a primary surface. @@ -346,7 +344,7 @@ mp_msg(MSGT_VO, MSGL_INFO ,"%s", lpDriverDescription); } - if(adapter_count == adapter_num){ + if(adapter_count == vo_adapter_num){ if (!lpGUID) selected_guid_ptr = NULL; else @@ -380,7 +378,7 @@ return 1; } - if(adapter_num){ //display other than default + if(vo_adapter_num){ //display other than default OurDirectDrawEnumerateEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress(hddraw_dll,"DirectDrawEnumerateExA"); if (!OurDirectDrawEnumerateEx){ FreeLibrary( hddraw_dll ); @@ -393,8 +391,8 @@ // enumerate all display devices attached to the desktop OurDirectDrawEnumerateEx(EnumCallbackEx, NULL, DDENUM_ATTACHEDSECONDARYDEVICES ); - if(adapter_num >= adapter_count) - mp_msg(MSGT_VO, MSGL_ERR,"Selected adapter (%d) doesn't exist: Default Display Adapter selected\n",adapter_num); + if(vo_adapter_num >= adapter_count) + mp_msg(MSGT_VO, MSGL_ERR,"Selected adapter (%d) doesn't exist: Default Display Adapter selected\n",vo_adapter_num); } OurDirectDrawCreateEx = (void *)GetProcAddress(hddraw_dll, "DirectDrawCreateEx"); @@ -446,7 +444,7 @@ mp_msg(MSGT_VO, MSGL_FATAL,"<vo_directx><FATAL ERROR>can't set displaymode\n"); return 1; } - mp_msg(MSGT_VO, MSGL_V,"<vo_directx><INFO>Inited adapter %i for %i x %i @ %i \n",adapter_num,vm_width,vm_height,vm_bpp); + mp_msg(MSGT_VO, MSGL_V,"<vo_directx><INFO>Inited adapter %i for %i x %i @ %i \n",vo_adapter_num,vm_width,vm_height,vm_bpp); return 0; } if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, hWnd, DDSCL_NORMAL) != DD_OK) // or DDSCL_SETFOCUSWINDOW