⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.buz

📁 讲述linux的初始化过程
💻 BUZ
字号:
Iomega Buz Driver for Linux===========================by Rainer Johanni <Rainer@Johanni.de>Compiling and Loading the Driver================================You must run a 2.2.x kernel in order to use this driver.To compile the driver, just type make.Besides the files in this directory, the driver needs the'videodev' and the 'i2c' module from the Linux kernel.In order to get these modules available, enable module supportfor VIDEODEV and BTTV (which implies i2c) in your kernelconfiguration. You find these devices in the menu"Character Devices" in your Kernel Configuration.Before you load the driver you must have a video deviceat major device node 81. If you don't have it yet, do thefollowing (as root!):cd /devmknod video0 c 81 0ln -s video0 videoEdit the 'update' script if you want to give the driverspecial options and then type (as root)./updateto insert all the necessary modules into the kernel.If you want to make full use of the Video for Linux uncompressedgrabbing facilities, you must either- obtain and install the "big_physarea patch" for your kernel and  set aside the necessary memory during boot time.  There seem to be several versions of this patch against  various kernel versions floating around in the net,  you may obtain one e.g. from:  http://www.polyware.nl/~middelin/patch/bigphysarea-2.2.1.tar.gz  You also have to compile your driver AFTER installing that patch  in order to get it working  or- start your kernel with the mem=xxx option, where xxx is your  real memory minus the memory needed for the buffers.  For doing this add an entry in lilo.conf (if you use lilo):    append "mem=xxxM"  or add a line in your linux.par file (if you use loadlin):    mem=xxxMThe second method is by far easier, however it is dangerousif more than one driver at a time has the idea to use the memoryleftover by setting the mem=xxx parameter below the actualmemory size.Read also below how to use this memory!Driver Options==============You are able to customize the behavior of the driver by givingit some options at start time.default_input, default_norm---------------------------As soon as the driver is loaded, the Buz samples video signalsfrom one of its input ports and displays it on its output.The driver uses the Composite Input and the video norm PAL for this.If you want to change this default behavior, set default_input=1(for S-VHS input) or default_norm=1 for NTSC.v4l_nbufs, v4l_bufsize----------------------In order to make to make full use of the Video for Linux picturegrabbing facilities of the driver (which are needed by manyVideo for Linux applications), the driver needs a set ofphysically contiguous buffers for grabbing. These parametersdetermine how many buffers of which size the driver willallocate at open (the open will fail if it is unable to do so!).These values do not affect the MJPEG grabbing facilities of the driver,they are needed for uncompressed image grabbing only!!!v4l_nbufs is the number of buffers to allocate, a value of 2 (the default)should be sufficient in almost all cases. Only special applications(streaming captures) will need more buffers and then mostly theMJPEG capturing features of the Buz will be more appropriate.So leave this parameter at it's default unless you know what you do.The things for v4l_bufsize are more complicated:v4l_bufsize is set by default to 128 [KB] which is the maximumamount of physically contiguous memory Linux is able to allocatewithout kernel changes. This is sufficient for grabbing 24 bit color imagesup to sizes of approx. 240x180 pixels (240*180*3 = 129600, 128 KB = 131072).In order to be able to capture bigger images you have either to- obtain and install the "big_physarea patch" and set aside  the necessary memory during boot time or- start your kernel with the mem=xxx option, where xxx is your  real memory minus the memory needed for the buffers.In that case, useful settings for v4l_bufsize are- 1296 [Kb] for grabbing 24 bit images of max size 768*576- 1728 [Kb] for 32bit images of same size (4*768*576 = 1728 Kb!)You may reduce these numbers accordingly if you know you are onlygrabbing 720 pixels wide images or NTSC images (max height 480).In some cases it may happen that Linux isn't even able to obtainthe default 128 KB buffers. If you don't need uncompressed imagegrabbing at all, set v4l_bufsize to an arbitrary small value (e.g. 4)in order to be able to open the video device.vidmem------The video mem address of the video card.The driver has a little database for some videocardsto determine it from there. If your video card is not in thereyou have either to give it to the driver as a parameteror set in in a VIDIOCSFBUF ioctlThe videocard database is contained in the file "videocards.h"Gernot Ziegler wants to keep an actual version of that file.If your card is not contained in that file, look athttp://www.lysator.liu.se/~gz/buz/ for an actual version of"videocards.h".triton, natoma--------------The driver tries to detect if you have a triton or natome chipsetin order to take special measures for these chipsets.If this detection fails but you are sure you have such a chipset,set the corresponding variable to 1.This is a very special option and may go away in the future.Programming interface=====================This driver should be fully compliant to Video for Linux, so alltools working with Video for Linux should work with (hopefully)no problems.A description of the Video for Linux programming interface can be found at:http://roadrunner.swansea.linux.org.uk/v4lapi.shtmlBesides the Video for Linux interface, the driver has a "proprietary"interface for accessing the Buz's MJPEG capture and playback facilities.The ioctls for that interface are as follows:BUZIOC_G_PARAMSBUZIOC_S_PARAMSGet and set the parameters of the buz. The user should alwaysdo a BUZIOC_G_PARAMS (with a struct buz_params) to obtain the defaultsettings, change what he likes and then make a BUZIOC_S_PARAMS call.A typical application should at least set the membersinput, norm and decimation of the struct buz_params.For a full description of all members see "buz.h"BUZIOC_REQBUFSBefore being able to capture/playback, the user has to requestthe buffers he is wanting to use. Fill the structurebuz_requestbuffers with the size (recommended: 256*1024) andthe number (recommended 32 up to 256). There are no such restrictionsas for the Video for Linux buffers, you should LEAVE SUFFICIENTMEMORY for your system however, else strange things will happen ....On return, the buz_requestbuffers structure contains number andsize of the actually allocated buffers.You should use these numbers for doing a mmap of the buffersinto the user space.The BUZIOC_REQBUFS ioctl also makes it happen, that the next mmapmaps the MJPEG buffer instead of the V4L buffers.BUZIOC_QBUF_CAPTBUZIOC_QBUF_PLAYQueue a buffer for capture or playback. The first call also startsstreaming capture. When streaming capture is going on, you mayonly queue further buffers or issue syncs until streamingcapture is switched off again with a argument of -1 toa BUZIOC_QBUF_CAPT/BUZIOC_QBUF_PLAY ioctl.BUZIOC_SYNCIssue this ioctl when all buffers are queued. This ioctl willblock until the first buffer becomes free for saving itsdata to disk (after BUZIOC_QBUF_CAPT) or for reuse (after BUZIOC_QBUF_PLAY).BUZIOC_G_STATUSGet the status of the input lines (video source connected/norm).This ioctl may be subject to change.See the examples directory delivered with this driverfor actual coding examples!

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -