I did some research on making a skype like video conferencing tool in Java - a project for my own learning experience.
I came to know that I will have to use JMF (Java media Framework+ third party plugins) and also JNI (Java Native Interface) to a great deal - especially for all the heavy lifting work to be done at the lower level (for optimization and quick real time video processing)
My question is wouldn't using JNI and some third party plugins with JMF beat the real essence of Java that is WORA (Write Once Run Anywhere) and the code will be tied to a particular operating system or to a particular processor set.
Is there a way around this problem ? Please advice
As soon as JNI comes into play, you loose WORA unless you can write JNI implementations for each and every OS. The next best thing is writing implementations for only those OSes you want to support. It won't be WORA, but it's the closest you're going to get.
Of course that does mean that you can't use anything that's not available on all of those OSes.
WORA for your own code is very much possible as long as you use frameworks which are available on most OSes and do all the OS specific stuff for you.
Sasha Mckinsey wrote: I will have to use JMF....
Is JMF updated regularly? I had the impression it's kind of outdated (but perhaps I'm wrong).
Anyway, you don't have to use it, because there are alternate frameworks available.
For camera capture and streaming in java applications, I prefer JavaCV which is a java wrapper around OpenCV and is available prebuilt for all popular OSes.
OpenCV is maintained and enhanced regularly, and does all the OS specific stuff to capture and compress images.
For streaming over network, I'd do it over UDP since it doesn't have the overhead of acknowledging packets or resending unacknowledged ones.
Lost packet(s) in a live video stream are not a big problem. UDP is kind of standard in live streaming.
Not sure how I'd capture the audio (never tried it), but if you manage that, JavaCV does support combining audio streams with the image stream.
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead: