Hi. Thanks for the information, it sounds interesting.
Couple of questions if I may: 1) How much your JNI implementation is faster then JNA? AFAIK JNA creates the binding on runtime, but then it's cached, meaning only the first function calls would be slower. 2) Do you test all the major functions for memleaks in your suite? 3) What about multi-threading, is it stable and tested? 4) How stable the beta is expected to be? Regards. 2009/1/11 Art Clarke <[email protected]> > On Sun, Jan 11, 2009 at 7:18 AM, fahrenheit <[email protected]> wrote: > > Hi. > > > > I don't know if the xuggle project is using a JNA/JNI to hook up with > > ffmpeg aproach as well, but if they are there are some issues they will > > eventualy fall into. If they aren't this might be interesting to see. > > > Here's the answers to Farhenheit's questions he sent me separately; > they might be useful for other folks. And yes FMJ-Java also does > similar stuff, in a slightly different way: > > Hi Miguel, > > First off, you may want to join the xuggler-users group below; we'll > be releasing the xuggler "beta" to that list next week: > http://groups.google.com/group/xuggler-users > > But to answer your questions, see inline. > > > I saw your message on libav-users about xungle, and as i am currently > > developing a tool to get audio/video information out of media files using > > ffmpeg, using ffmpeg-java and having some issues with memory, as in, > missing > > strings after a couple of sequential runs, i was wondering what method > are > > you using to tap into ffmpeg, are you using a JNA/JNI aproach as > ffmpeg-java > > or some other method? > We use a JNI approach that is automatically generated using SWIG from > a C++ simpler API we've wrapped around FFMPEG, with a robust test > suite that checks for memory leaks and corruptions. We did that > because JNI is slightly faster than JNA. > > In addition, we support Java memory management semantics, so you don't > have to worry about freeing things like Packets (or IPackets in our > API) and AVFrames (or IVideoPictures in our API) when done (the Java > garbage collector will clean up once you've stopped referencing a > packet or frame). Plus we go to some trouble to make sure that memory > doesn't get "rewritten" out from under you, which can happen with > FFMPEG if you're not careful. > > > Is it different from an ffmpeg style coded program to use your libraries, > as > > in, av_codec_open(codecContext.codec) vs some other method? > You do use different methods. For example, to open a {de|en}Coder in > Xuggler you do: > > IStreamCoder coder = stream.getStreamCoder(); > coder.setCodec(ICodec.Id.CODEC_ID_AAC); > coder.open(); > > The API is designed to be "java-like". The downside is that some > functionality of FFMPEG is not yet exposed (for example, more advanced > codec-specific configurations), but if you need those exposed let us > know why and we'll consider adding it. > > The documentation for our API is already available. Check out: > > http://build.xuggle.com/job/xuggle_java_xuggler_jdk5_i386_ubuntu/javadoc/java/api/index.html > The main package is com.xuggle.xuggler > > We'll be adding tutorials between now and February 24th, but check out > the com.xuggle.xuggler.demos package for some simple programs that > show how to use the API. > > > Are you using a pre-defined release of ffmpeg or can the program use any > > major>minor release of ffmpeg, i'm assuming major versions need a rewrite > to > > match ffmpeg structures, for minor i don't know what is your method. > > We continually integrate FFMPEG into our build (see > http://build.xuggle.com/) and our source tree, and run our test suite > on every FFMPEG/Xuggler checkin. If you check out our tip of tree, > you'll always get the latest FFMPEG but official releases will pair to > a specific release. Minor upgrades to FFMPEG will work just fine. > Major upgrades (where FFMPEG changes a major version number) will > probably just require a recompile of Xuggler, but may require more if > major new features are added to FFMPEG. > > > > > Thanks in advance for your time and good look with your debut. > > > No problem. Let me know if you have any more questions, or better yet > post them on the xuggler-users group so everyone can learn from the > responses. > > Thanks, > > - Art > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
