void MovieMaker::StartCapture( char *name , int x, int y) { strncpy( fname, name, sizeof(fname)); /* Flawfinder: ignore */ width = x; height = y; setupMovie(); }
bool qtCanvas::Impl::prepareMovie(CFStringRef path) { mPath = path; CFRetain(mPath); return (GetMoviesStickyError() == noErr) && setupMovie() && setupTrack() && setupCompression(); }
int main(int argc, char** argv) { char glutGamemode[32]; char cparam_name[] = "Data/camera_para.dat"; char vconf[] = ""; char patt_name[] = "Data/patt.hiro"; char movieFileName[] = "Data/sample.mov"; char *movieURI; // // Library inits. // glutInit(&argc, argv); // // Video setup. // if (!setupCamera(cparam_name, vconf, &gCparamLT, &gARHandle, &gAR3DHandle)) { ARLOGe("main(): Unable to set up AR camera.\n"); exit(-1); } // // Graphics setup. // // Set up GL context(s) for OpenGL to draw into. glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); if (!windowed) { if (windowRefresh) sprintf(glutGamemode, "%ix%i:%i@%i", windowWidth, windowHeight, windowDepth, windowRefresh); else sprintf(glutGamemode, "%ix%i:%i", windowWidth, windowHeight, windowDepth); glutGameModeString(glutGamemode); glutEnterGameMode(); } else { glutInitWindowSize(windowWidth, windowHeight); glutCreateWindow(argv[0]); } // Setup ARgsub_lite library for current OpenGL context. if ((gArglSettings = arglSetupForCurrentContext(&(gCparamLT->param), arVideoGetPixelFormat())) == NULL) { ARLOGe("main(): arglSetupForCurrentContext() returned error.\n"); cleanup(); exit(-1); } arglSetupDebugMode(gArglSettings, gARHandle); arUtilTimerReset(); // Load marker(s). if (!setupMarker(patt_name, &gPatt_id, gARHandle, &gARPattHandle)) { ARLOGe("main(): Unable to set up AR marker.\n"); cleanup(); exit(-1); } // // Movie loading. // // In this example, we load a movie via a file URI, but other URIs allowed // by the QuickTime module would also be fine. // Movie relative path is in "movieFileName". Get a file:// URI for it. movieURI = arUtilGetFileURI(movieFileName); if (!movieURI) { ARLOGe("Error: Unable to construct URI for movie file '%s'.\n", movieFileName); cleanup(); exit(-1); } // Now open the movie. if (!setupMovie(movieURI)) { ARLOGe("Error: Unable to open movie at URI '%s'.\n", movieURI); free(movieURI); cleanup(); exit(-1); } free(movieURI); // We're finished with movieURI, so free it. // Register GLUT event-handling callbacks. // NB: mainLoop() is registered by Visibility. glutDisplayFunc(Display); glutReshapeFunc(Reshape); glutVisibilityFunc(Visibility); glutKeyboardFunc(Keyboard); glutMainLoop(); return (0); }
int main(int argc, char** argv) { SWFMovie mo; SWFSound so; const char* soundFile; const char* srcdir; int frame; if (argc > 1) { soundFile = argv[1]; } else { soundFile = "brokenchord.wav"; } if (argc > 2) { srcdir = argv[2]; } else { srcdir = "."; } /* setup ming and basic movie properties */ Ming_init(); Ming_useSWFVersion(OUTPUT_VERSION); mo = newSWFMovie(); SWFMovie_setDimension(mo, 800, 600); SWFMovie_setRate(mo, 0.5); setupMovie(mo, srcdir); so = setupSounds(soundFile); /// Add as an export so we can attach it. SWFMovie_addExport(mo, (SWFBlock)so, "es"); SWFMovie_writeExports(mo); add_actions(mo, "c = 0;"); SWFMovie_nextFrame(mo); add_actions(mo, "note('You will hear several short tests with a succession of sounds. " "Each frame is two seconds long.\n" "The movie will describe what you should hear at the beginning of " "the frame.');"); frame = 0; pauseForNextTest(mo); runMultipleSoundsTest(mo, so, &frame); pauseForNextTest(mo); runNoMultipleSoundsTest(mo, so, &frame); pauseForNextTest(mo); runTrimmedSoundsTest(mo, so, &frame); pauseForNextTest(mo); runAttachedSoundsTest(mo, so, &frame); // TODO: test start(<sec_offset>) (+ with loop ?) endOfTests(mo); //Output movie puts("Saving " OUTPUT_FILENAME ); SWFMovie_save(mo, OUTPUT_FILENAME); return 0; }