Video for Linux Two Change Log 2003-06-26: Added V4L2_PIX_FMT_YVYU and V4L2_PIX_FMT_VYUY. 2002-03-30: Use do_div() instead of inline assembler for portability. Switch from malloc.h to slab.h. 2001-12-20: Added MODULE_LICENSE definitions to avoid warning messages. 2001-11-13: videodevX: Added some more VID_HARDWARE_XXX symbols to sync with new additions to v4l. 2001-10-30: videodevX: Fixed a couple compiler warnings. 2001-10-05: videodevX: Fix compile problem on 2.4.10. 2001-09-17: videodevX: Fix compile problem on kernel 2.4.9. Added new YUV formats. Fixed v4l compatibility problem with some YUV formats. Added VIDIOC_G_FREQUENCY and VIDIOC_S_FREQUENCY. 2001-06-27: videodevX: Fix incompatibility with 2.4.3 and later v4l drivers related to the 'owner' field and video_register_device(). Should now be compatible up to kernel 2.4.5. (Thanks to Justin and David van Vyfeyken.) 2001-06-12: videodevX: In 'make install' make sure new videodev.h is in /usr/include/linux as well as $(KERNEL_DIR)/include/linux/. 2001-05-01: videodevX: Remove a compiler warning from videodev.h that occurs when compiling application code. 2001-04-18: videodevX: Split v4l backward compatibility layer out of videodevX.c and into v4l_compat.c. The new module will be automatically loaded by videodevX when a V4L2 driver is loaded. 2001-04-13: Added big endian 16-bit RGB formats. 2001-03-30: videodevX: Fixed undefinded symbol problems that could occur with certain kernel configuration options. 2001-03-12: videodevX: The v4l2_major parameter works again. Lets you assign a different major number for V4L2 devices. 2001-03-08: videodevX: Additions to VIDEO_PALETTE_* translations in the v4l back compatibility layer. From Justin. 2001-03-02: Certain v4l ioctls that really pass data both ways, but whose types are read-only, didn't work correctly through the backward compatibility layer. Reported by Michael Hunold. 2001-02-26: videodevX: video_mmap() always returned -EINVAL instead of the correct return code -- fixed. 2001-01-26: videodevX: Fixed a possible kernel-level incompatibility between the videodevX videodev.h and the 2.2.x videodev.h that had the devfs patches applied. videodev: Changed fourcc to v4l2_fourcc to aviod namespace pollution. Some other cleanup. 2001-01-25: Fixed a possible driver-level compatibility problem between the original 2.4.0 videodev.h and the videodev.h that comes with videodevX. If you were using an earlier version of videodevX on 2.4.0, then you should recompile your v4l and V4L2 drivers to be safe. 2001-01-22: Fixed a compile problem that occurred if you weren't using devfs. 2001-01-18: Updates to videodevX from Justin: . Brought up to date with 2.4.0 videodev.[ch] files. . Added Gerd Knorr's v4l1 extensions. . Fixed a namespace conflict (the fourcc macro changed to v4l2_fourcc). . More Makefile updates for 2.4.0. 2001-01-17: I am now maintaining the videodevX module for 2.4.0 and later. Fixed a problem in the Makefile that caused 'make' to not work with the 2.4.0 release kernel source. 2000-12-04: Fixed a couple typos in symbol names. 2000-11-25: Added V4L2_TYPE_VBI_INPUT. Bring v4l stuff up to date with 2.4.0-test9. 2000-11-20: Added V4L2_TYPE_VBI_OUTPUT. Added V4L2_PIX_FMT_Y41P. 2000-09-18: Added V4L2_BUF_TYPE_VBI. 2000-08-19: Fixed URLs in readme files. 2000-07-31: Included linux/poll.h in videodev.h for compatibility with the original videodev.h. Suggested by Justin Schoeman. 2000-06-11: Fixed a bug in xcaptest-- it would only set the capture format to BGR32. 2000-02-17: Fixed a bunch of bugs in xcaptest-- none of the menus worked, non-streaming capture didn't work, etc. 2000-01-27: Rewritten xcaptest.c example program by Olivier Carmona. 2000-01-13: Added V4L2_FMT_FLAG_NOT_INTERLACED. 1999-12-23: Added v4l2_q_last(). Thanks to Olivier Carmona. Added 'offset' field to struct v4l2_vbi_format. (Michael Schimek) 1999-12-02: /proc/videodev file restored. Had accidentally killed it with wrong #ifdef. 1999-10-12: Set INTERLACED bit for v4l applications. Allows images bigger than 240 lines. Thanks to Justin Schoeman for this fix. 1999-09-20: Several updates, not backward compatible. All ioctls take a pointer argument. All set-format ioctls now use VIDIOC_S_FMT, ditto for set-format. VIDIOC_S_PARM and VIDIOC_S_OUTPARM are merged, ditto for G_*PARM. Control enumeration is simplified. Changed 'catname' to 'group'. Changed timestamps to stamp_t from struct timeval. 1999-09-05: Added V4L2_TUNER_SUB_LANG1. Fixed 'catname' bug. Fixes to video4linux compatibility layer mostly regarding tuner audio. (Thanks to Kyösti Mälkki for these patches.) 1999-08-30: Fixed typos in some V4L2_FMT_FLAG symbols. Changed struct v4l2_clip to be compatible with v4l. Added v4l VIDIOCSYNCTS ioctl declaration. (Thanks to Justin Schoeman for these patches.) 1999-06-05: Changed the value of V4L2_CID_WHITENESS. Map the v4l symbol VIDEO_PALETTE_YUV422 to V4L2_PIX_FMT_YUYV for compatibility with vic. Don't do a S_FMT on VIDIOCSPICT if the palette has not changed. 1999-05-20: Definition of VIDIOC_G_CTRL was wrong causing a malfunction of this ioctl. 1999-05-13: Fixed bugs in compatibility layer regarding 32- and 24-bit RGB capture. 1999-05-02: Fixed a typo in videodev.h, and added the V4L2_CTRL_FLAG_GRAYED flag. 1999-04-30: Don't increment the file usage counter on mmap() calls in kernels 2.2.3 and later. This is now (correctly) done by the kernel itself. This fixes the problem where you could only run some video programs once, the second time you would get a "device busy" or similar error. 1999-04-27: Fixed some warnings I accidentally introduced in 4-23, but didn't notice. 1999-04-23: Fixed bugs in VIDIOCSINPUT and VIDIOCSFREQ in the compatibility layer. 1999-04-07: Added the button control type. 1999-04-04: Added a few more control IDs. 1999-03-31: Better compatibility for v4l memory capture ioctls. Requires changes to drivers to fully support new compatibility features, see Driver Writer's Guide and v4l2cap.c. Added new control IDs: V4L2_CID_HFLIP, _VFLIP. Changed V4L2_PIX_FMT_YUV422P to _YUV422P, and _YUV411P to _YUV411P. 1999-03-24: Added VIDIOCGMBUF, VIDIOCMCAPTURE and VIDIOCSYNC support to the v4l compatibility layer. It's limited to a single memory-mapped buffer and the capture width and height must be the same as the window width and height when VIDIOCGMBUF was called. 1999-03-18: Fixed bugs in the v4l compatibility related to VIDIOCGPICT, VIDIOCSPICT and VIDIOCSAUD. Fill in the category and catname fields of v4l2_queryctrl objects before passing them to the driver. Required a minor change to the VIDIOC_QUERYCTRL handlers in the sample drivers. 1999-03-16: Added a v4l to V4L2 ioctl compatibility layer. Driver writers, this changes how you implement your ioctl handler. See the Driver Writer's Guide. Added some more control id codes. 1999-01-27: There is now one QBUF ioctl, VIDIOC_QWBUF and VIDIOC_QRBUF are gone. VIDIOC_QBUF takes a v4l2_buffer as a parameter. Added digital zoom (cropping) controls. 1999-01-19: Removed VIDIOC_NEXTBUF ioctl. 1998-12-07: Support kerneld automatic loading of V4L2 drivers by major-minor number. 1998-11-28: Changed a few ioctl symbols. Added stuff for codec and video output devices. 1998-11-14: Fixed another bug in v4l2cap.c that caused RGB24 & RGB32 streaming capture not to work. The fix is one variable change in mmap_vma_nopage(). V4L2_PIX_FMT_RGB24 changed to V4L2_PIX_FMT_BGR24. Same for RGB32. Audio UI controls moved to VIDIOC_S_CTRL system and assigned V4L2_CID_AUDIO_* symbols. Removed V4L2_MAJOR from videodev.h since it is only used at one place in videodev. Added YUV422 and YUV411 planar formats. 1998-11-12: Fixed a bug in v4l2cap.c that caused RGB24 & RGB32 streaming capture not to work, and caused read() capturing to be less efficient. The fix is a one-line addition to translate_make_rgb24_lut(). The VIDIOC_S_INPUT ioctl in v4l2cap.c always returned EINVAL, fixed. Some of the VIDIOC_* symbols were not constructed with the right macros, which could lead to errors on what should have been valid ioctl() calls. 1998-11-11: Those last two bugs are confirmed killed. The crashing bug required a minor change in mmap_vma_close() to fix. 1998-11-09: v4l2cap.c: Attempted fixes for changes to timeout handling in the 2.1.127 kernel, and a crashing bug related to unmapping and reallocating memory mapped buffers. (Both bugs found by Gerd Knorr) 1998-11-08: Updating for many minor changes to the V4L2 spec. Most symbols have been renamed. Some material changes to v4l2_capability. 1998-10-26: Fixed a bug that caused streaming capture from the v4l2cap sample capture driver to not work correctly when capturing RGB format data on kernels 2.1.109 and later. 1998-10-13: Started working on a simple control panel applet. 1998-10-12: Fixed problem with RGB-24 and RGB-32 output in v4l2cap.c 1998-10-09: Wrote v4l2cap sample capture driver. 1998-10-02: Removed id from video_standard, renamed color subcarrier fields. Renamed VIDIOC_QUERYSTD to VIDIOC_ENUMSTD and VIDIOC_G_INPUT to VIDIOC_ENUMINPUT. Added preliminary /proc/videodev file. First draft of CODEC driver API spec. 1998-09-28: Revamped video standard. Made video controls individually enumerable. 1998-09-25: Added spin locks to the queue functions, and to wnv.c. Fixed incompatibility with 2.1.118 f_ops structure. 1998-09-18: Deleted VIDIOC_NONCAP from the spec and use the O_TRUNC open() flag instead to indicate a non-capturing open. The VIDEO_STD_* are now ordinals rather than bits, and video_std_construct takes id and transmission as arguments. 1998-09-10: Finished new video standard stuff in videodev, and modified the Videum driver, xvideum for it, and updated the documentation. 1998-09-08: I am adding the new video standard handling contributed by Michael Schimek to videodev. 1998-09-07: Wrote the first draft of the Driver Writer's Guide. 1998-09-01: I have added the first functions to the V4L2 helper API in videodev. The helper functions include getting the device pointer associated with a file, memory mapping functions, and queue management functions. I have not tried the queue functions yet. Mark Podlipec (author of XAnim) has said he is interested in working on a standard video file format for Linux and V4L2. 1998-08-27: Added select() support. Had to modify the poll method call to add the file * parameter. 1998-08-25: Wrote videodev.c and videodev.h files to replace the v4l files. Ported the Videum driver to Video for Linux Two (V4L2). No features were added to the driver in the process. Michael Schimek is giving me some excellent suggestions for the spec. I think it will be much more professional as a result. 1998-08-20: Found out the original video4linux API will go into the next major release of Linux and is therefore going to be with us for a while. I will make a new replacement v4l out of my spec and try to 'sell' it to developers.