jv4linfo is a Java API that allows to query and control video4linux(two) devices
through the JNI. The data is organized in Java objects while trying to use the same
structure as the v4l/v4l2 API.
Currently it does not support capturing video, but it can be used to create a so-called
"panel" application, an application that controls a video device, such as selecting the
frequency of its tuner.
jv4linfo is under development and therefore incomplete and experimental. The existing
functionality should however work.
An example can be found
jv4linfo is licensed under the GNU General Public License.
If you have a suggestion or found a bug, please let me know.
Version 0.2.1 - 2009-09-01:
The project is now dual licensed under the LGPL besides the GPL.
Version 0.2.0 - 2004-10-15:
Implemented additional ioctl calls/structs of both v4l and v4l2.
For example, jv4linfo now allows to get and set the currently selected
video norm/standard of a video input of the device.
- Now throwing exceptions from JNI code instead of returning error codes
Version 0.1.0 - 2004-03-21:
- Added v4l2 support
- Improved Javadoc
Version 0.0.1 - 2004-03-14:
- Initial "release", very experimental :-)
Currently implemented features:
- Get capabilities
- Get available video inputs
- Get supported video standards (v4l2)
- Get available audio inputs (v4l)
- Set an audio input (volume, bass, treble, ...) (v4l)
- Get supported audio modes (v4l2)
- Get tuners
- Get/set controls (v4l2)
- Get/set currently selected video input, video norm/standard, frequency, audio mode
- Mute/unmute audio
How to build jv4linfo from the source JAR
Java SDK -
jv4linfo also compiles and runs with Kaffe (I tried with 1.1.4)
- Apache Ant
- GCC and kernel header files (/usr/include/linux)
Download the source JAR
- Unpack the JAR:
jar xvf jv4linfo-0.2.1-src.jar
- Change to the source dir:
Make sure that the path to the Java include files (property
build.xml is correct
- Simply run
ant without any arguments
- Check the output for errors
- If build was successful change to the lib dir:
Run a test:
java -jar jv4linfo.jar v4l2 /dev/video0
(Should print some info about the video device)