Depressing dx9.0 (DirectShow programming)

Source: Internet
Author: User

I really wanted to be a media player to play games. Unfortunately, I have never had a chance. This time, I suddenly got a chance to deal with video streams.Program. It was ecstatic, but it was knocked down by the DirectShow environment configuration for nearly a week. Well, let's get down to the point, so that other people don't have to take a long journey.

The first problem is the SDK. At present, the DX series has grown to 9.0. To keep pace with the times, we should use the latest version. Unfortunately, this latest version is a tough nut to crack. If you search for dx9.0 online, you will definitely receive a bunch of articles, such as dx9.0c and dx9.0b ...... and so on, and all the demons and ghosts will come out. Therefore, we recommend that you download it directly from the Microsoft official website, which can reduce the number of demons and ghosts. However, Microsoft is also fond of tossing people and having a good DX family, and now it is also difficult to separate them. This is why many different versions of 9.0 have appeared above, and some even say they are newer versions, note that the difference between 9.0c and 9.0b is mainly described here.

First, 9.0b is earlier than 9.0c. Theoretically, the latter is more powerful than the former. However, because it is too advanced, Microsoft has separated the DirectShow part from it, and, even worse, it is not growing independently. Instead, it is installed in the Platform SDK. This relationship can increase the number of people. Therefore, if you want to use dx9.0 in the conventional method, we recommend that you install 9.0b with over 220 MB and download it from the official website, although the new version can also be used, the configuration cannot be called at a moment. So I chose the old path.

After downloading and installing 9.0b, You need to compile the library by yourself, that is, to generate strmbasd. Lib. 9.0b is very convenient. It is easy to find baseclasses in the path you have installed (for example, I installed it on drive C): C:/dxsdk/samples/C ++/DirectShow/baseclasses. DSW, open this project, select the debug version or the release version for compilation (Be sure not to select the Unicode version, and there will always be an error after selecting it ). After the library is generated, the configuration of our own project is started.

In the menu bar, click (tools-> options-> Directories) to set the files and related libraries:
Include file:

C:/dxsdk/include

C:/dxsdk/samples/C ++/DirectShow/baseclasses

C:/dxsdk/samples/C ++/common/include

Lib file:

C:/dxsdk/lib

C:/dxsdk/samples/C ++/DirectShow/baseclasses/debug

Then add the compiled library strmbasd. Lib in the object/library modules box of (probject-> setting-> linking.

So far, you have configured several basic OK statements. But if you want your program to run successfully, you can add the following files at the beginning of the class:

# Include <dshow. h>
# Include <streams. h>

Well, I wish you a one-time success. But if you try it for the first time, you should try it step by step.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.