如何开始使用 directshow?

发布于 2024-09-13 23:38:32 字数 208 浏览 8 评论 0 原文

我很难理解这个

至少要设置什么编译/运行 directshow 应用程序?

我已经安装了 Visual C++ 2008 Express。

一个你好世界会很好,

RGS!

I'm having a great trouble trying to understand this,

what's the least set up to compile/run directshow apps?

I've already installed visual c++ 2008 express.

A hello world will be nice,

RGS!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

扬花落满肩 2024-09-20 23:38:32

设置您的环境

设置环境是一个繁琐的过程,因为 DirectShow 现在已深埋在 Windows 7 SDK 中。如果您尚未构建进行任何 DirectShow 开发所需的基类,则必须首先编译 DirectShow 基类。

您将在 Windows SDK 中找到基类。最新的Windows SDK是v7.1。

您可以从以下位置下载 Windows SDK微软网站

如果将 Windows SDK 安装到其默认文件夹,您将在此处找到基类:

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses

在该文件夹中,您将找到 Visual Studio 解决方案文件。在 Visual Studio 中打开该解决方案并针对调试和发布模式对其进行编译。

接下来,在 Visual Studio 中,转到以下菜单选项:
工具->选项,
项目与解决方案-> VC++目录
显示目录 ->包含文件

添加此内容:

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses

显示目录 ->库文件

添加这些:

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses\Debug
C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses\Release

您现在应该已准备好构建 DirectShow 程序。您可能还需要添加额外的库,例如 DirectX 库(如果您使用 VMR9 进行更高级的渲染,则需要这些库)和 WMFSDK(如果您正在使用 Windows Media Format 内容)。

编写一个 Hello World 程序粘贴到 Stack Overflow 上有点长。我会在本周末某个时间发布一个,但您可能想同时查看 CodeProject,其中肯定有大量 DirectShow 示例。

DirectShow 有一个活跃的开发人员社区,您可以在其中讨论问题和解决方案。

祝你好运!

Setting up Your Environment

Setting up the environment is a cumbersome process, since DirectShow has now been buried deep in the Windows 7 SDK. If you don't already have the baseclasses built, which you'lll need to do any DirectShow development, you must first compile the DirectShow baseclasses.

You'll find the baseclasses in the Windows SDK. The latest Windows SDK is v7.1.

You can download the Windows SDK from microsoft's website.

If you install the Windows SDK to it's default folder, you'll find the baseclasses here:

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses

In that folder, you'll find a Visual Studio solution file. Open that solution in Visual Studio and compile it for both Debug and Release modes.

Next, in Visual Studio, go to the following menu option:
Tools -> Options,
Projects & Solutions -> VC++ Directories
Show directories for -> Include files

Add this:

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses

Show directories for -> Library files

Add these:

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses\Debug
C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses\Release

You should now be all set to build DirectShow programs. You may also want to add extra libraries like the DirectX libraries, (which you'll need if you're doing more advanced rendering with VMR9) and the WMFSDK (if you're working with Windows Media Format stuff).

Writing a Hello World program is a little long for pasting into Stack Overflow. I'll have a look at posting one sometime this weekend, but you might like to check out CodeProject in the meantime, which is bound to have oodles of DirectShow examples.

DirectShow has an active community of developers, where you can discuss problems and solutions.

Good luck!

两相知 2024-09-20 23:38:32

尝试下载 SDK,例如 Windows SDK“http://www.microsoft.com/downloads/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en"。
directshow 通常有一堆样本。但是,他们主要使用命令行“nmake”(不是 make)或“cl”(不是 cc 或 gcc)来构建。有时他们提供*.sln文件在VS下使用。
你的 vcam 包只是一个 dll,你仍然需要编写一个应用程序来测试它。
根据那里的示例,我相信您可以为您的 vcam 制作一个 hello-world 应用程序;)

Try downloading SDK such as Windows SDK "http://www.microsoft.com/downloads/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en".
There are usually a bunch of samples for directshow. But, mainly they either use commandline "nmake" (not make) or "cl" (not cc or gcc) to build. Sometimes they provide *.sln files to be used under VS.
Your vcam package is only a dll and you still need to write an application to test this.
Based on the samples from there, I believe you can be able to cook up one hello-world app for your vcam ;)

赠我空喜 2024-09-20 23:38:32

要获得 vcam 示例,您基本上必须在 VC 2010 中创建一个全新的“dll”项目,将旧文件添加到其中,然后设置 .def 文件以导出您需要的所有方法。

以下是一些供您参考的链接:

http://betterlogic.com/roger/?p=3096

为了让您更轻松,我将“Visual Studio Express 2010 项目”添加到

http://github.com/rdp/directshow-demo-audio-input-source

(查看其 README.txt)

GL。
-r

To get the vcam example, you basically have to create a fresh new "dll" project in VC 2010, add the old files into it, then setup the .def file to export all the methods you need.

Here's some links for ya:

http://betterlogic.com/roger/?p=3096

To make it easier on ya, I add a "visual studio express 2010 project" to the vcam_vs_2010 folder of

http://github.com/rdp/directshow-demo-audio-input-source

(checkout its README.txt)

GL.
-r

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文