Oh. Thank you for the information. I would like to make this message short because this is Cocoa mailing list not QuicTime mailing list. ( The topic was changed from Cocoa related question to QT one. ) BTW, I think I can create QTMovie in my case :
This is from Tech Note TN2138 ///////////////////////// Using QTMovie objects on background threads? (1) allocate all QTMovie objects on the main thread. The reason for this is quite simple: a QTMovie is always associated with a movie controller component instance, and currently no movie controller components are thread-safe. While a non-nil QTMovie can indeed be created on a background thread, the associated movie controller will always be NULL. This by itself is not fatal; many operations can be performed on a QTMovie object that has been initialized on a background thread. But certain operations will not work correctly, including most all of the notifications and even asynchronous movie-loading. That's why allocating a QTMovie on a background thread is not advised. ///////////////////////// Thank you. JongAm Park On Sep 1, 2011, at 11:15 AM, Robert Martin wrote: > No - creating the QT Movie must happen on the main thread - but after it's > created, you can pass it off to secondary threads for processing… > > Rob > > > > On Sep 1, 2011, at 1:13 PM, JongAm Park wrote: > >> Hmmm.. probably.. enterQTKitOnThread allows to create and initialize >> QTMovie objects on threads? >> >> On Sep 1, 2011, at 9:33 AM, JongAm Park wrote: >> >>> Hello, >>> >>> I wrote codes to processing images on a second thread and the main thread >>> displays and handles "progress dialog box". >>> Because it is not possible to create a "UI thread" according to Cocoa >>> framework, I had the main thread process the progress dialog box, while a >>> second thread process images. >>> >>> However, a problem occurred when I decided to create QuickTime movie files >>> with the processed images on the second thread. >>> >>> It turned out that QuickTime movie can't be created on a second thread, >>> which is not a main thread. >>> >>> An uncaught exception was raised >>> QTMovie_QuickTime class must be initialized on the main thread. >>> *** Terminating app due to uncaught exception >>> 'QTMovieInitializedOnWrongThread', reason: 'QTMovie_QuickTime class must be >>> initialized on the main thread.' >>> >>> Then, is there any code pattern or example to handle progress dialog and >>> time consuming tasks in a main thread without blocking user interaction? >>> Or a solution doesn't need to be confined in that model. If it can utilize >>> a second thread, it is better. >>> >>> Can anyone share his/her idea with me? >>> >>> Thank you. >>> JongAm Park >> >> _______________________________________________ >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) >> >> Please do not post admin requests or moderator comments to the list. >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com >> >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/cocoa-dev/robmartin%40frontiernet.net >> >> This email sent to robmar...@frontiernet.net > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com