I have code that uses this interface to monitor webcam access and it works. However, I'm not sure how to use it to detect microphone access.
Identify the process (PID and/or img file name) which is trying to access microphone using Media Foundation or other
Hello,
I'm trying to create a console app that prints out a notification when a process is trying to access to camera or microphone.
I've found MS's Sensor Activity Monitor repo, that uses Media Foundation's IMFSensorActivityMonitor for camera access detection.
However, IMFSensorActivitiesReportCallback does not get triggered in case an app is trying to access a microphone.
So, my question is whether it is possible to use Media Foundation to detect access to microphone in the similar way it does to camera.
Is it possible to modify the IMFSensorActivitiesReportCallback implementation so that it also gets triggered on attempt to access microphone?
If it is not possible, then I would like to know which Api calls should be used for this purpose.