Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Videos with JMF & JNI

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am coming back on the topic the second time.

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
 
Sheriff
Posts: 22684
128
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sasha Mckinsey
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I don't use JNI and stick to what Java offers (to maintain WORA) then will then videos / Video Conf work equally well or I will face issues such as
  • 1
  • Video lag / delay
  • 2
  • Frame Freeze

    Would you have any idea ?
     
    Bartender
    Posts: 1210
    25
    Android Python PHP C++ Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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:
    Garden Master Course kickstarter
    https://coderanch.com/t/754577/Garden-Master-kickstarter
    reply
      Bookmark Topic Watch Topic
    • New Topic