You wait for ages, and then two turn up at once … ;D
Finally got a few hours today to tidy up the GStreamer code I mentioned in Riven’s YUNPM thread. Unlike Cero’s earlier post, this has no Slick dependencies, and I’ve tidied up the way the preloader for native libs works, and added in a method to parse the video size before constructing the output window. As Cero had carefully tested this on lots of other systems, I hope I haven’t broken anything!
You may ask, why post / write an alternative to YUNPM? Well, mainly because 95% of this code already existed! I also believe that GStreamer is a better option because it works ‘in-process’, handles all issues of sync itself (and better IMO), gives far more control and input possibilities if needed, and the actual code required to make this work is minimal in comparison.
GstLwjgl ships with embedded GStreamer libs for Win32 and Win64, meaning no system install of GStreamer is required. It’s possible to do this for OSX too, but I need someone willing to test. It depends on the system libs on Linux, because I think this is the best approach, but embedding libs is also a possibility there.
The library pre-loading code is adapted from Processing, and it uses the native libs from their repo. Despite the license notice on their repo, these include some GPL plugins. It is possible to delete these plugins (as Cero has done) without recompiling anything, unlike the FFMPEG binary currently in YUNPM which is GPL and must be recompiled. I’m also going to look at getting it working with binaries from GStreamer.com which are all LGPL.
The lib is provided as a Zip file, with the same example movie as YUNPM for comparison. It responds to the same basic pause / resume / mute commands. It’s a bit higher on CPU usage at the moment, as I haven’t ported over any of the texture upload optimisations, and there are also some optimisations possible in the way the video buffers are handled. These can and will be improved over the next few weeks - I need them if nothing else!
For want of a better place to put this for now, it’s up on Google Drive - https://docs.google.com/open?id=0B_q5nI7hdd_3NHk0TVBBcHBmSW8