将视频渲染为 Direct3D 9.0c 纹理

发布于 2024-12-15 09:54:51 字数 128 浏览 0 评论 0原文

我一直在尝试在 Direct3D 应用程序中播放视频,并且一直在 DirectShow 的帮助下尝试这样做。我的问题是我找不到如何将帧数据放入纹理中(ISampleGrabber 不会安装)。

有谁知道这样做的任何方法或例子?

I have been trying to play a video in my Direct3D application and have been trying to do so with the help of DirectShow. My problem is that I cannot find how to get the frame data to put into a texture (ISampleGrabber won't install).

Does anyone know of any methods or examples of this being done?

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

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

发布评论

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

评论(1

一生独一 2024-12-22 09:54:51
  1. ISampleGrabber 适用于过去 15 年以上发布的所有 Windows 版本。
  2. 查找“Microsoft® DirectX® 9.0 SDK 更新(2004 年 10 月)”,其中包含示例应用程序,它完全可以满足您的需求:

Texture3D 示例说明

在 Microsoft® Direct3D 纹理表面上绘制视频。

注意此示例不支持更改显示属性
示例运行时的监视器。

路径

来源:(SDK根目录)\Samples\C++\DirectShow\Players\Texture3D

可执行文件:(SDK根目录)\Samples\C++\DirectShow\Bin\Texture3D.exe

更新。尽管 Sample Grabber 在 Windows 的许多版本中都存在,但它最终与最新版本的操作系统(特别是 Windows Server 2008)中 qedit.dll 托管的其他过滤器一起被删除。那些应用程序依赖于此 API 的用户应考虑使用旧 SDK 中的 Grabber 示例构建替代品。这同样适用于那些需要此过滤器的人,因为互联网上有很多关于如何使用它来访问媒体流的参考资料和教程。

过滤器被悄无声息地移除,没有任何更换。 Microsoft 建议 Media Foundation 是 DirectShow 的替代选项和继承者,但这几乎没有帮助。

  1. ISampleGrabber is available in all versions of Windows released last 15+ years
  2. Look for "Microsoft® DirectX® 9.0 SDK Update (October 2004)" which contains sample app, which does exactly what you want:

Texture3D Sample Description

Draws video on a Microsoft® Direct3D texture surface.

Note This sample does not support changing the display properties of
the monitor while the sample is running.

Path

Source: (SDK root)\Samples\C++\DirectShow\Players\Texture3D

Executable: (SDK root)\Samples\C++\DirectShow\Bin\Texture3D.exe

UPDATE. Even though Sample Grabber existed though many many versions of Windows, it was finally removed along with other filters hosted by qedit.dll in most recent versions of operating systems (Windows Server 2008 in particular). Those whose application are dependent on this API, should consider building a replacement using Grabber sample from older SDKs. The same applies to those needing this filter because of so many references on Internet and tutorials on how to use it to get access to media streams.

The filter was removed silently and without any replacement. Microsoft suggests that Media Foundation is an alternate option and successor to DirectShow, which is however hardly helpful.

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