X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fh.263%2Fswfvideo.c;h=1ab0afa1f794110e8f2229cea5789fdb4d0ebce8;hb=ac7ab52d6bea63bca0692cac4c32b9a4456b34a7;hp=a4c8df5b76b9f2b49b3cc9dfe745e1c5df06a8d9;hpb=b2db3d144daf9b6d3549ef219608ab73ded31fc0;p=swftools.git diff --git a/lib/h.263/swfvideo.c b/lib/h.263/swfvideo.c index a4c8df5..1ab0afa 100644 --- a/lib/h.263/swfvideo.c +++ b/lib/h.263/swfvideo.c @@ -1362,6 +1362,81 @@ void test_copy_diff() #ifdef MAIN #include "png.h" + +int compileSWFActionCode(const char *script, int version, void**data, int*len) {return 0;} + +void mkblack() +{ + SWF swf; + SWFPLACEOBJECT obj; + int frames = 88; + int width = 160; + int height = 112; + int x,y; + TAG*tag = 0; + RGBA rgb; + RGBA* pic = 0; + VIDEOSTREAM stream; + + pic = malloc(width*height*4); + memset(pic, 0, width*height*4); + + memset(&swf,0,sizeof(SWF)); + memset(&obj,0,sizeof(obj)); + + swf.fileVersion = 6; + swf.frameRate = 15*256; + swf.movieSize.xmax = 20*width; + swf.movieSize.ymax = 20*height; + + swf.firstTag = swf_InsertTag(NULL,ST_SETBACKGROUNDCOLOR); + tag = swf.firstTag; + rgb.r = 0x00;rgb.g = 0x30;rgb.b = 0xff; + swf_SetRGB(tag,&rgb); + + tag = swf_InsertTag(tag, ST_DEFINEVIDEOSTREAM); + swf_SetU16(tag, 1); + swf_SetVideoStreamDefine(tag, &stream, frames, width, height); + stream.do_motion = 0; + + for(y=0;y