libming/libming — pull request #7 by kyprizel (2012-04-12 11:23:49+00:00)
Title: Movie output functions modified

Sometimes user need to get an SWF as a buffer of bytes.

Using existing SWFMovie_output is extremely ineffective,
b/c it runs output callback N=size of buffer times,
also SWFOutput is not declared it library headers,
so we can't use this method in extensions for scripting languages.

I added function SWFMovie_output_as_buffer:
int SWFMovie_output_as_bytes(SWFMovie movie, byte *buffer);
if run w/o buffer - returns size of required buffer, but not actualy makes memcpy,
if run with buffer allocated - copies movie to a buffer, returns size of a movie buffer;

Also, python extension was modified, wrappers for
SWFMovie_output_to_stream and SWFMovie_output_as_buffer were added.