This has a great impact on the development of graphic images, including audio. In summary, the current status is set up in the environment.
========================================================== ====================================
It took 4 to 5 hours to install DirectShow. // Graphical image management, audio settings. STREAMS. h file.
First download, ms requires genuine windows to download, depressed; find a link that can be downloaded after a long time
Http://hotdl.com/dl/showfile.php? Id = 640 & category = 52
In addition, DirectX9.0c has separated DShow. Select DirectX9.0b or
Then, configure the DirectShow VC development environment.
---------------------------
DirectShow Development Environment
Keywords: Environment Configuration
Http://mercredi.bokee.com/3057881.html
1. Use the VC Wizard to generate a specific project, such as Win32 Dynamic-Link;
2. Contains the header file streams. h;
3. Select Project | Settings | C/C ++ from the VC menu. In the displayed dialog box, select Code generation from Category, and then select _ stdcall from Calling convention;
4. Use the multi-threaded Runtime Library, that is, select Project | Settings | C/C ++ from the VC menu. In the displayed dialog box, select Code generation, in Use run-time library, select Debug Multithreaded for Debug and Multithreaded for Release.
5. Configure the necessary Link library file, that is, select Project | Settings | Link from the VC menu, and select General from the Category in the pop-up dialog box, then enter the following code in Object/library modules:
Debug version strmbasd. lib, msvcrtd. lib, winmm. lib
Release versions: strmbase. lib, msvcrt. lib, and winmm. lib
Select Ignore all default libraries.
DirectShow SDK recommends that the DirectShow application connect to the strmiids. lib and quartz. lib files at least. The former defines the standard CLSID and IID of DirectShow, and the latter defines the export function AMGetErrorText (if this function is not used in the application, you can also not connect to this library ). If the program contains the header file streams. h, the general library file also needs to connect strmbasd. lib, uuid. lib, winmm. lib.
6. Configure the Include and Lib directories of the DirectX SDK to the system directory of the VC and put them in the standard VC directory to ensure that the compiler can get the source file of the latest version. Select Tools | Options | Directories. In the Show directories for dialog box that appears, select Include files. The configuration is as follows (assume that the DirectX SDK is installed in the D: \ DXSDK directory, and the VC is installed in C: \ Program Files ):
D: \ DXSDK \ Include
D: \ DXSDK \ SAMPLES \ C ++ \ DIRECTSHOW \ BASECLASSES
D: \ DXSDK \ SAMPLES \ C ++ \ COMMON \ INCLUDE
C: \ Program Files \ Microsoft Visual Studio \ VC98 \ INCLUDE
C: \ Program Files \ Microsoft Visual Studio \ VC98 \ MFC \ INCLUDE
C: \ Program Files \ Microsoft Visual Studio \ VC98 \ ATL \ INCLUDE
Select Library files in Show directories for and configure the files as follows:
D: \ DXSDK \ Lib
D: \ DXSDK \ SAMPLES \ C ++ \ DIRECTSHOW \ BASECLASSES \ DEBUG
D: \ DXSDK \ SAMPLES \ C ++ \ DIRECTSHOW \ BASECLASSES \ RELEASE
C: \ program files \ microsoft sdk \ LIB
C: \ Program Files \ Microsoft Visual Studio \ VC98 \ LIB
C: \ Program Files \ Microsoft Visual Studio \ VC98 \ MFC \ LIB
7. Because the DirectShow application is a COM Client Program, CoInitialize () (or CoInitializeEx) is called before any COM function is called) the function initializes the COM Library (usually called once when the application starts) and calls CoUninitialize () when the COM library is used () function initialization (usually called once before the application exits ).
----------------------------
Configuration problems [note]
1. The paths of include and lib must be arranged in strict order. Otherwise
1.1 DXSDK \ Include and VC98 \ INCLUDE have the same header file name, such as control. h and strmif. h. Therefore, the file declaration of dxsdk should be prioritized.
2.1 The order in which DXSDK \ Lib and VC98 \ LIB declare the DWORD_PTR data type is different from that in the compiled connection !!!!
2. BASECLASSES \ DEBUG and BASECLASSES \ RELEASE directories and directories do not exist. If you use the class, function, filter, interface in BASECLASSES in your application, compile baseclasses with VC. dsw, select DEBUG and RELEASE respectively during compilation, because baseclasses. dsw has four versions and is not DEBUG or RELEASE by default. Two important files are generated after compilation: strmbasd. lib (Debug) and STRMBASE. lib (Release), which will be used later.
2006-05-27 03:43:05
========================================================== ========================================================== ====================
Configure DirectShow under VS2005 in DirectShow under VS2005
Install Dx9SDK Because the sdks after 2005Feburary are dx9.0c, DirectShow is removed, and my dx9.0b SDK is removed. Compile the following example \ Samples \ C ++ \ DirectShow \ BaseClasses to obtain strmbasd. lib (Release version STRMBASE. lib) of the debug and release libraries respectively ). This step can be used in versions earlier than vs2005, but 2005 compilation is stricter than previous versions. Some discussions are excerpted from the microsoft Forum: The VC2005 compiler is stricter about enforcing some things in the C ++ standard. You can set the compiler to be less strict. (I don't know the setting off the top of my header), or modify the base classes. See: Http://blogs.msdn.com/mikewasson/archive/2005/05/23/421116.aspx Try this: If you have a VS2005 Solution with the Direct Show Base classes: Open Configuration Properties, Open C/C ++, Open Language Set the property "Force Conformance In For Loop Scope" to "No" If you are going to use the PSDK + nmake, copy the win32.mak file to the BaseClasses folder. (best to copy it to your own folder) Use the Win2000 environment, I had problems with XP. Edit your local win32.mak "-GS" (turn off security checks) as part of the common flags macro and also find the flag to turn off the loop conformance. I modified the code so it was not needed for my build. I think the flag is "-Zc: forScope -". Yes or what I did and kept used ented a while ago: 1. CtlUtil. h: Class 2. OutputQ. cpp: HRESULT COutputQueue: ReceiveMultiple (
3. WinUtil. cpp: HRESULT CImagePalette: MakeIdentityPalette (PALETTEENTRY * pEntry, INT iColours, LPSTR szDevice ){ ... UINT Count; For (Count = 0; Count <Result; Count ++ ){ 4. wxdebug. cpp: Bool winapi DbgCheckModuleLevel (DWORD Type, DWORD Level) ... Static DWORD g_dwLastRefresh = 0; DWORD dwTime = timeGetTime (); The baseclasses source code is modified and compiled. Compile the DirectShow application. The global settings are as follows: Select the tool, options, and directories menu items. In the show directories for dialog box that appears, select include files and add the following configurations (assuming that the directx sdk is installed in the D: \ dxsdk directory ): D: \ dxsdk \ include D: \ dxsdk \ samples \ c ++ \ directshow \ baseclasses D: \ dxsdk \ samples \ c ++ \ common \ include In show directories for, select library files and add the following Configuration: D: \ dxsdk \ lib D: \ dxsdk \ samples \ c ++ \ directshow \ baseclasses \ debug D: \ dxsdk \ samples \ c ++ \ directshow \ baseclassed \ release ... LONG iDone; For (iDone = 0; COARefTime: public CRefTime { ... Private: COARefTime & operator = (LONG); // YD: added COARefTime & }; |
Some DirectShow Samples Break in Visual Studio 2005
[Note: This post applies to the Platform SDK for Windows Server 2003 SP1 and Server 2003 R2. These issues were fixed in the Windows SDK for Vista.]
Some of the DirectShow samples break if you install Visual Studio 2005 Beta 2. Most of the errors that I found fall into three categories:
- C4430: Missing type specifier. to conform with C ++, undeclared types do not default to int. all types must be declared. fix: Declare the type, or suppress the warning with the "/wd4430" flag.
- C4996: 'xxxx' was declared deprecated. you may be including an older version of strsafe. h from the DirectX SDK or the Platform SDK. you shoshould include the version installed with Visual Studio. (But it's probably harmless to ignore this warning .)
- C2065: 'xxx': undeclared identifier. to conform with C ++, the scope of a variable declared inside a "for" loop is restricted to the loop. fixes: (a) Move the declaration outside the for loop. (B) Redeclare the variable in multiple scopes, if you don't need it to persist outside the loop. (c) Set the/Zc: forScope flag. (You can find this under Project, Properties, Configuration Properties, C/C ++, Language, Force Conformance In For Loop Scope. set to "No ".)
Here are the specific fixes that I made. warning: I have not thoroughly tested these, and I only tried them under the "Windows XP 32-bit Debug" environment in Platform SDK. you shoshould use your own judgment before making any of these fixes.
- BaseClasses \ ctlutil. h (278)
(LONG) operator = (LONG );
- BaseClasses \ wxdebug. cpp (564)
Static DWORD g_dwLastRefresh = 0;
- BaseClasses \ winutil. cpp (2092)
UINT Count;
For (Count = 0; Count <Result; Count ++ ){
- BaseClasses \ outputq. cpp (635)
Long iDone = 0;
For (iDone = 0;
- Capture \ AmCap \ amcap. cpp (691)
For (int I = 0; I <NUMELMS (gcap. rgpmAudioMenu); I ++)
- Capture \ AmCap \ amcap (2795)
For (int I = 0; I <NUMELMS (gcap. rgpmAudioMenu); I ++)
- DMODemo \ dsutil. cpp (686)
DWORD I = 0;
For (I = 0; I <m_dwNumBuffers; I ++)
- Dmoimpl. h (622) [In the Platform SDK headers]
For (DWORD dw = 0; dw <NUMBEROFOUTPUTS; dw ++ ){
- DMO \ GargleDMO \ MedParamBase \ param. cpp (91)
For (DWORD dwIndex = 0; dwIndex <cParams; dwIndex ++)
- DMO \ GargleDMO \ MedParamBase \ param. cpp (309)
CCurveItem * pCurve = NULL;
For (pCurve = pCurveHead;
- DMO \ GargleDMO \ gargle. cpp (145)
For (DWORD I = 0; I <cOutputStreams & SUCCEEDED (hr); ++ I)
- Filters \ Dump \ dump. cpp (426)
For (int Loop = 0; Loop <(DataLength % BYTES_PER_LINE); Loop ++)
- Filters \ Gargle \ gargle. cpp (212)
Static int m_nInstanceCount; // total instances
- Filters \ RGBFilters \ RateSource \ ratesource. cpp (382)
For (int y = 0; y <DEFAULT_HEIGHT; y ++)
- Filters \ RGBFilters \ RateSource \ ratesource. cpp (387)
For (int y = 0; y <DEFAULT_WIDTH; y ++)
- VMR \ VMRXclBasic and VMR \ Ticker: LNK1181: cannot open input file 'dxguid. lib'. This was an error in the makefile. Change to read:
DXLIB = "$ (DXSDK_DIR) \ Lib \ x86" (currently says "x32 ")
- VMR \ VMRXcl and VMR \ VMRMulti: C1083: Cannot open include file: 'd3dxmath. h': No such file or directory. this is an old DX header that is no longer encoded ded in DX or in Visual Studio. unfortunately the only fix is to download an older version of the DirectX SDK.
- VMR9 \ MultiVMR9 \ GamePlayer \ character. cpp (383)
DWORD I = 0;
For (I = 0; I <pMeshContainer-> NumInfl; ++ I)
- VMR9 \ MultiVMR9 \ DLL \ MixerControl. h (28)
Static const DWORD MultiVMR9Mixer_DefaultFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1;
- VMR9 \ VMRAllocator: error LNK2019: unresolved external symbol "wchar_t * _ stdcall _ com_util: ConvertStringToBSTR (char const *)" (etc). Add this to the makefile:
LINK32_LIBS = \
Comsuppw. lib \
Shell32.lib \