Re: [Mlt-devel] More experiments with Java bindings - toying with frames
Brought to you by:
ddennedy,
lilo_booter
From: Stepan R. <st...@sr...> - 2004-08-09 11:54:09
|
On Mon, 9 Aug 2004, Charles Yates wrote: > I think the carray stuff should be for an unsigned array of ints, no? I access it byte by byte (unsigned char maps to Java's byte). Unsigned int would result in retrieving 4 bytes at once which can complicate RGB24 reading. On the contrary it would allow to drop byte2int() hack. >> I also fixed a bug in bindings (mlt.i): in MltProducer there was a partial >> swap of id and arg arguments: >> >> if ( arg != NULL ) >> ptr->producer = mlt_factory_producer( id, arg ); >> else >> ptr->producer = mlt_factory_producer( "fezzik", id ); > > Ugly, yes, but very much intentional. > > The hack also provides consistency over all the languages supported (I > didn't investigate the acceptability of NULL elsewhere since even if it > were supported, ruby would fail). It is inconsistent in Java, because SWIG ignores default argument values (maybe there is an option to create overloaded methods for such cases, I don't know). Calls then look like: new MltProducer("file", NULL); new MltProducer("producer", "file"); That's ugly as hell and confuses the user a lot :-) >> [could it be possible to have bindings in CVS?] > > Sure - I'll checkin an mlt-bindings to the mlt repository. Do you object > if I include at least one of your java examples? No problem as long as you drop the cz.srnet.lake package name from it. Have a nice day. Stepan Roh |