DirectShow CSourceStream 过滤器无法正确卸载

发布于 2024-08-28 02:20:53 字数 758 浏览 4 评论 0原文

我正在使用 CSource / CSourceStream 作为基础编写 DirectShow 捕获过滤器,但是当我在 Firefox + Flash 中访问摄像头时,我在关闭 Firefox 时收到调试断言和以下调试错误。

Cam6.ax(tid 1c98)   133506 : 
Cam6.ax(tid 1c98)   133506 :    ID             Object Description
Cam6.ax(tid 1c98)   133506 : 
Cam6.ax(tid 1c98)   133506 :    19 (001AE940)          Camera Stream
Cam6.ax(tid 1c98)   133507 :    18 (001AE940)                 Camera
Cam6.ax(tid 1c98)   133507 :     6 (001AE940)          Camera Stream
Cam6.ax(tid 1c98)   133507 :     5 (001AE940)                 Camera
Cam6.ax(tid 1c98)   133507 : 
Cam6.ax(tid 1c98)   133507 : Total object count     4

据我所知,这不是我的错。我怀疑 Flash 在关闭时不干净地丢弃了 DirectShow 图形。我已经阅读并重新阅读了 MSDN 文档,并在网上搜索了示例,但没有找到任何结果。

谁能帮助我澄清这一点或为我指出正确的方向?

I am writing a DirectShow capture filter using CSource / CSourceStream as a base but when I access the cam in Firefox + Flash, I get a debug assert and the following debug error when closing Firefox.

Cam6.ax(tid 1c98)   133506 : 
Cam6.ax(tid 1c98)   133506 :    ID             Object Description
Cam6.ax(tid 1c98)   133506 : 
Cam6.ax(tid 1c98)   133506 :    19 (001AE940)          Camera Stream
Cam6.ax(tid 1c98)   133507 :    18 (001AE940)                 Camera
Cam6.ax(tid 1c98)   133507 :     6 (001AE940)          Camera Stream
Cam6.ax(tid 1c98)   133507 :     5 (001AE940)                 Camera
Cam6.ax(tid 1c98)   133507 : 
Cam6.ax(tid 1c98)   133507 : Total object count     4

From what I can tell this is not my fault. I suspect Flash is uncleanly discarding the DirectShow graph on shutdown. I have read and re-read the MSDN documentation and scoured the net for examples but turned up nothing.

Can anyone help clarify this for me or point me in the right direction?

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

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

发布评论

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

评论(1

美男兮 2024-09-04 02:20:53

感觉这件事有点傻。花了一天时间查看引用计数之类的东西后,结果证明这是一个菜鸟错误。我使用 /MDd 标志编译了 strmbasd.lib,并使用 /MD 标志编译了我的代码。前者针对调试运行时库,后者针对发布运行时库。

链接器发出了警告,但没有引起注意,代码一直运行到释放 DLL 为止。想想吧……

我想把这归因于愚蠢。 :)

Feeling a little silly about this. After spending a day looking at reference counts and whatnot, it turned out to be a noobie mistake. I compiled strmbasd.lib with the /MDd flag and my code with the /MD flag. The former was targeting the debug runtime libraries, the later the release runtime libraries.

The linker gave a warning which went unheeded and the code ran up until time to release the DLL. Go figure..

Chalk that one up to stupidity I guess. :)

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