Usbvideo.inf Driver

0 views
Skip to first unread message

Bridgette Kubis

unread,
Aug 3, 2024, 10:43:06 AM8/3/24
to cesshighkuptbulk

In general, vendors who supply a setup package can register the plug-in DLL by using the setup package, in which case the vendor does not provide an INF file. For driver signing, it may be easier to provide a setup package instead of a device-specific INF file.

The first part of the following INF AddReg section registers the plug-in. The remainder of this section shows the registry entries for a node-based Extension Unit plug-in. Refer to Usbvideo.inf for similar examples.

For USB Cameras, if the device interface registry key location contains a DWORD registry entry EnableDependentStillPinCapture with a non-zero value, the dependent pin on such cameras will be used for photo capture. If the registry entry is not present or set to zero, the dependent pin will not be used. Instead, the photo capture will be done using a frame taken from the preview pin. The following enables dependent still pin capture:

You can also define an optional registry value called UvcFlags. UvcFlags should be a DWORD value. When the device is plugged in, the UVC driver receives a Plug and Play (PnP) Start request. The driver then searches for UvcFlags in the device registry key. The DWORD value is a bitmask and can contain the values in the following table.

If you are installing USB drivers: You don't need to download USB device class drivers. They're installed automatically. These drivers and their installation files are included in Windows. They're available in the \Windows\System32\DriverStore\FileRepository folder. The drivers are updated through Windows Update.

If you are writing a custom driver: Before writing a driver for your USB device, determine whether a Microsoft-provided driver meets the device requirements. If a Microsoft-provided driver isn't available for the USB device class to which your device belongs, then consider using generic drivers, Winusb.sys or Usbccgp.sys. Write a driver only when necessary. More guidelines are included in Choosing a driver model for developing a USB client driver.

USB device classes are categories of devices with similar characteristics and that perform common functions. The USB-IF defines those classes and their specifications. Each device class is identified by a USB-IF approved class, subclass, and protocol codes, all of which are provided by the IHV in device descriptors in the firmware. Microsoft provides in-box drivers for several of those device classes, called USB device class drivers. If a device that belongs to a supported device class is connected to a system, Windows automatically loads the class driver, and the device functions with no other driver required.

Hardware vendors shouldn't write drivers for the supported device classes. Windows class drivers might not support all of the features that are described in a class specification. If some of the device's capabilities aren't implemented by the class driver, vendors should provide supplementary drivers that work with the class driver to support the entire range of functionality provided by the device.

Microsoft defines setup classes for most devices. IHVs and OEMs can define new device setup classes, but only if none of the existing classes apply. For more information, see System-Defined Device Setup Classes.

The device setup classes are different from USB device classes discussed earlier. For example, an audio device has a USB device class code of 01h in its descriptor. When connected to a system, Windows loads the Microsoft-provided class driver, Usbaudio.sys. In Device Manager, the device is shown under is Sound, video and game controllers, which indicates that the device setup class is Media.

One possible problem I've just noticed is the brightness settings in the windows camera app. When I hit the brightness button the app crashes. On occassion the brightness toggle will appear briefly before it crashes showing the lowest brightness setting.

If a webcam driver update is available from HP, download the file to your computer and install the software according to the instructions on the webpage. After updating, restart the computer, and then try using your software again. If the problem persists, continue using these steps to install a generic Windows USB video driver.

If more than one webcam driver is listed, right-click the driver and select uninstall for any driver that is not the HP Webcam-101 or Microsoft USB Video Device driver. Once the other drivers have been removed, restart your computer and open your software. If problems persist, continue using these steps.

I appreciate your efforts to try and resolve the issue. I would suggest performing system factory reset will put the computer back to the original factory settings in this way all corrupted and outdated software will be removed.


Restoring Files that were Backed Up Using HP Recovery Manager (Windows )You can also contact HP support for assistance. They can remotely access your system to help alleviate difficulties: www.hp.com/contacthp/

If I unplug it and plug it in again, I'm getting the same message again, the device doesn't work and Windows hangs when I try to reboot or shutdown.
I have a freshly installed Windows 7 (the same edition) on a secondary disk, and there is no such problem there.

I solved a similar problem. My USB system had become very ill: although existing drivers would work fine, as soon as I moved any USB device to another port or installed a new device or tried, horror, to reinstall a device, Windows would refuse with "USB device not recognized". Within a couple of hours, my system was reachable by Remote Desktop only -- no USB at all worked.

Secondly, I would suggest booting the "bad" version in Safe mode. If the problem now disappears, then the cause is some installed product. Use Autoruns to turn off stuff in bunches and rebooting until you find the guilty product.

The only solution to avoid complete re-installation may be to refresh Windows by doing Startup Repair in Windows 7. This will only refresh Windows and leave alone all installed applications and their settings. You will need a Windows boot DVD of the same service-pack level as your installed system.

If your Windows installation is too messed-up so that Startup Repair fails, you will need to reinstall Windows from scratch, recommended with a reformat of the hard disk. So ensure you have backups of all your data, and installation media for all your products including serials. On some computers you receive a boot CD that allows you to restore the system to its state as when bought.

Did they used to work? If not, then perhaps you have a bad USB hub/controller. If they did, then unless there was a short-circuit or something to damage the hub/controller, it should be possible to fix it.

I have seen this with a few different kinds of devices. In most cases, there was nothing actually wrong with the device. (Which makes me feel really bad about spending $27CAD to ship my QX3 back to Intel in the USA in exchange for a check for $24CAD. >:-)

Ensure that the cables are all correctly connected. Sometimes the cables (including the ones that connect from the ports on the front or back of the case to the motherboard) can come loose a bit, thus disrupting the connection.

Clean the pins. The metal pins on the USB connector (on both the device/cable and the port) can accumulate a patina (especially in humid conditions), which disrupts the signal. Use a cotton swab with water/soap/alcohol or something to clean them off, thus restoring their electrical connection. I usually just resort to lightly scrubbing them with a cardboard Emory board.

Open a command-prompt (cmd.exe), type set devmgr_show_nonpresent_devices=1 followed by devmgmt.msc. In the Device Manager, select View->Show hidden devices. Now find the device that is giving you problems, right-click it and select Uninstall. Disconnect the device, reboot, and connect it when Windows has completely loaded.

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.

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.

An INF can belong to one and only one device class. If you want to filter both Imaging and Camera device classes, you need an INF per class. As to why there are two device classes, I can only guess as to why there is a change (my guess @Tim_Roberts knows in detail). My guess is that imagine is the older class that encompasses scanners, digital cameras, etc and the Camera class is meant for webcams and live cameras you can attach to the PC. As to how they match to a different class, open the properties of each device in device manager and go to the Details tab and look at the Matching device id value. If it is an inbox INF match, it will most be compatible ID derived from a usb defined device class code. I attached a logitech c925e and it matches on USB\Class_0e

c80f0f1006
Reply all
Reply to author
Forward
0 new messages