使用C#获取摄像头状态 [英] Get WebCam status using C#

查看:207
本文介绍了使用C#获取摄像头状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用DirectShowLib净从摄像头捕获的图像。如何获得在C#我的摄像头的状态呢?我的意思是,如果它alredy由其他应用程序中使用?

I use DirectShowLib .Net to capture images from WebCam. How get state of my WebCam in C#? I mean if it's alredy using by another app?

推荐答案

建立一个捕获图形,如摄像机 - > Null渲染,并把它变成暂停状态。如果你成功了,相机(是)闲置监守否则该第三方应用程序将其独占锁定。

Build a capture graph, such as Camera -> Null Renderer and put it into paused state. If you succeeded, the camera is (was) idle becuase otherwise this third party app would lock it exclusively.

你可能使用 IAMResourceControl 过,但它不太可能提供的相机设备。

You could possibly use IAMResourceControl too, but it's unlikely to be available for a camera device.

这篇关于使用C#获取摄像头状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆