您的位置:首页 > 其它

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"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: