We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to get a raspberry pi to send a video clip to a teensyduino using the octo2811 movie2serial pde. I've got hard-float java 7 installed and processing 2.1 running on raspbian by following this guide. I've got an UDP variation of movie2serial working so I'm pretty sure the problem is with gstreamer. Whenever I try to play a video using the processing.video library loop example I get "A library used by this sketch is not installed properly, a library relies on native code that's not available". I can play video fine using the pogg library and omxplayer. gst-launch-1.0 playbin uri=file:///home/pi/sketchbook/sample_mpeg4.mp4 also works fine.
Has anyone managed to get processing working with video on the raspberry Pi?
Answers
The gstreamer-java bindings used by Processing only support gstreamer 0.10, not 1.0 yet
I removed gstreamer* and installed all the gstreamer 0.10 listed here. I also rolled java back to v6. Still getting the same error. Is there a way to see what file it needs?
I think the problem is with JNA (the actual layer between Java and the native gstreamer libraries), some people are discussing what I believe is the same issue in the gstreamer-java forum.
I used the processing debug mode and got a readout of errors, Looks like it is the JNA part. "Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: jnidispatch (/com/sun/jna/linux-arm/libjnidispatch.so) not found in resource path" I tried apt-get install libjna-java-doc to reinstall JNA. "find / -iname 'jnidispatch*'" can't find it anywhere. Few other links to people with the same problem. http://forum.processing.org/one/topic/processing-on-raspberry-pi.html http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=57687 http://www.raspberrypi.org/phpBB3/viewtopic.php?f=27&t=7820 http://stackoverflow.com/questions/14635999/jna-native-support-com-sun-jna-linux-arm-libjnidispatch-so-not-found-in-resou/16267321#16267321 https://groups.google.com/forum/#!msg/jna-users/sLkXrE5Nc68/R-6J0XVd6WMJ
Thanks for the help codeanticode, I'll keep working on it.
Below is a guide for updating JNA to 4.0 which contains the linux-arm/libjnidispatch.so folder http://www.filebot.net/forums/viewtopic.php?f=3&t=1086 I installed JNA with sudo apt-get install libjna-java and downloaded the jar files I found all JNA folders with find / -iname 'jna' I updated all jna.jar's with symbolic links to the new version. I think you just need to update the jna.jar at processing-2.1/modes/java/libraries/video/library and not the jna.jar's in the machines java. Also installed oracle-7-java as it's meant to run better with processing
I'm now getting a different error....sigh. "Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: Can't obtain static newInstance method for class com.sun.jna.Structure"
Not to sure what to do next......
One possible problem is that gstreamer-java hard-codes the name strings for the low-level gstreamer and glib libs, see for instance:
https://code.google.com/p/gstreamer-java/source/browse/trunk/gstreamer-java/src/org/gstreamer/lowlevel/GlibAPI.java
Maybe the names are slightly different on the rpi, even though the version is still 0.10?