V4L Test Suite

From LinuxTVWiki
Revision as of 15:06, 31 October 2008 by CarlFK (Talk)

Jump to: navigation, search

Code to test other code.

If you need a test, look here.

If you create a new test, add it here.

If you know of a test that is not listed, please add it.

Test Driver

VIVI - Virtual Video Driver

A real v4l2 device driver with no physical hardware. This means anyone can use it (it is part of the Linux kernel: modprobe vivi).

If your application has problems with a specific device driver, try using vivi instead. If you still have a problem, it is much more likely to be a problem with the application than with the driver. Knowing where to look is a big help in fixing problems.

However, vivi is not

  • perfect. Not surprising given it doesn't get the amount of real world use that real drivers do.
  • feature complete. It does not implement every interface of the v4l2 spec.

But it is something anyone can run, so it makes reproducing some problems possible that would otherwise be impossible without the specific hardware.

Test applications

Simple programs that test various functionality of a driver.

There are many small test apps that seem to have been written to help isolate an existing problem, as opposed to actively looking for problems. This means the tests make assumptions about what is/isn't supported, which can cause false problems when someone else uses them in a different environment. For instance, a test should not be run unless the driver advertises suppport for it. This means all tests should first xioctl(fd, VIDIOC_QUERYCAP, &cap) and test cap.capabilities to see if the rest of the test is applicable. (note I said 'should' - This does not mean you shouldn't post your test code it it does not comply - something is better than nothing.)

http://linuxtv.org/cgi-bin/viewcvs.cgi/dvb-apps/test/

http://www.video4linux.org/browser/v4l2-apps/test

The utilities in the test/ directory of the zvbi tarball, available on zvbi's project page;

http://code.google.com/p/python-video4linux2/ - starting to build a tester using that.

http://v4l2spec.bytesex.org/spec/a16706.htm Appendix B. Video Capture Example - not exactly a tester, but worth listing.

Text_capture#Testing