DirectDraw 比 Direct3d 更适合流式传输?

发布于 2024-09-28 21:54:31 字数 444 浏览 5 评论 0原文

让我具体说明一下背景。

我目前使用开源程序来运行我的电视调谐器 (DScaler)。该软件的最终版本对 Direct3D 输出有一些支持,但问题是它滞后。我一直在仔细检查代码并阅读 DirectX 文档,试图找到优化代码的地方,以便 DirectX 的渲染与 DirectDraw 上的渲染一样流畅。因为该软件内置了针对关键显示例程(锁定缓冲区、解锁、翻转等)的分析,所以我知道在使用 Direct3D 时遇到麻烦的点在于覆盖翻转部分。我得出的结论是,向 D3Device 呈现的速度太慢,无法跟上电视调谐器的捕获速度,因此我丢失了帧,并且无法以 29 fps 的速度显示它们。

由于我不太了解 DirectX,我的问题是:Direct3d 是否不是显示视频捕获的最佳选择,或者问题仅仅是代码可能不是最好的?我问这个问题是因为我仍然有兴趣尝试找到一种方法来使其工作,以便我可以在某些流上显示我的捕获(即:Xfire)。

谢谢。

Let me specify little background.

I currently use an open source program to run my TV Tuner (DScaler). The final version for the software has some support for Direct3D output, the problem with this is that it lags. I have been going through the code and reading through DirectX documentation trying to find a place to optimize the code so that rendering is as smooth of DirectX as it is on DirectDraw. Because the software has built in profiling for the critical display routines (lock buffer, unlock, flip, etc.) I know that when using Direct3D the point where it runs into trouble is in the overlay flipping part. I've come to the conclusion that Presenting to the D3Device is just too slow to keep up with the Tv tuner's capture and as a result I'm losing frames and not displaying them at the 29fps.

Since I don't know DirectX very well, my question is: Is Direct3d just not an optimal option for displaying video capture or is the problem simply that the code probably isn't the best it could be for it? I ask because I'm still interested in trying to find a way to make it work so I can display my capture on some streams (ie: Xfire).

Thanks.

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

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

发布评论

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

评论(2

雨夜星沙 2024-10-05 21:54:31

我个人不会使用 DirectDraw,因为它已被弃用,这意味着它已计划删除并且不再维护。

这是关于它的维基百科文章:http://en.wikipedia.org/wiki/DirectDraw

I wouldn't personally use DirectDraw because it has been deprecated, which means it is scheduled for removal and is no longer being maintained.

Here's the Wikipedia article on it: http://en.wikipedia.org/wiki/DirectDraw

萌︼了一个春 2024-10-05 21:54:31

有大量的老游戏正在流媒体中大量回归。因此,对于微软来说,目前弃用似乎并不是一个好主意。

There are tons of old games that are coming back in hordes in streaming lines. So deprecation doesn't seem to be a good idea at the moment for Microsoft.

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