2

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?

Timur Mustafaev
  • 4,869
  • 9
  • 63
  • 109

1 Answers1

0

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.

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

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • As you mentioned `DirectShow.NET` library, you should either be familiar with graphs, or check the library samples - they are all about graphs. – Roman R. Dec 28 '11 at 14:17