/* 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.
#include "aviplay.h"
/*
+statistics: (for now)
37 bytes per shape (rectangle)
8-12 bytes per placeobject
4 bytes per removeobject2
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);
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;
}
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");