We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware Bugs › QTSession.open() in Capture class
Page Index Toggle Pages: 1
QTSession.open() in Capture class (Read 1302 times)
QTSession.open() in Capture class
Nov 17th, 2006, 5:14am
 
In the Capture class used for capturing video, the static initializer makes a call to QTSession.open() and a corresponding call to QTSession.close() is made in the dispose method of capture.  

A problem arises if one were to embed a PApplet and a Capture in a regular java application which may display multiple PApplets over its lifetime and calls dispose on them to make sure they are cleaned up.  Because the QTSession.open() is only called once during the lifetime of the program, once one calls dispose() on a capture object, one can never use a capture object again (the QTSession has been closed by the call to dispose and the static initializer which opens it will never be ran again).  Since you can stack multiple calls of QTSession.open() I think it would be best if the QTSession.open() is moved from the static initializer to the constructor of Capture.  
Re: QTSession.open() in Capture class
Reply #1 - Nov 30th, 2006, 9:10pm
 
thanks for the reminder, fixed for 0123. the behavior was a holdover from when multiple calls to QTSession.open() was a no-no, and since dispose() isn't getting called properly, well...
Page Index Toggle Pages: 1