1 #include <mingpp.h>
2 #include <cstdlib>
3 #include <cstdio>
4 
main()5 int main()
6 {
7 	try {
8 		SWFMovie *m = new SWFMovie(7);
9 		SWFSoundStream *stream;
10 		int i;
11 		FILE *file;
12 
13 		file = fopen(MEDIADIR "/video02.flv", "rb");
14 		if(!file) {
15 			return EXIT_FAILURE;
16 		}
17 
18 		stream = new SWFSoundStream(file);
19 		m->setSoundStream(stream);
20 		for(i = 0; i < 200; i++)
21 			m->nextFrame();
22 
23 		m->save("test02.swf");
24 	}
25 	catch(SWFException &e)
26 	{
27 		std::cerr << "SWFException: " << e.what() << std::endl << std::endl;
28 		return EXIT_FAILURE;
29 	}
30 
31 	return 0;
32 }
33