?? readme.developer
字號:
WebCam GO/GO Plus Linux-----------------------by Raffaele Spangaro <keatch@f2.com> http://www.keatch.f2s.com Basic driver structure explained --------------------------------Ok, the driver uses the USB subsystem and the video4linux interface.First, the driver register itself within the USB subsystem via thew9967cf_probe. This function is called only if the product is listedin the array of know vid:pid named device_tablestatic __devinitdata struct usb_device_id device_table [] = { { idVendor: 0x041e, idProduct: 0x4003 }, /* WebCam GO Plus */ { idVendor: 0x1046, idProduct: 0x9967 }, /* W9967cf/W9968cf based cam */ { } /* Terminating entry */};The w9967cf_probe fills some basic camera parameters in the structurew9967cfcam, the alternate interface 1 (1023 Mb/s) (provvisiory?), thentry to register the driver with video4linux as a VIDEO_CAPTUREinterface. (The v4l calls w9967cf_init_done) If the registration isok, the probe function return 0 and exit.At this point the driver is registered either with the USB than with theV4L.The disconnect is done via the w9967cf_destroy function, thatderegister the driver from the v4l interface.VIDEO4LINUX & USB THINGS------------------------When the /dev/video is open the v4l subsytem calls the functionw9967cf_open.This function make the following things: - Basic setup with the chip (capture size & FIFO On) w9967_init_chip - Allocate the buffer for the receive frame (via rvmalloc ) and the temporary buffer for USB transfer: w9967_allocate_buffer - Init the USB Isoc Transfer: w9967cf_init_isocWhen the /dev/video is closed v4l calls w9967cf_close that deallocateall buffer, stop isoc.The ioctl are implemented via the w9967cf_ioctl. Basic ioctl aresupported, the most important not.USB ISOC TRANSFER-----------------The function w9967cf_init_isoc initialize the URB structure for theUSB subsystem. At the moment there are some constant parameters that could be settedaccording to the current acquisition parameters and transfer rates.I.e: yet it assumes that the image is RGB 355*288 and fills the numberof packets and other things to the appropriate value.An handler for the USB Isoc Transfer is defined. This handler iscalled to reorder and assemble the data coming in from the USB whenthe isoc transfer is called.The installed handler is w9967_irq_complete. No locks are maded yet inthis handler. (Uh, its called asyncronous by the USB subsytem...)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -