From 80a79a5a462cdc3a981052dc3c5030320c9a8b47 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 5 Sep 2004 15:56:58 +0000 Subject: [PATCH] added some debugging code. --- lib/h.263/swfvideo.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 2 deletions(-) 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