Hello JNI Cracks
I'm writing a Java Movie Player based on Xuggler. Now my problem is
that especially HD Content (1920x1080 or something) cannot be played
at all because painting the BufferedImage to the screen is much to
slow. If the content should fit into some component scaling is
impossible even on hardcore machines. At least not if you want more
than 0 fps :)
When i look at the Quicktime for Java component everything is so much
smoother and faster without using much CPU. My guess is that they
somehow paint directly on the screen using AWT JNI stuff.
http://en.wikipedia.org/wiki/Java_AWT_Native_Interface
For scaling i'm thinking of OpenGL which might be very fast used
directly from the C code. Also OpenGL is available on every platform
as far as i know. If using OpenGL directly cannot be done easily maybe
JOGL can somehow help.
My problem is that i really don't know much about JNI and AWT so i
have no idea if this would make any sense.
Please let me know if that way has truly the potential to play FullHD
stuff.
Is it correct that currently every BufferedImage i get is independent
and causes a lot of garbage collection during playback?
Maybe it would be simple enough to just "update" that bufferedImage in
some smart way?
Also i noticed playing without sound seems to cause a little
performance boost. Maybe sound could be played through C
stuff in a better way? No idea how difficult that would be.