swfvideo.o is now compiled separately.
[swftools.git] / lib / rfxswf.h
index 6da4a50..673429a 100644 (file)
@@ -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,10 +193,12 @@ 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
-
+void  swf_ResetTag(TAG*tag, U16 id);        //set's tag position and length to 0, without freeing it
+    
 void  swf_SetTagPos(TAG * t,U32 pos);       // resets Bitcount
 U32   swf_GetTagPos(TAG * t);
 
@@ -331,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 !
@@ -408,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
@@ -834,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