I was looking for Java based video player, no, I don´t need it. Just to see if, and how many Java video players are there. To my big surprise, I found none. At least none any popular one, such as VLC,WMP and so. I thought there are some Java alternatives for those players.
Obviously I found instead many statements that Java is too slow for players. And from what I read it could be separated into 2 sub-problems:
First, poeple writing about Java beeing too slow for video decoding. But since I started with Java, I always thought its speed is actually pretty good. I found many benchmarks when warmed JVM did almost as well as C++ written program. Like really well. I thought it was becaouse those benchmarks algorhytms were small, and repetetive, so JVM prepared those code compiled and from there it was fast. Maybe in bigger program, it would be actually much slower becouse of dynamic compilation. I don´t really know. But since Java is compiled into native code by JVM, all it really matters with speed is how much code and how fast it precompiles, right? Of course there are other differences, but the biggest one would be the actuall compilation.
And second, people writing that they have video decoder written in C++ and getting pictures data thru JNI. But they say Java is too slow to even paint those 30 FPS even HD Ready images. But why? I always thought that JVM uses the fastest method available to get its window in OS, and than manipulating its content internally. And if I pressume Java is fast enough (meaning C++ like) when JVM is "warmed", where is the problem with displaying images? all JVM has to do in that case is to write array to OS specific display output, right?
So, is Java really slow, or am I missing something? Would it be posssible to have full speed (or almost full speed) video player written in pure Java? And if not, why? Thanks.