Difference between revisions of "VIVI"

From LinuxTVWiki
Jump to: navigation, search
m (update source location; minor edits)
(insert screencap image of VIVI in action)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
VIVI is a [[Development: Video4Linux APIs|V4L2]] based '''vi'''rtual '''vi'''deo driver module (i.e. it acts as a device driver without any physical hardware device actually being present in the system).
+
[[image:vivi_run_by_motv.jpg‎ |thumb|[[motv]] displaying the VIVI driver's generated dynamic test pattern]]
 +
 
 +
VIVI is a [[Development: Video4Linux APIs|V4L2]] based '''vi'''rtual '''vi'''deo kernel module.
 +
 
 +
It acts as a device driver to a virtual video input device which it creates (i.e. it emulates a real video device using the V4L2 API, without there actually being any physical hardware device present within the system). The driver generates a dynamic vertical colour bar test pattern, overlaid with a timestamp and basic video property information, and which is available for viewing through V4L2 software applications.  Within the viewing app, changing the source input option for the virtual device will result in slightly different colour bar test patterns.
 +
 
 +
 
 +
'''Purpose:'''<br>
 +
VIVI is useful:
 +
* for [[V4L_Test_Suite|testing apps with V4L2]]
 +
* as a base “example of how V4L2 drivers should be written. vivi only uses the vmalloc() API, but it's good enough to get started with” ([https://www.kernel.org/doc/Documentation/video4linux/videobuf videobuf kernel documentation]) ... note: you would want to use the videobuf2 framework, as it  greatly simplifies the work of writing a v4l2 driver [http://www.mail-archive.com/linux-media@vger.kernel.org/msg60814.html]
 +
 
 +
 
 +
'''Some Technical Details:'''<br>
 +
The vivi driver produces a CPU load because of its generation of a video image; something which is not of an issue in the case of real V4L2 drivers (i.e. device drivers for real physical hardware that accept an external video input signal). 
 +
 
 +
In late 2012, vivi was substantially improved in regards to the image generation (note: this work gained inclusion into the 3.9 kernel) and, consequently, CPU loading should now be reduced by quite a bit.  For more info, in particular to ideally making a driver's buffers available to userspace through mmap() as opposed to via doing a memcpy (which will produce a high CPU load), see this discussion thread: http://www.mail-archive.com/linux-media@vger.kernel.org/msg60684.html
 +
 
 +
 
 +
'''Usage:'''<br>
 +
First insert the driver
 +
sudo modprobe vivi
 +
Thereafter, open V4L2 viewing apps as usual.
 +
 
  
 
==Also See==
 
==Also See==
* [http://git.linuxtv.org/media_tree.git/blob/HEAD:/drivers/media/video/vivi.c VIVI source code]
+
* [http://git.linuxtv.org/media_tree.git/blob/HEAD:/drivers/media/platform/vivi.c VIVI source code]
 +
* Video Loopback (some loopback drivers provide somewhat similar functionality)
  
 
==External Links==
 
==External Links==
* [http://v4l.videotechnology.com/vivi.html old VIVI page] -- gives a little bit more detail, but not much
+
* A couple of older sources that provide some background information regarding VIVI:
 +
** [http://lwn.net/Articles/203971/ LWN article about the VIVI driver]
 +
** [http://v4l.videotechnology.com/vivi.html old Video Technology webpage for the VIVI driver]  
  
 +
[[Category:Drivers]]
 
[[Category:Software]]
 
[[Category:Software]]

Latest revision as of 21:04, 21 September 2013

motv displaying the VIVI driver's generated dynamic test pattern

VIVI is a V4L2 based virtual video kernel module.

It acts as a device driver to a virtual video input device which it creates (i.e. it emulates a real video device using the V4L2 API, without there actually being any physical hardware device present within the system). The driver generates a dynamic vertical colour bar test pattern, overlaid with a timestamp and basic video property information, and which is available for viewing through V4L2 software applications. Within the viewing app, changing the source input option for the virtual device will result in slightly different colour bar test patterns.


Purpose:
VIVI is useful:

  • for testing apps with V4L2
  • as a base “example of how V4L2 drivers should be written. vivi only uses the vmalloc() API, but it's good enough to get started with” (videobuf kernel documentation) ... note: you would want to use the videobuf2 framework, as it greatly simplifies the work of writing a v4l2 driver [1]


Some Technical Details:
The vivi driver produces a CPU load because of its generation of a video image; something which is not of an issue in the case of real V4L2 drivers (i.e. device drivers for real physical hardware that accept an external video input signal).

In late 2012, vivi was substantially improved in regards to the image generation (note: this work gained inclusion into the 3.9 kernel) and, consequently, CPU loading should now be reduced by quite a bit. For more info, in particular to ideally making a driver's buffers available to userspace through mmap() as opposed to via doing a memcpy (which will produce a high CPU load), see this discussion thread: http://www.mail-archive.com/linux-media@vger.kernel.org/msg60684.html


Usage:
First insert the driver

sudo modprobe vivi

Thereafter, open V4L2 viewing apps as usual.


Also See

  • VIVI source code
  • Video Loopback (some loopback drivers provide somewhat similar functionality)

External Links