Page 1 of 1

Building JNI interface to VLC. Need guidance.

Posted: 30 May 2004 06:22
by CryHavoc
I am in the process of building a java API to VLC. I would like input on the best way to integrate into the system.

What I would like in the end is the ability to control the inputs and outputs via high level objects using JNI.

I have completed a test with a JNI interface to a dll version of vlc.exe. While this worked somewhat (memory leak after compiling with msvc) I don't really think this is really the right way to go about it.

Other options I am considering:

1) expanding the http interface and running as 2 separate processes.
2) understaning the gui interface and trying to expose functions via that method.
3) something else

I don't know what VLS would do for me. I haven't explored it because I was under the impression VLC is further ahead (I could be wrong).

My preference would be to treat VLC like a library (dll) and have it loaded from within a Java app. however, I will do it which ever way the experienced VLC developers feel it should be done.

Bottom line:

If a person wanted to create a control interface into VLC, what would the appropriate area be to begin looking into.

Evironment:

- Windows 2000
- 0.7.2 VLC-trunk compiled with Cygwin
- TV Capture/Timeshift plugin created by merging file access and dshow.
- Modified Crop plugin
- Modified directx vout plugin (to remove the window decorations)

On a different note: Any opinions on a development IDE that works with Cygwin and the deployed make files so I don't have to go through the make learning curve and modify them by hand?

Any development pointers at this point would be appreciated.

Posted: 30 May 2004 09:04
by Sigmund
VLC include a corba module, and iirc java has good bindings for corba connection. This corba module of vlc is currently undergoing change so it might be an idea to follow the development releases if you want to use it.

Otherwise you could try to wrap the libvlc interface in jni, but it might not be flexible enough for you. Also there are patches to extend libvlc in the ML-archives.

I once tried to wrap libvlc in JNI and the main problem I found (except JNI c-api being horrible) was that java have no concept easily mapped to a c union.