Silverlight 5 web cam capture: Two capture sources on the same device

0

I tried to attach the same Video Source Device (the WEB CAM) to two different CaptureSource objects but it looks like that want work.

The system throws an exception: A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)

I think the web cam is locked on first CaptureSource.

Does anybody has an idea how to display two images from the same Device but from different capture source? I wanted to use a simple CaptureSource on one side and MediaStremSource with some filtering on the other side to see differences between original and filtered video source.

I wanted to use the plain CaptureSource because it's performance is better than MediaStreamSource. MediaStreamSource loses time when raises OnSample Event which is not happening with CaptureSource.

silverlight
webcam
video-capture
asked on Stack Overflow Mar 24, 2012 by Patrik

2 Answers

0

I know this exception, When you work on debug mode silverlight fails. Run project by Ctrl+F5. (Release mode)

In addition use ask for permission methods this will display permission window for camera.

answered on Stack Overflow Mar 26, 2012 by Davut Gürbüz
0

It is very capable, just did it myself. However, in experimenting with different cameras and different inputs.... 2 MS LifeCams connected to USB3 = same error. Connecting to USB2 hub to USB2 MB works like a charm. Also, if I run something like ActiveCam and it crashes, may need a reboot. Oh, you will need to use 2 capture sources.... but can still ask permission once.

Also remember not to use DefaultCaptureDevice but:

var dev1 = CaptureDeviceConfiguration.GetAvailableVideoCaptureDevices()[0];
var dev2 = CaptureDeviceConfiguration.GetAvailableVideoCaptureDevices()[1];

With perhaps better naming conventions and logic to check if devices exist etc...

answered on Stack Overflow Mar 27, 2012 by Chris S

User contributions licensed under CC BY-SA 3.0