in reply to Windows Webcam access.
Perl isn't very good at low-level hardware access, even if it is possible. Typically, you need some C clue code packed in an XS. All current desktop operating systems prevent you from messing directly with the hardware, and they have good reasons to do so. Typically, you communicate with a OS specific and hardware specific driver that wraps the hardware access. Most of the times, the driver (or set of drivers) abstracts the differences between different hardware and give you a generic interface.
Think about soundcards. When was the last time that you had to mess with hardware registers? Last century, I would bet. Today, you connect to a generic sound device driver and tell it to play your sound data.
Exactly the same happens with web cams. They typically are USB devices. To access their hardware registers, you have to communicate with the USB controllers and ask them to mess with the cam's hardware registers. USB controllers have different standards and different vendors, and the OS abstract that for you. So you get a stack of hardware and drivers: Web cam - USB controller - PCI bus - PCI driver - USB driver - Web cam low level driver - video API driver.
Unless you really want to get mad fiddling with the hardware, your best bet is the video API (e.g. V4L on Linux, VfW or some DirectX stuff on Windows).
Alexander
|
|---|