DirectShow.Net 中是否提供 IOverlay 接口

发布于 2024-08-03 21:22:00 字数 675 浏览 9 评论 0原文

我对 DirectShow 还很陌生,目前只是摸索。我想在 WPF 应用程序中托管 directshow 图形的 directshow 渲染器窗口,目前正在使用 HwndHost 类来尝试实现此目的。对于 HwndHost 我需要的是渲染视频的窗口的句柄。我找到了一个示例,该示例显示通过枚举 IVideoWindow 接口的引脚并查询 IOverlay 来获取句柄,以便可以使用 GetWindowHandle 方法来获取句柄。

问题是 IOverlay 似乎在 DirectShow.Net 中不可用。阅读 DirectShow.Net 关于 页面,表中列出了 IOverlay,标题为 “这些接口位于源代码中,但已被弃用,未记录,旨在用于 Ole Automation 或以其他方式无法测试,这意味着它们没有,也不会被测试”

那么我需要做什么才能访问这个定义呢?它是否被排除在作为库分发的构建之外,所以我应该自己从源代码构建库吗?

或者有更好的方法来做我想做的事情吗?任何帮助将不胜感激,就像我说的,我对所有这些东西都是新手。

提前致谢。

编辑:DirectShow 开发人员不多吗?或者这是一个愚蠢的问题,绝对欢迎偷看者可能提出的任何建议......

I am pretty new to DirectShow and really just feeling my way round at the moment. I am wanting to host the directshow renderer window of a directshow graph within a WPF app and am currently using the HwndHost class to try to achieve this. What I need though for HwndHost is a handle to the window which is rendering the video. I have found an example which shows getting the handle by enumerating the pins of an IVideoWindow interface and querying for IOverlay so the GetWindowHandle method can be used to get the handle.

Problem is IOverlay doesnt seem to be available in DirectShow.Net. Reading the DirectShow.Net About page, IOverlay is listed in the table with the heading "These interfaces are in the source code, but are deprecated, undocumented, intended for Ole Automation or otherwise untestable which means they are not, and will not be tested".

So what is it that I have to do to get access to this definition? Is it excluded from the build that is distributed as a library and so should I build the library from source myself?

OR Is there a better way of doing what I am trying to do? Anyhelp would be appreciated as like I said I am new to all this stuff.

Thanks in advance.

EDIT: Not many DirectShow devs out there? Or is this a stupid question, definitely open to any advice peeps may have...

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

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

发布评论

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

评论(1

书信已泛黄 2024-08-10 21:22:00

执行此操作的正常方法是使用 IVideoWindow::put_Owner 重新设置视频窗口的父级,使其成为您自己的窗口的子窗口。您还需要设置 AutoShow (false)、Visible、Width 和 Height 属性,并更改 WindowStyle 属性以使其成为子窗口。

IOverlay 接口在 DirectShow 第一个版本(1996)中实现,以支持一些早已不复存在的硬件解码器。我认为当前的视频渲染器不会支持它。

窗口句柄变得难以获取,因为糟糕的应用程序编程导致 Video for Windows 中频繁发生死锁,并且开发人员认为 DirectShow 线程和它们拥有的窗口以及任何应用程序线程之间需要明确分离。

G

The normal way to do this is to reparent the video window using IVideoWindow::put_Owner to make it a child of your own window. You will also want to set the AutoShow (false), Visible, Width and Height properties, and change the WindowStyle property to make it a child window.

The IOverlay interface was implemented in the first version of DirectShow (1996) to support some hardware decoders that are long since defunct. I don't think the current video renderers will support it.

The window handle was made difficult to obtain because poor application programming caused frequent deadlocks in Video for Windows and the developers felt that a clear separation was needed between the DirectShow threads and the windows they owned, and any application threads.

G

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