I am trying to develop a webcam filter driver (upper filter driver) that just monitors streams as they pass by but I want to extend the functionality.
I have written something that loads and is able to read the streams. I have done basic verification with the built in camera app (So I run camera app, driver attaches a read completion routine and can read the stream data). I also have code to deal with camera app (or higher app) changing camera capture resolution. It is not bullet proof but that is WIP and I am sure it does not handle everything. I have verified I can capture streams when running camera app, google meet, msft teams.
I have 2 USB cameras Logitech C920 and Logitech C720. When i plug them into my system running Windows 10 (20H2), I notice that C920 shows up in Imaging devices and C720 shows up in cameras. My INF file for my driver only installs as upper filter for imaging devices class guid. This class GUID is documented by Microsoft.
When I open the Device Manager for C920, I can see my driver installed there. My driver installs as an upper filter driver for ksthunk.sys to monitor streams.
I think if I installed as an upper filter driver for usbvideo.sys, I would not know how to decode the streams unless I am willing to read the USB video class specification.
Since my INF file does not have the class GUID for cameras, my driver does not install as an upper filter driver on the device stack for C720.
My questions are:
a) What causes 2 similar looking USB cameras (both of which presumably implement the USB video specification) to show up differently?
I have not decoded the USB descriptors using USBView to see what is different but I am curious.
b) Since I want my driver to support both types of cameras, I need to modify my INF file to support both class GUIDs.
Is it possible to have one single INF file to install with more than one class GUID?. I cannot find any samples in windows driver samples
I can obviously modify my INF file to create another for the new class GUID but I would need to maintain 2 INF files.
c) Currently, my driver is just reading the streams on their way up and sampling the video streams at a constant resolution.
If I wanted my driver to send a command to the camera to take a snapshot, where would I find the documentation for sending such a command?
I am not sure if a “sample” of the video stream is the same as a snapshot.
Here are the 2 class GUIDs from microsoft documentation.
C720 logitech falls under the first GUID and C920 falls under the second guid. The guids are retrieved from the device manager.
Camera Device
Class = Camera
ClassGuid = {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}
(Windows 10 version 1709 and later versions of Windows) This class includes universal camera drivers.
Imaging Device
Class = Image
ClassGuid = {6bdd1fc6-810f-11d0-bec7-08002be2092f}
This class includes still-image capture devices, digital cameras, and scanners.
I am not a video or camera type of guy but I am quite comfortable with drivers.
Thanks,
RK