如果在主机选项卡不可见时启动图形 (TVideoWindow),DirectShow 渲染窗口将显示黑色
我有一个使用 DirectShow DSPACK 组件套件的 Delphi 6 应用程序。它有一个 TVideoWindow 组件,可以渲染过滤器图表中的图像。 TVideoWindow 组件位于页面组件的选项卡上。如果当我运行过滤器图表时选项卡可见,则视频显示得很好。另外,我可以切换到另一个选项卡并返回,视频仍然很好。但是,如果我在选项卡不可见时运行过滤器图表,那么当我切换到该选项卡时,视频窗口区域将为黑色。我尝试切换到另一个选项卡并返回,最小化主机窗体并恢复它,它保持黑色。我想知道这是否是窗口/组件句柄生命周期问题?我该如何解决这个问题?
I have a Delphi 6 application that uses the DirectShow DSPACK component suite. It has a TVideoWindow component that will render the images from a filter graph. The TVideoWindow component is on a Tab in a page component. If the Tab is visible when I run the Filter Graph the video shows just fine. Also, I can switch to another Tab and come back and the video is still fine. However, if I run the Filter Graph when the Tab is not visible, then when I switch to that Tab the video window area is black. I tried switching to another Tab and back, minimizing the host form and restoring it, and it stays black. I am wondering if this is a window/component handle life-cycle problem? How can I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
直接使用 COM 对象(例如将 EVR 设置为随后显示的隐藏面板)时,不会发生此问题。我建议花时间摆脱 TVideoWindow 并直接使用 VMR9 和 EVR 等渲染器会更有效率。您不必摆脱 DSPack 即可执行此操作,请
注意:上述内容需要 EVR.pas
This problem does not happen when using COM objects directly such as setting the EVR to a hidden Panel that is subsequently shown. I'd suggest that time spent getting rid of the TVideoWindow and using renders such as the VMR9 and EVR directly would be more productive. You don't have to get rid of DSPack to do this, something along the lines of
Note: the above requires EVR.pas