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