jv4linfo
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
here
jv4linfo is licensed under the GNU General Public License.
If you have a suggestion or found a bug, please let me know.
News
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 :-)
Features
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
Documentation
Javadoc
Example
How to build jv4linfo from the source JAR
Requirements:
-
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)
Build jv4linfo:
-
Download the source JAR
- Unpack the JAR:
jar xvf jv4linfo-0.2.1-src.jar
- Change to the source dir:
cd jv4linfo/src/
-
Make sure that the path to the Java include files (property
"java.include"
)
in build.xml
is correct
- Simply run
ant
without any arguments
- Check the output for errors
- If build was successful change to the lib dir:
cd ../lib
-
Run a test:
java -jar jv4linfo.jar v4l2 /dev/video0
(Should print some info about the video device)
Download
Binary:
jv4linfo-0.2.1.tar.gz
Source:
jv4linfo-0.2.1-src.jar