简体   繁体   中英

Control and Detect Web-cam access by any running process

I want to detect the access of connected web-cam by any running process and control that access so i can grant the access or deny it. I am using dot net and have some experience in windows API.

  1. If you only care about apps that use DirectShow (which is the usual case), you could likely implement a virtual DirectShow source filter that proxies the video frames. This assumes that the applications you care about can be configured to user your filter and not the native one.

  2. Implement a USB filter driver. Requires programming in C and kernel mode programming. You need to be very careful if you explore this suggestion. Otherwise, you could break some other vendors device's driver stack.

In both cases, when you detect the driver being opened, replace all frames that pass through with a stock "black frame" until your user mode app (running on the desktop) has finished prompting the user. (your user mode app would somehow signal the filter that the user is "allowing" the operation.) You'll likely need to support different frame sizes of RGB, MJPG, and YUV/I420.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM