Simple libdc1394 to JNI Library Code
Status: Alpha
Brought to you by:
elkmonster
File | Date | Author | Commit |
---|---|---|---|
src | 2009-04-11 | elkmonster | [r13] |
.project | 2009-03-16 | Elkmonster | [r1] |
BUILD | 2009-04-11 | elkmonster | [r13] |
COPYING | 2009-04-11 | elkmonster | [r13] |
Makefile | 2009-04-11 | elkmonster | [r13] |
README | 2009-04-11 | elkmonster | [r13] |
build.xml | 2009-04-10 | ElkMonster | [r11] |
simpledc1394jni =============== Version 0.1 alpha 11 April 2009 Copyright 2008 Sascha Liebsch <elkmonster@users.sourceforge.net> 1. About simpledc1394jni This library provides access to DC1394-compliant cameras from the Java language. It uses JNI (Java Native Interface) to speak to the native part of the library, which in turn uses libdc1394 (libdc1394.sf.net) to access the camera. simpledc1394jni intends to provide access to a very limited spectrum of the abilities of libdc1394. 2. Motivation The reason to start this project was that I could not get jlibdc1394 (jlibdc1394.sf.net) to run. Also, it seemed overly complicated to set up, the documentation did not help a lot, and last but not least, it is for version 1 of libdc1394. However, simpledc1394jni does not strive to be an update or replacement for jlibdc1394, but rather a simple alternative for those who do not demand much. 3. Compilation / Installation Please refer to the instructions given in BUILD. 4. Running it After compilation, you can run an example application that simply shows the camera image. The BUILD file describes how to do that (under 3. Testing). 5. Supported Cameras / Modes simpledc1394jni should basically work with every camera that libdc1394 supports. However, the current implementation is limited to correctly read monochrome images, i.e., greyscale images. Using a video mode other than monochrome will result in an distorted image (because the image data is still handled as monochrome, hence the interpretation of bytes is not correct). The reasons for this limitation is that this project was originally started with the very aim to be able to capture greyscale images. If somebody wishes to add support for additional modes, please do so and get in contact. 6. Troubleshooting If the test application fails, make sure you have read and write access to the video device file on your system. Usually, it should be something like /dev/videoN or /dev/v4l/videoN, where N is a number. Be sure to follow symlinks, as sufficient access rights to a symlink does not automatically mean that you have the same rights for the links target file. In general, it is also advisable to check whether Coriander (coriander.sf.net) is able to access the camera. If it is, then so should be simpledc1394jni. Remember that currently, simpledc1394jni will only deliver correct results in monochrome video modes. If a program that uses simpledc1394jni has crashed or is killed and fails when trying to restart it, then try to disconnect the camera from the computer shortly to free blocked resources. It is a common problem when libdc1394 is not shut down correctly. 7. The Code The code is currently in a questionable state. As my C(++) skills have gotten a little rusty, and as the aim was to get it running in the first place, the source files are rather untidy and contain debatable workarounds and improvisations. This mess will be resolved eventually. This is also true for many of the messages written to the shell. 8. The Library's Name The name was just born out of necessity to find one. I am well aware that it is neither creative nor sounds good at all, but I just couldn't think of anything better. If you have got an idea, tell me and I'll consider it. 9. Contact Please use the SourceForge mailing lists or forums to get in contact, or the SourceForge email address given at the top.