Home > Suggestions > Detect if capture device is in use/busy by another application

Detect if capture device is in use/busy by another application

Avatar image
Aug 24, 2015
Archive Agent wrote
No way to detect if a camera device is in use by another application. After calling StartCapture() the SDK just sits there, no errors are posted. Serious issue for professional use!

mms on May 28, 2013 07:29
Completed
2
Vote
Reply
4 Answers
Aug 24, 2015
Archive Agent agent wrote
Roman Minyaylov

That's no standard ways in DirectShow to detect this. Usually SDK returns an error, but not for all devices.

on May 28, 2013 1:23 PM
Aug 24, 2015
Archive Agent agent wrote
mms

I have used IMediaControl.Run() returning as 0x800705aa or 0x80070057 to interpret as device in use.

The SDK however does not forward these errors, even though I know the particular device does return 0x800705aa.

on May 28, 2013 8:18 PM
Aug 24, 2015
Archive Agent agent wrote
Roman Minyaylov

SDK returns IMediaControl.Run() HRESULT if not 0 using OnError event.

on May 28, 2013 8:22 PM
Aug 24, 2015
Archive Agent agent wrote
Roman Minyaylov

Tested one minute ago with Logitech webcam.

on May 28, 2013 8:24 PM