I’m building a simple application that lets me record one second duration videos, save them into output0.mov, output1.mov… files, and start playing them just after being recorded. I followed the information contained in this thread:
So I finally managed to make it work adding the SetGWorld instruction proposed by jroge, and deleting the DisposeMovie line in function finishMovie(), modification proposed by Zach (thanks _a lot_ for all the information provided in this thread!!)
My problem now comes when I try to erase all the videoplayers (stopping them and releasing their memory) and start capturing and playing new files _without_ closing the oF application.
I’ve tried several ways, but I always get a segfault the first time I call the setup() funtion in ofxQtVideoSaver _after having released all ofVideoPlayers_:
QuickTime!_CallComponentFunctionWithStorage () (C:\Archivos de programa\QuickTime\QTSystem\QuickTime.qts)
that is called from CreateMovieFile (ofxQtVideoSaver.cpp, line 79).
I guess it’s related with the closeMovie() function in ofVideoPlayer, which is called in the destructor of this class, but as I have no idea of how Quicktime works, i’m completely lost. Also, there’s no OF_ERROR or other output that explains this crash.
I’m in Windows XP / CodeBlocks, using the latest version of Quicktime (7.6.6).
I attach the source files if it can help. In this example, the app starts recording 1sec videos automatically when the applications is launched, and you can delete all videoPlayers (and make it crash) if you click any mouse button.
I could share the CB project if needed.
Any hint would be very much appreciated.