Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Working on QTMovie in detached thread



Hello,

In my cocoa application I am doing the following:

1.)QTMovie mMovie and Movie qtMovie are instance variables in my controller. I create an empty Quicktime movie on the main thread, assigned to the qtMovie instance variable.

2.)I then create a QTMovie from the empty Quicktime movie using:
mMovie = [QTMovie movieWithQuickTimeMovie:qtMovie disposeWhenDone:YES error:nil];


3.)[mMovie retain];

4.)DetachMovieFromCurrentThread(qtMovie);

5.)I detach a worker thread using detachNewThreadSelector:

6.)In the worker thread method:
EnterMoviesOnThread(0);
AttachMovieToCurrentThread(qtMovie);

7.)Attempt to use [mMovie addImage: forDuration: withAttributes: ];

Yet Step 7 causes a signal 11 crash. I am sure that the image data is valid.

Any ideas? Only thing I can point out is that there are 2 autorelease pools...I create one at the beginning of the worker thread method. Within this method I create another autorelease pool before calling another method which renders the image and performs the [mMovie addImage:]. I release the second pool after this render method returns. This render method is called repeatedly in a loop to render frames and add each one to a movie. The second pool is necessary because there are objects generated in the render method which accumulate if I do not release the entire pool.

Any ideas?  This is driving me nuts.

Cheers,
Juan



_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.