dcsimg
Linux Today: Linux News On Internet Time.




More on LinuxToday


Linux Magazine: Video4linux Drivers, Part 2: Video-capture Devices

Apr 22, 2000, 18:29 (1 Talkback[s])
(Other stories by Alan Cox)

WEBINAR:
On-Demand

Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame


"Last month I began to develop a very simple camera driver as an illustration of Linux's video-capture interface. What we need to do now is to provide the functions to control the use of the device and to query its facilities. As with the radio driver, the major control interface is via the ioctl() function (Listing One). Video-capture devices support the same tuner calls as radio devices, and also support additional calls to control how the video functions are handled. In this simple example the card has no tuners, to avoid making the code complex."

"The first ioctl we must support (required by all video-capture and radio devices) is VIDIOCGCAP. This behaves exactly the same as with a radio device. This time, however, we report the extra capabilities we outlined earlier when defining our video_dev structure."

"We now set the video flags saying that we support overlay, capture, scaling, and chromakey. We also report size limits -- our smallest image is 16x16 pixels, our largest is 640x480."

Complete Story

Related Stories: