So I had a bit of a rethink about how jjmpeg does things and in short rewrote it from scratch over the last couple of days/nights:
- OBAWO (one big-arse-write-once) Perl script generates bindings for field accessors as well as many methods based on a configuration file.
- Use dlopen() to bind to libavformat, libavcodec, libswscale at run-time, in order to avoid linking to an impossibly specific version of libavcodec at compile-time.
- Write accessors in C. This will necessarily be a bit slower, but it avoids having to have different Java classes for each case. It also means only the 'c' files need to be recompiled for a different platform.
- The C member functions do their own 'this' lookups, thus allowing them to be called directly as public interfaces (although right now they're not for various reasons).
I've now enough of the libraries bound to allow creating of video files:
It scrolls! (not shown)
So with this and with a bit of Java2D it's pretty easy to start compositing and generating simple video sequences, if one should so desire.
I'm pretty sure I have the lifecycle and memory management sorted, although there may still be bugs there. The AVFrame to AVPlane interface is a bit crappy though.