[Delta] PsiMedia

Justin Karneges justin-psi2 at affinix.com
Wed Nov 12 00:43:38 PST 2008


On Tuesday 11 November 2008 08:48:12 Justin Karneges wrote:
> hope to get the v4l1/v4l2 camera detection working better.

I'm doing this now by testing each Linux video device against both backends.  
The test is to initialize a device, set it to the "PAUSED" state, and then 
release the device.  The operation is expensive, but it helps whittle the 
list down.

On my current machine, I have a built-in camera that only works with v4l2 and 
I have a USB camera that only works with v4l1.  Previously, PsiMedia would 
return four possible devices:

  Labtec Webcam Notebook (v4l)
  Laptop Integrated Webcam (v4l)
  Labtec Webcam Notebook (v4l2)
  Laptop Integrated Webcam (v4l2)

What sucks about this is only two of these options actually work.  The other 
two are completely invalid.

With the "PAUSED" test, the list reduces to:

  Labtec Webcam Notebook (v4l)
  Laptop Integrated Webcam (v4l2)

Now the user can't go wrong.

For me, the test takes a couple of seconds to execute.  As a result I've 
updated the API to provide asynchronous device lookups.

Hopefully Windows/Mac aren't as broken.

-Justin


More information about the Delta mailing list