How to compile ffdshow-tryout with VS2008+SP1 + Vista Platform SDK(ver6.1) + Microsoft DirectX SDK (August 2008)
2008-12-22 13:57
417 查看
Note:
在使用最新的DirectX SDK (August 2009)的前提下,已经不需要下面的补丁了,也就是说最新的ffdshow-tryout可以不用做任何修改就可以用vs2008直接编译!
Cheers!
Update 2009/12/27
Index: src/TkeyboardDirect.h
===================================================================
--- src/TkeyboardDirect.h (版本 2529)
+++ src/TkeyboardDirect.h (工作副本)
@@ -4,15 +4,16 @@
#include "Toptions.h"
#include "interfaces.h"
-struct IDirectInput;
-struct IDirectInputDevice;
+struct IDirectInput8;
+struct IDirectInputDevice8;
+
class TdirectInput :public Toptions
{
private:
const char_t *name;
const GUID &deviceId;const DIDATAFORMAT &deviceFormat;
- IDirectInput *di;
- IDirectInputDevice *did;
+ IDirectInput8 *di;
+ IDirectInputDevice8 *did;
char_t classname[40];
HWND h;
HANDLE event;
Index: src/TkeyboardDirect.cpp
===================================================================
--- src/TkeyboardDirect.cpp (版本 2529)
+++ src/TkeyboardDirect.cpp (工作副本)
@@ -73,8 +73,8 @@
void TdirectInput::hook(void)
{
if (di) unhook();
- DPRINTF(_l("hook"));
- DirectInputCreate(0,DIRECTINPUT_VERSION,&di,NULL);
+ DPRINTF(_l("hook"));
+ DirectInput8Create(0,DIRECTINPUT_VERSION,IID_IDirectInput8,(void**)&di,NULL);
if (!di) return;
di->CreateDevice(deviceId,&did,NULL);if (!did) return;
Index: src/stdafx.h
===================================================================
--- src/stdafx.h (版本 2529)
+++ src/stdafx.h (工作副本)
@@ -56,7 +56,7 @@
#include <streams.h>
// DirectX/VFW/ACM
#include <mmreg.h>
-#define DIRECTINPUT_VERSION 0x0300
+#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <dvdmedia.h>
#include <mpconfig.h>
Index: ffdshow_2008.vcproj
===================================================================
--- ffdshow_2008.vcproj (版本 2529)
+++ ffdshow_2008.vcproj (工作副本)
@@ -96,7 +96,7 @@
Name="VCLinkerTool"
RegisterOutput="false"
IgnoreImportLibrary="true"
- AdditionalDependencies="libcmtd.lib winmm.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib dinput.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
+ AdditionalDependencies="libcmtd.lib winmm.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib dinput8.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
OutputFile="bin/ffdshow.ax"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
@@ -325,7 +325,7 @@
Name="VCLinkerTool"
RegisterOutput="false"
IgnoreImportLibrary="true"
- AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libcmt.lib winmm.lib comctl32.lib dinput.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
+ AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libcmt.lib winmm.lib comctl32.lib dinput8.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
OutputFile="bin/ffdshow.ax"
LinkIncremental="1"
SuppressStartupBanner="true"
在使用最新的DirectX SDK (August 2009)的前提下,已经不需要下面的补丁了,也就是说最新的ffdshow-tryout可以不用做任何修改就可以用vs2008直接编译!
Cheers!
Update 2009/12/27
Index: src/TkeyboardDirect.h
===================================================================
--- src/TkeyboardDirect.h (版本 2529)
+++ src/TkeyboardDirect.h (工作副本)
@@ -4,15 +4,16 @@
#include "Toptions.h"
#include "interfaces.h"
-struct IDirectInput;
-struct IDirectInputDevice;
+struct IDirectInput8;
+struct IDirectInputDevice8;
+
class TdirectInput :public Toptions
{
private:
const char_t *name;
const GUID &deviceId;const DIDATAFORMAT &deviceFormat;
- IDirectInput *di;
- IDirectInputDevice *did;
+ IDirectInput8 *di;
+ IDirectInputDevice8 *did;
char_t classname[40];
HWND h;
HANDLE event;
Index: src/TkeyboardDirect.cpp
===================================================================
--- src/TkeyboardDirect.cpp (版本 2529)
+++ src/TkeyboardDirect.cpp (工作副本)
@@ -73,8 +73,8 @@
void TdirectInput::hook(void)
{
if (di) unhook();
- DPRINTF(_l("hook"));
- DirectInputCreate(0,DIRECTINPUT_VERSION,&di,NULL);
+ DPRINTF(_l("hook"));
+ DirectInput8Create(0,DIRECTINPUT_VERSION,IID_IDirectInput8,(void**)&di,NULL);
if (!di) return;
di->CreateDevice(deviceId,&did,NULL);if (!did) return;
Index: src/stdafx.h
===================================================================
--- src/stdafx.h (版本 2529)
+++ src/stdafx.h (工作副本)
@@ -56,7 +56,7 @@
#include <streams.h>
// DirectX/VFW/ACM
#include <mmreg.h>
-#define DIRECTINPUT_VERSION 0x0300
+#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <dvdmedia.h>
#include <mpconfig.h>
Index: ffdshow_2008.vcproj
===================================================================
--- ffdshow_2008.vcproj (版本 2529)
+++ ffdshow_2008.vcproj (工作副本)
@@ -96,7 +96,7 @@
Name="VCLinkerTool"
RegisterOutput="false"
IgnoreImportLibrary="true"
- AdditionalDependencies="libcmtd.lib winmm.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib dinput.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
+ AdditionalDependencies="libcmtd.lib winmm.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib dinput8.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
OutputFile="bin/ffdshow.ax"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
@@ -325,7 +325,7 @@
Name="VCLinkerTool"
RegisterOutput="false"
IgnoreImportLibrary="true"
- AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libcmt.lib winmm.lib comctl32.lib dinput.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
+ AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libcmt.lib winmm.lib comctl32.lib dinput8.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
OutputFile="bin/ffdshow.ax"
LinkIncremental="1"
SuppressStartupBanner="true"
相关文章推荐
- How to install ASP.NET 1.1 with IIS7 on Vista and Windows 2008
- How to Compile XviD with Microsoft Visual C++ 6.0(转)
- How to Compile XviD with Microsoft Visual C++ 6.0
- [News]Microsoft DirectX SDK (August 2005) Release
- how to cross compile valgrind on android platform
- How To: Compile and Use Tesseract (3.01) on iOS (SDK 5)
- The Windows SDK team is proud to announce that the RTM release of the Microsoft Windows SDK for Windows Server 2008 and .NET Fra
- How to recover SA password on Microsoft SQL Server 2008 R2
- How to install Microsoft SNMP services on x64 Windows Server 2008 R2p
- How to Compile XviD with Microsoft Visual C++ 6.0(zhuan)
- 重拾 DirectX 一:配置Visual Studio 2008+Microsoft DirectX SDK (June 2008) 开发环境
- How to Cheat at Microsoft Vista Administration
- How to recover SA password on Microsoft SQL Server 2008 R2
- How to install ASP.NET 1.1 with IIS7 on Vista and Windows 2008
- How to eliminate the compile error "conversion from 'double ' to 'float ', possible loss of data"
- How to compile rocksdb with lz4 support
- Visual Studio 2008不能创建数据库连接出现:未能加载文件或程序集“Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral,PublicKeyToke
- How to Compile jsp files at Application R12 at Windows?(zt)
- how to integrate Facebook SDK
- How to compile Tensorflow with SSE4.2 and AVX instructions?