l1npengtul / nokhwa

Cross Platform Rust Library for Powerful Webcam/Camera Capture
Apache License 2.0
537 stars 137 forks source link

Support Windows Hello IR sensors #107

Open jbayardo opened 1 year ago

jbayardo commented 1 year ago

This PR adds support for reading from the Windows Hello IR sensors by:

  1. Enumerating them in query_activate_pointers.
  2. Adding support for MF_VIDEO_FORMAT_L8

This works on my machine, but I'm unsure if any other formats are used in practice.

I don't really like having added the MF_VIDEO_FORMAT_L8 as a separate FrameFormat (because it's essentially the same as GRAY), but it's also unclear to me how to do this better without rewriting the way in which fulfill works.

l1npengtul commented 1 year ago

Hello, 0.10 is considered "dead" - senpai is the current main dev branch. If you could detail how it works, I will add it to 0.11.

0.11 has a much more flexible FrameFormat system, allowing you to have seperate, custom FrameFormats per backend.

l1npengtul commented 1 year ago

Sorry for the late response, I got covid and its really taken a toll on my ability to work.

jbayardo commented 1 year ago

Hey! Oh, no hurry at all! Wish you a speedy recovery :)

I tried using the senpai branch, but it doesn't (or didn't) compile when I was trying to develop against it, so I just used what I knew was working. I'd be happy to backport to it.

The change is simple: it adds a request for sensor cameras. The thing is that the video format wasn't "supported" (it's the same as grayscale).

l1npengtul commented 1 month ago

Luma8 will be added in 0.11