建置 DirectShow 應用程式
[與此頁面相關聯的功能,DirectShow是舊版功能。 它已被 MediaPlayer、IMFMediaEngine以及媒體基礎中的 音訊/視訊擷取取代。 這些功能已針對 Windows 10 和 Windows 11 進行優化。 Microsoft強烈建議新程式代碼盡可能在媒體 基礎中使用 MediaPlayer、IMFMediaEngine 和 音訊/視訊擷取,而不是 DirectShow。 Microsoft建議使用舊版 API 的現有程式代碼,盡可能改寫成使用新的 API。]
本主題描述建置 DirectShow 應用程式所需的標頭和連結庫。
Windows SDK中提供最新的 DirectShow 標頭和連結庫。
標頭檔案
所有 DirectShow 應用程式都會使用下表所示的頭檔。
標頭檔 | 所需條件 |
---|---|
Dshow.h | 所有 DirectShow 應用程式。 |
某些 DirectShow 介面需要額外的頭檔。 介面參考中會指出這些需求。
函式庫檔案
DirectShow 會使用下表所示的靜態庫檔案。
函式庫檔案 | 描述 |
---|---|
Strmiids.lib | 匯出類別識別碼 (CLSID) 和介面識別碼 (IID)。 |
Quartz.lib | 匯出 AMGetErrorText 函式。 如果您未呼叫此函式,則不需要此連結庫。 |
針對偵錯和發行組建使用相同的 .lib 檔案。
篩選器基礎類別
如果您撰寫自定義 DirectShow 篩選器,Windows SDK 會提供一組建議的C++類別。 這些類別會以範例程序代碼的形式提供,您可以編譯為靜態庫。 如需詳細資訊,請參閱 DirectShow 基類。
可再發行 DLL
使用 Service Pack 2(SP2)及更新版本的 Windows XP 撰寫的 DirectShow 應用程式,不需要重新發行任何 DirectShow DLL。
具備 Service Pack 1(SP1)和更早版本的 Windows XP 用戶可從 Microsoft DirectX SDK 取得可再發行的 DirectShow DLL。 這些 DLL 的最新版本是 9.0c 版。 沒有計劃進一步開發這些可再發行的 DLL。 Windows XP with Service Pack 2 (SP2) 包含 9.0c DLL 版。
可再發行的套件包含下列 DLL:
- dxnt.cab
- amstream.dll
- devenum.dll
- encapi.dll
- ks.sys
- ksolay.ax
- ksproxy.ax
- ksuser.dll
- l3codecx.ax
- mciqtz32.dll
- mpg2splt.ax
- msdmo.dll
- mskssrv.sys
- mspclock.sys
- mspqm.sys
- mstee.sys
- mswebdvd.dll
- qasf.dll
- qcap.dll
- qdv.dll
- qdvd.dll
- qedit.dll
- qedwipes.dll
- quartz.dll
- stream.sys
- swenum.sys
- bda.cab
- bdaplgin.ax
- bdasup.sys
- ccdecode.sys
- ipsink.ax
- kstvtune.ax
- kswdmcap.ax
- ksxbar.ax
- mpe.sys
- mpeg2data.ax
- msdv.sys
- msdvbnp.ax
- msvidctl.dll
- msyuv.dll
- nabtsfec.sys
- ndisip.sys
- psisdecd.dll
- psisrndr.ax
- slip.sys
- streamip.sys
- vbisurf.ax
- wstcodec.sys
- wstdecod.dll
相關主題