1f08c3bdfSopenharmony_ci 2f08c3bdfSopenharmony_ci v4l-test: Test environment for Video For Linux Two API 3f08c3bdfSopenharmony_ci 4f08c3bdfSopenharmony_ciRelease History 5f08c3bdfSopenharmony_ci--------------- 6f08c3bdfSopenharmony_ci23 Jul 2009 0.17 Test cases added for VIDIOC_ENUM_FRAMESIZES and 7f08c3bdfSopenharmony_ci VIDIOC_G_JPEGCOMP. New V4L2_PIX_FMT_* formats also 8f08c3bdfSopenharmony_ci used in test cases. 9f08c3bdfSopenharmony_ci 6 Jul 2009 0.16 Iterate through all available inputs in VIDIOC_G_STD and 10f08c3bdfSopenharmony_ci VIDIOC_S_STD test cases 11f08c3bdfSopenharmony_ci25 May 2009 0.15 Test cases added for VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS 12f08c3bdfSopenharmony_ci and VIDIOC_TRY_EXT_CTRLS 13f08c3bdfSopenharmony_ci 7 May 2009 0.14 Test cases added for VIDIOC_QUERYBUF; 14f08c3bdfSopenharmony_ci Debug functions separated 15f08c3bdfSopenharmony_ci29 Apr 2009 0.13 Added string content validation; 16f08c3bdfSopenharmony_ci Test cases added for VIDIOC_REQBUFS 17f08c3bdfSopenharmony_ci19 Apr 2009 0.12 Test cases added for VIDIOC_S_FMT; 18f08c3bdfSopenharmony_ci NULL parameter test suite split to read only, write only 19f08c3bdfSopenharmony_ci and write/read ioctl suite; 20f08c3bdfSopenharmony_ci More verbose debug output in VIDIOC_S_FREQUENCY and in some 21f08c3bdfSopenharmony_ci other test cases; 22f08c3bdfSopenharmony_ci More strict check added for strings in different test cases 23f08c3bdfSopenharmony_ci 9 Apr 2009 0.11 Test cases added for VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT, 24f08c3bdfSopenharmony_ci VIDIOC_G_FMT, VIDIOC_G_SLICED_VBI_CAP, VIDIOC_QUERYMENU; 25f08c3bdfSopenharmony_ci Cleaned up ret and errno variable names; 26f08c3bdfSopenharmony_ci Separated the NULL parameter test cases to a spearated testsuite 27f08c3bdfSopenharmony_ci and reworked most of the NULL parameter test cases; 28f08c3bdfSopenharmony_ci Added camera enabling through /sys/devices/platform/eeepc/camera; 29f08c3bdfSopenharmony_ci Added results page to documentation; 30f08c3bdfSopenharmony_ci Follow kernel API changes in video_dummy.ko 31f08c3bdfSopenharmony_ci18 Mar 2009 0.10 Test cases added for VIDIOC_G_PARM; 32f08c3bdfSopenharmony_ci Duplicated test for V4L2_BUF_TYPE_VIDEO_CAPTURE removed in 33f08c3bdfSopenharmony_ci VIDIOC_ENUM_FMT test 34f08c3bdfSopenharmony_ci14 Mar 2009 0.9 Test cases added for VIDIOC_S_CROP; 35f08c3bdfSopenharmony_ci Test steps added for VIDIOC_S_CTRL 36f08c3bdfSopenharmony_ci22 Feb 2009 0.8 Test cases added for VIDIOC_G_CROP, VIDIOC_G_CTRL and VIDIOC_S_CTRL 37f08c3bdfSopenharmony_ci 9 Feb 2009 0.7 Test cases added for VIDIOC_G_AUDIO, VIDIOC_G_AUDOUT, 38f08c3bdfSopenharmony_ci VIDIOC_S_AUDIO and VIDIOC_G_CROP; 39f08c3bdfSopenharmony_ci Added video_dummy kernel driver to verify the test 40f08c3bdfSopenharmony_ci environment; 41f08c3bdfSopenharmony_ci Some cleanup 42f08c3bdfSopenharmony_ci 4 Feb 2009 0.6 Test cases added for VIDIOC_G_AUDIO, VIDIOC_G_AUDOUT, 43f08c3bdfSopenharmony_ci VIDIOC_G_MODULATOR, VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY 44f08c3bdfSopenharmony_ci and VIDIOC_S_FREQUENCY 45f08c3bdfSopenharmony_ci31 Jan 2009 0.5 Test cases added for VIDIOC_QUERYSTD, VIDIOC_G_FREQUENCY 46f08c3bdfSopenharmony_ci and VIDIOC_G_TUNER 47f08c3bdfSopenharmony_ci24 Jan 2009 0.4 Test cases for MAX_EM28XX_INPUT, MAX_EM28XX_TVNORMS removed; 48f08c3bdfSopenharmony_ci some typos fixed 49f08c3bdfSopenharmony_ci 4 Jan 2008 0.3 Test cases for VIDIOC_ENUMOUTPUT, VIDIOC_ENUMAUDOUT, 50f08c3bdfSopenharmony_ci VIDIOC_QUERYCTRL added; 51f08c3bdfSopenharmony_ci New test cases for VIDIOC_ENUMAUDIO, VIDIOC_ENUM_FMT, 52f08c3bdfSopenharmony_ci VIDIOC_ENUM_STD 53f08c3bdfSopenharmony_ci22 Dec 2008 0.2 Test cases with NULL parameter added; 54f08c3bdfSopenharmony_ci Test cases for VIDIOC_CROPCAP added 55f08c3bdfSopenharmony_ci18 Dec 2008 0.1 First release 56f08c3bdfSopenharmony_ci 57f08c3bdfSopenharmony_ciWritten by M�rton N�meth <nm127@freemail.hu> 58f08c3bdfSopenharmony_ciReleased under GPL 59f08c3bdfSopenharmony_ci 60f08c3bdfSopenharmony_ciWhat is this? 61f08c3bdfSopenharmony_ci------------- 62f08c3bdfSopenharmony_civ4l-test is a test environment for V4L2 drivers. The V4L2 drivers 63f08c3bdfSopenharmony_ciare running under Linux in kernel space. This test environment is running 64f08c3bdfSopenharmony_ciin userspace and tries what normal video application would do. It also 65f08c3bdfSopenharmony_citries some things which are supposed to test the error handling mechanisms 66f08c3bdfSopenharmony_ciof a V4L2 driver. These are the "invalid test cases". 67f08c3bdfSopenharmony_ci 68f08c3bdfSopenharmony_ciThe V4L2 API only covers webcams and analog tuner cards, the digital broadcast 69f08c3bdfSopenharmony_ciis out of the scope of V4L2 API so it is also out of the scope of this test 70f08c3bdfSopenharmony_cienvironment. See Linux DVB API at http://linuxtv.org/docs/dvbapi/dvbapi.html 71f08c3bdfSopenharmony_cifor digital broadcast and Chapter 6.3 "Relation of V4L2 to other Linux multimedia APIs" 72f08c3bdfSopenharmony_ciin V4L2 specification. 73f08c3bdfSopenharmony_ci 74f08c3bdfSopenharmony_ciHow to build? 75f08c3bdfSopenharmony_ci------------- 76f08c3bdfSopenharmony_ciTo build the test environment you will need a C compiler, "make" and the 77f08c3bdfSopenharmony_ciCUnit development files installed. Just type "make" and the test environment 78f08c3bdfSopenharmony_ciis ready. 79f08c3bdfSopenharmony_ci 80f08c3bdfSopenharmony_ciHow to run? 81f08c3bdfSopenharmony_ci----------- 82f08c3bdfSopenharmony_ciYou need to have a video device (i.e. webcam, tuner card, etc.) connected 83f08c3bdfSopenharmony_cito your system and available under /dev/video0. If you don't have any 84f08c3bdfSopenharmony_cihardware device available, you can still test the "Virtual Video Driver". 85f08c3bdfSopenharmony_ciTo compile this you need to compile your kernel with CONFIG_VIDEO_VIVI=m 86f08c3bdfSopenharmony_ciunder: 87f08c3bdfSopenharmony_ci 88f08c3bdfSopenharmony_ci -> Device Drivers 89f08c3bdfSopenharmony_ci -> Multimedia devices 90f08c3bdfSopenharmony_ci -> Video For Linux 91f08c3bdfSopenharmony_ci -> Video capture adapters 92f08c3bdfSopenharmony_ci -> Virtual Video Driver 93f08c3bdfSopenharmony_ci 94f08c3bdfSopenharmony_ciAt this point you can execute v4l-test. 95f08c3bdfSopenharmony_ci 96f08c3bdfSopenharmony_ciVideo for Linux Two Specification 97f08c3bdfSopenharmony_ci--------------------------------- 98f08c3bdfSopenharmony_ciThe V4L2 API specification can be found at http://v4l2spec.bytesex.org/spec/ . 99f08c3bdfSopenharmony_ciRevision 0.42 of V4L2 is the base for this test environment. 100f08c3bdfSopenharmony_ci 101f08c3bdfSopenharmony_ciCode Coverage 102f08c3bdfSopenharmony_ci------------- 103f08c3bdfSopenharmony_ciThe code coverage shows which lines of the code were executed and how many 104f08c3bdfSopenharmony_citimes. The measurement results gives you a feedback about the quality of 105f08c3bdfSopenharmony_cithe test cases. 106f08c3bdfSopenharmony_ciYou can measure the code coverage of a kernel module with the gocv and lcov 107f08c3bdfSopenharmony_cisoftwares. See http://ltp.sourceforge.net/coverage/gcov.php and 108f08c3bdfSopenharmony_cihttp://ltp.sourceforge.net/coverage/lcov.php for details. 109f08c3bdfSopenharmony_ci 110f08c3bdfSopenharmony_ciCurrent status 111f08c3bdfSopenharmony_ci-------------- 112f08c3bdfSopenharmony_ciCurrently all test are running and evaluated automatically. This might 113f08c3bdfSopenharmony_cichange in future if we want to test for example plugging and unplugging 114f08c3bdfSopenharmony_cia USB video device or ask the user if a received picture make sense or not. 115f08c3bdfSopenharmony_ci 116f08c3bdfSopenharmony_ciSee doc/index.html about how much of the specification is covered by the 117f08c3bdfSopenharmony_cidifferent test cases. 118f08c3bdfSopenharmony_ci 119f08c3bdfSopenharmony_ciSee also 120f08c3bdfSopenharmony_ci-------- 121f08c3bdfSopenharmony_ciSee also doc/index.html for further references and recommended readings. 122f08c3bdfSopenharmony_ci 123f08c3bdfSopenharmony_ciFeedbacks 124f08c3bdfSopenharmony_ci--------- 125f08c3bdfSopenharmony_ciAny feedbacks, comments, ideas, etc. are welcome at the author's 126f08c3bdfSopenharmony_ciemail address: M�rton N�meth <nm127@freemail.hu>. 127