cleaned up.
authorkramm <kramm>
Wed, 16 Jan 2002 13:56:03 +0000 (13:56 +0000)
committerkramm <kramm>
Wed, 16 Jan 2002 13:56:03 +0000 (13:56 +0000)
lib/example/avi2swf.cc
lib/example/sound.c

index 6825217..a6efd41 100644 (file)
@@ -1,7 +1,7 @@
 /* avi2swf.cc
    Convert avi movie files into swf.
-   As soon as there's an algorithm implemented for writing the
-   data directly to disk, this file should maybe go to ../src.
+   As soon as the size of the generated swfs is reasonable, this file 
+   will go to ../../src
 
    Part of the swftools package.
    
@@ -19,6 +19,7 @@ extern "C" {
 #include "aviplay.h"
 
 /*
+statistics: (for now)
    37   bytes per shape (rectangle)
    8-12 bytes per placeobject
    4    bytes per removeobject2
@@ -655,9 +656,6 @@ int main (int argc,char ** argv)
   printf("\n");
   destroydisplay(file);
 
-  printf("mp3 samples read:%d\n", mp3_sound_pos);
-  printf("mp3 samples read:%d\n", mp3_sound_pos);
-  
   tag = swf_InsertTag(NULL, ST_END);
   swf_WriteTag(file, tag);
   swf_DeleteTag(tag);
index 8ddf34f..212ab9a 100644 (file)
@@ -22,8 +22,6 @@ int main (int argc,char ** argv)
   S32 width=300,height = 300;
   U16 block[1152*2];
   TAG * tag;
-  FILE* fi = fopen("test.mp3","wb");
-  FILE* fi2 = fopen("test2.wav","wb");
   
   int f,i,ls1,fs1;
   int count;
@@ -55,12 +53,8 @@ int main (int argc,char ** argv)
       }
       swf_SetSoundStreamBlock(tag, block, 1152,1);
       swf_SetSoundStreamBlock(tag, &block[1152], 1152,0);
-      fwrite(&tag->data[4], tag->len-4, 1, fi);
-      fwrite(block, 1152*2*2, 1, fi2);
       tag = swf_InsertTag(tag, ST_SHOWFRAME);
   }
-  fclose(fi);
-  fclose(fi2);
 
   f = open("sound.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");