Commit 1b58b96b authored by Val Doroshchuk's avatar Val Doroshchuk Committed by VaL Doroshchuk
Browse files

DirectShow: Notify if camera has been unplugged


If being used camera has been disconnected, state and status will
remain like it is still active. Also no events are sent.
Previously to fix this the camera needed to be unloaded and loaded again manually.

IMediaEvent provides an ability to catch device removal notification
with EC_DEVICE_LOST event.

Since ISampleGrabber is used to get buffers.
Added a fix to check if no buffers received for some time
afterwards check for EC_DEVICE_LOST event.
In case if the device is lost, the camera should be unloaded.

Change-Id: I3a5edf00ce8ee25d8b06800fdad833a722bdba0d
Task-number: QTBUG-68035
Reviewed-by: default avatarVaL Doroshchuk <valentyn.doroshchuk@qt.io>
Reviewed-by: default avatarMaurice Kalinowski <maurice.kalinowski@qt.io>
parent 89e6018f
No related merge requests found
Showing with 36 additions and 3 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment