diff -u RC2/base.h R_One/base.h --- RC2/base.h Sat Apr 28 15:03:32 2007 +++ R_One/base.h Wed Jul 4 16:47:38 2007 @@ -3,6 +3,14 @@ #define BASE_H #pragma once +#define USE_VMR9 1 + +/* Pour éviter les problèmes de compatibilité entre qedit.h et vrm9.h */ + +#ifndef __D3DRM_H__ +#define __D3DRM_H__ +#endif + #define WIN32_LEAN_AND_MEAN #include #include @@ -16,6 +24,11 @@ #include +#if USE_VMR9 +# include +# include +#endif + #include #include @@ -35,8 +48,6 @@ #define LOG_DSHOW 0 -#define USE_VMR9 0 - #if defined _M_IX86 #pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") #elif defined _M_IA64 @@ -49,9 +60,6 @@ #if USE_VMR9 -#include -#include - #define MyIVMRWindowlessControl IVMRWindowlessControl9 #define MyIID_IVMRWindowlessControl IID_IVMRWindowlessControl9 #define MyCLSID_VideoMixingRenderer CLSID_VideoMixingRenderer9 @@ -71,6 +79,8 @@ #define MyVMRVideoDesc VMR9VideoDesc #define MyVMRMode_Windowless VMR9Mode_Windowless + +#define MyVMRMode_Renderless VMR9Mode_Renderless #define MyMixingPrefs (MixerPref9_NoDecimation | MixerPref9_BiLinearFiltering | MixerPref9_RenderTargetYUV) diff -u RC2/graph.cpp R_One/graph.cpp --- RC2/graph.cpp Wed May 2 18:26:44 2007 +++ R_One/graph.cpp Wed Jul 4 17:17:14 2007 @@ -402,13 +402,18 @@ return 1; } +#if USE_VMR9 + pVMRConfig->SetRenderingMode(MyVMRMode_Windowless); +#else pVMRConfig->SetRenderingMode(MyVMRMode_Renderless); if (use_vmr_deinterlace) pVMRConfig->SetNumberOfStreams(1); +#endif pVMRConfig->Release(); } +#if !USE_VMR9 { IVMRSurfaceAllocatorNotify * pNotify; hr = pVMR->QueryInterface(&pNotify); @@ -515,6 +520,7 @@ } } } +#endif hr = pVMR->QueryInterface(&pVMRControl); @@ -525,8 +531,9 @@ pVMRControl->SetVideoClippingWindow(hWnd); +#if !USE_VMR9 pVMRControl->SetColorKey(colorKey); - +#endif { MyIVMRAspectRatioControl * pARC; diff -u RC2/ini.cpp R_One/ini.cpp --- RC2/ini.cpp Mon Apr 30 12:18:46 2007 +++ R_One/ini.cpp Sun Jul 1 19:59:56 2007 @@ -71,23 +71,15 @@ freq_offset += 306000; - UINT freq = GetPrivateProfileInt(ville, L"R1", 0, file); - freq_scan.push_back(freq_canal(freq)); + UINT freq; - freq = GetPrivateProfileInt(ville, L"R2", 0, file); - freq_scan.push_back(freq_canal(freq)); - - freq = GetPrivateProfileInt(ville, L"R3", 0, file); - freq_scan.push_back(freq_canal(freq)); - - freq = GetPrivateProfileInt(ville, L"R4", 0, file); - freq_scan.push_back(freq_canal(freq)); - - freq = GetPrivateProfileInt(ville, L"R5", 0, file); - freq_scan.push_back(freq_canal(freq)); - - freq = GetPrivateProfileInt(ville, L"R6", 0, file); - freq_scan.push_back(freq_canal(freq)); + for (int i=1; i<100; i++) { + wchar_t buf[4]; + wsprintf(buf, L"R%d", i); + freq = GetPrivateProfileInt(ville, buf, 0, file); + if (freq == 0) break; + freq_scan.push_back(freq_canal(freq)); + } if (freq_scan[0] == freq_canal(0)) { freq_scan.clear(); diff -u RC2/main.cpp R_One/main.cpp --- RC2/main.cpp Mon Jun 18 11:53:20 2007 +++ R_One/main.cpp Wed Jul 4 16:41:16 2007 @@ -1007,7 +1007,7 @@ IPersistFile * pPersistFile; ITaskTrigger * pTaskTrigger; - MultiByteToWideChar(CP_ACP, 0, szName, strlen(szName)+1, pwszTaskName, sizeof(pwszTaskName)/sizeof(pwszTaskName[0])); + MultiByteToWideChar(CP_ACP, 0, szName, (int)strlen(szName)+1, pwszTaskName, sizeof(pwszTaskName)/sizeof(pwszTaskName[0])); HRESULT hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, IID_ITaskScheduler, (void**)&pITS); if (FAILED(hr)) { @@ -1073,7 +1073,7 @@ WCHAR pwszTaskName[256]; ITaskScheduler * pITS; - MultiByteToWideChar(CP_ACP, 0, szName, strlen(szName)+1, pwszTaskName, sizeof(pwszTaskName)/sizeof(pwszTaskName[0])); + MultiByteToWideChar(CP_ACP, 0, szName, (int)strlen(szName)+1, pwszTaskName, sizeof(pwszTaskName)/sizeof(pwszTaskName[0])); HRESULT hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, IID_ITaskScheduler, (void**)&pITS); if (FAILED(hr)) {