X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.h;h=673429a46be63a61b087250a5c96421a156c50b4;hb=c7f2cde8319ab9138179caccda88dfd605712613;hp=8a87c0fdb2f06ccc4d4051dc8bc4b374fd154a14;hpb=fb6171381f99ab5cccd467a4fdca1488aadd6916;p=swftools.git diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 8a87c0f..673429a 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -80,6 +80,11 @@ typedef struct _RGBA U8 b; } RGBA, * LPRGBA; +typedef struct _YUV +{ + U8 y,u,v; +} YUV; + typedef struct _SRECT { SCOORD xmin; SCOORD ymin; @@ -131,7 +136,7 @@ typedef struct _TAG // NEVER access a Tag-Struct directly ! typedef struct _SOUNDINFO { U8 stop; - U8 multiple; //continue playing if already started + U8 nomultiple; //continue playing if already started U32 inpoint; U32 outpoint; @@ -188,6 +193,7 @@ void swf_OptimizeTagOrder(SWF*swf); // basic routines: TAG * swf_InsertTag(TAG * after,U16 id); // updates frames, if necessary +TAG * swf_InsertTagBefore(SWF*swf, TAG * before,U16 id); // like InsertTag, but insert tag before argument int swf_DeleteTag(TAG * t); void swf_ClearTag(TAG * t); //frees tag data @@ -332,10 +338,11 @@ typedef struct _LINESTYLE } LINESTYLE, * LPLINESTYLE; typedef struct _FILLSTYLE -{ U8 type; - RGBA color; - MATRIX m; - U16 id_bitmap; +{ U8 type; + RGBA color; + MATRIX m; + U16 id_bitmap; + GRADIENT* gradient; } FILLSTYLE, * LPFILLSTYLE; typedef struct _SHAPE // NEVER access a Shape-Struct directly ! @@ -409,11 +416,13 @@ int swf_ShapeSetCurve(TAG * t,SHAPE * s,S32 x,S32 y,S32 ax,S32 ay); int swf_ShapeSetCircle(TAG * t,SHAPE * s,S32 x,S32 y,S32 rx,S32 ry); int swf_ShapeSetEnd(TAG * t); +void swf_ShapeSetBitmapRect(TAG * t, U16 gfxid, int width, int height); + SHAPELINE* swf_ParseShapeData(U8*data, int bits, int fillbits, int linebits); SHAPE2* swf_ShapeToShape2(SHAPE*shape); -SHAPE* swf_Shape2ToShape(SHAPE2*shape); -SRECT swf_GetShapeBoundingBox(SHAPELINE*shape); -int swf_SetShape2(TAG*tag, SHAPE2*shape); +void swf_Shape2ToShape(SHAPE2*shape2, SHAPE*shape); +SRECT swf_GetShapeBoundingBox(SHAPE2*shape); +void swf_SetShape2(TAG*tag, SHAPE2*shape); void swf_Shape2Free(SHAPE2 * s); // swffont.c @@ -835,6 +844,33 @@ void swf_SetPlaceObject(TAG * t,SWFPLACEOBJECT* obj); void swf_GetPlaceObject(TAG * t,SWFPLACEOBJECT* obj); void swf_PlaceObjectFree(SWFPLACEOBJECT* obj); +// swfvideo.c + +typedef struct _VIDEOSTREAM +{ + int width; + int height; + int owidth; + int oheight; + int frame; + int linex; + int olinex; + YUV*oldpic; + YUV*current; + int bbx,bby; + int*mvdx; + int*mvdy; + + /* modifyable: */ + int do_motion; //enable motion compensation (slow!) + +} VIDEOSTREAM; + +void swf_SetVideoStreamDefine(TAG*tag, VIDEOSTREAM*stream, U16 frames, U16 width, U16 height); +void swf_SetVideoStreamIFrame(TAG*tag, VIDEOSTREAM*s, RGBA*pic, int quant/* 1-31, 1=best quality, 31=best compression*/); +void swf_SetVideoStreamPFrame(TAG*tag, VIDEOSTREAM*s, RGBA*pic, int quant/* 1-31, 1=best quality, 31=best compression*/); +void swf_VideoStreamClear(VIDEOSTREAM*stream); + #ifdef __cplusplus } #endif