V4L Test Suite

From LinuxTVWiki

(Difference between revisions)
Jump to: navigation, search
(Test applications)
m (Test applications: minor edits)
 
(18 intermediate revisions not shown)
Line 1: Line 1:
-
Code to test other code.
+
This article outlines some V4L2 compliant software which can be used as a means to test the functionality of V4L2 device drivers or applications  -- essentially, code to test other code.  If you create a new test utility, or if you know of a test that is not listed, please add it to the lists below.
-
If you need a test, look here.   
+
==Test Drivers==
 +
* [[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 you create a new test, add it here.
+
: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.
-
If you know of a test that is not listed, please add it.
+
: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.
-
===Test Driver===
+
:But it is something anyone can run, so it makes reproducing some problems possible that would otherwise be impossible without the specific hardware.
-
[[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).
+
==Test applications==
 +
Simple programs that test various functionality of a V4L2 driver.
-
If your application has problems with a specific device driver, try using vivi insteadIf you still have a problem, it is much more likely to be a problem with the application than with the driverKnowing where to look is a big help in fixing problems.
+
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 [[Wikipedia:Type_I_and_type_II_errors|false positives]] when someone else uses them in a different environment or context.  For instance, a specific feature test should not be run unless the device driver advertises support for the featureIdeally, this means that all tests should first xioctl(fd, VIDIOC_QUERYCAP, &cap) and test  cap.capabilities to see if the rest of the test is applicableHowever, this does not mean you shouldn't post your test code if it does not comply with such ideal qualifications - as something is better than nothing.
-
However, vivi is not
+
* [http://git.linuxtv.org/v4l-utils.git/tree/HEAD:/contrib/test v4l-utils/contrib/test]
-
* 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.
+
* [http://linuxtv.org/hg/dvb-apps/file/887beb83943a/test dvb-apps/test/] -- though not V4L2 focused, there may be some applicable tests worth examining
-
===Test applications===
+
* [http://www.raphnet.net/programmation/v4l_tools/ v4l_tools]
-
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
+
* The utilities in the test/ directory of the zvbi tarball, available on [http://zapping.sourceforge.net/cgi-bin/view/ZVBI/Download#Source_Code zvbi's project page];
-
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://code.google.com/p/python-video4linux2/ python-video4linux2] - starting to build a tester using that.
-
http://www.video4linux.org/browser/v4l2-apps/test
+
* [http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html Video for Linux Two API Specification Appendix C. Video Capture Example] - not exactly a tester, but worth listing.
-
The utilities in the test/ directory of the zvbi tarball, available on [http://zapping.sourceforge.net/cgi-bin/view/ZVBI/Download#Source_Code zvbi's project page];
+
{{Note|One user encountered problems between the vivi.c driver and the V4L2 capture.c example, suggesting that they do not "play well" together.  See the [[Talk:V4L Test Suite|article's discussion page]] for more details}}
-
http://code.google.com/p/python-video4linux2/ - starting to build a tester using that.
+
* [http://svn.quickcamteam.net/svn/luvcview/trunk/luvcview/ luvcview ]
-
[[Text_capture#Testing]]
+
* [http://v4l-test.sourceforge.net/ v4l-test] - a V4L2 test environment based directly on the V4L2 API Specification
 +
 
 +
 
 +
[[Category:Development]] [[Category:Software]]

Latest revision as of 16:09, 8 October 2011

This article outlines some V4L2 compliant software which can be used as a means to test the functionality of V4L2 device drivers or applications -- essentially, code to test other code. If you create a new test utility, or if you know of a test that is not listed, please add it to the lists below.

Test Drivers

  • 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 V4L2 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 positives when someone else uses them in a different environment or context. For instance, a specific feature test should not be run unless the device driver advertises support for the feature. Ideally, this means that all tests should first xioctl(fd, VIDIOC_QUERYCAP, &cap) and test cap.capabilities to see if the rest of the test is applicable. However, this does not mean you shouldn't post your test code if it does not comply with such ideal qualifications - as something is better than nothing.

  • dvb-apps/test/ -- though not V4L2 focused, there may be some applicable tests worth examining
Note: One user encountered problems between the vivi.c driver and the V4L2 capture.c example, suggesting that they do not "play well" together. See the article's discussion page for more details
  • v4l-test - a V4L2 test environment based directly on the V4L2 API Specification
Personal tools