DirectShowNet 和烦人的屏幕
我正在使用 DirectShowNet.dll 来抓取照片 我的网络摄像头。
每当我的相机初始化时,它都会首先向我显示这个 屏幕。我可以在哪里关闭它?
I'm using DirectShowNet.dll to grab a photo
of my web camera.
Anytime my camera initializes it first shows me this
screen. Where can I turn it off?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来您的代码正在拉出相机的道具页面。如果我明确编写代码来执行此操作,我只能获取此属性页来显示。你是如何获得图像的?图-> CaptureGraphBuilder2 + SampleGrabber ->样本采集器CB?
Looks like your code is pulling up the prop pages for your camera. I have only been able to get this property page to show if I explicitly write code to do it. How are you getting the image? Graph -> CaptureGraphBuilder2 + SampleGrabber -> SampleGrabberCB?
您可以使用 Win32 FindWindow 命令来查找它,然后发送 WM_COMMAND 来按 OK 按钮?
编辑:如果您想以更“正确”的方式进行操作(虽然我的经验来自 C++ 端,但我认为其大致相同),您可能需要找到视频捕获过滤器。找到该接口后,您可以查询该接口以查看是否可以访问其 IPropertyPage (IIRC) 接口。如果可以的话,您应该可以调用 Deactivate。
唉,我目前无法访问网络摄像头,所以我无法检查具体如何执行此操作...
您在使用 ICaptureGraphBuilder 吗?如果是这样,那么很值得学习如何枚举所有设备并将它们连接在一起。它会让你更好地理解正在发生的事情:)
You could use the Win32 FindWindow command to find it and then send a WM_COMMAND to press the OK button?
Edit: Well if you want to do it the more "proper" way (Though my experience is from the C++ end, but I assume its much the same) you may want to locate the video capture filter. Once you've located that you can query interface it to see if you can access its IPropertyPage (IIRC) interface. If you can then you should just be able to call Deactivate.
Alas I don't have access to a webcam at the moment so I can't check on how exactly to do this ...
Are you using the ICaptureGraphBuilder? If so it may well be worth learning how to enumerate all the devices and attach them together yourself. It will give you a MUCH better understanding of whats going on :)