What is missing
_usbif.FN_VIDEO (bit 32) is built into the C module and examples/usbif_webcam.py uses it. The portable costume API does not know the name:
# lib/usbif/native_usb.py
_BITS = {"cdc": 1, "msc": 2, "uac": 4, "midi": 8, "hid": 16}
# no "uvc" / "video"
So usbif.auto.device().functions("cdc", "uvc") raises, and the webcam example has to poke _usbif directly.
Why it matters
Costume selection is supposed to be the portable surface. Every other device class is reachable through it; video is the odd one out, which means applications that want a webcam costume cannot stay on the portable API.
Fix shape (for whoever lands it)
Add "uvc": 32 (or "video": 32, matching the C name — pick one and document it) to NativeDevice._BITS and to Device.FUNCTIONS, and extend the costume self-test matrix.
What is missing
_usbif.FN_VIDEO(bit 32) is built into the C module andexamples/usbif_webcam.pyuses it. The portable costume API does not know the name:So
usbif.auto.device().functions("cdc", "uvc")raises, and the webcam example has to poke_usbifdirectly.Why it matters
Costume selection is supposed to be the portable surface. Every other device class is reachable through it; video is the odd one out, which means applications that want a webcam costume cannot stay on the portable API.
Fix shape (for whoever lands it)
Add
"uvc": 32(or"video": 32, matching the C name — pick one and document it) toNativeDevice._BITSand toDevice.FUNCTIONS, and extend the costume self-test matrix.