Ethan:
The MP3 importer is not currently marked thread-safe. I would
expect NewMovieFromProperties to return ComponentNotThreadSafeErr
for such movies. What is surprising is that it appeared to work the
first few times. Are you sure that the first input files were .mp3
files? What if you try opening one of the files that fails as the
first file?
By the way, the description of Component Manager thread modes in
TechNote 2125 <http://developer.apple.com/technotes/tn/tn2125.html>
is about as confusing as they come. However, after several readings,
i believe that the relevant passage is this:
"By including the kQTEnterMoviesFlagDontSetComponentThreadMode
flag in the call to
EnterMoviesOnThread, no change to the thread mode will be made
leaving it as it was
before the call. Setting the thread mode is a convenience provided by
EnterMoviesOnThread and can be done directly using
CSSetComponentsThreadMode.
You can also get the current thread mode by calling
CSGetComponentsThreadMode."
In other words, setting the flag does not have the effect of allowing
non-thread-safe components to be called. It merely leaves the
previous state unchanged. You might have more luck if you use
CSSetComponentsThreadMode, but you're on your own since we don't
guarantee the thread-safety of any component not marked as such.
We expect to provide a thread-safe MP3 importer eventually, but in
any event your code should be prepared for *some* importer to fail on
the thread, and fall back to opening the movie on the main thread..
I then set the movie active, detach it from this thread, pass it off
to another worker thread, and ExitMoviesOnThread from this thread.
Everything is fine the first few time I do this. Then, all
subsequent runs through the code causes NewMovieFromProperties to
return a "ComponentNotThreadSafeErr" with movie set to NULL.
1. How is this possible with
the kQTEnterMoviesFlagDontSetComponentsThreadMode flag set on the
previous EnterMoviesOnThread call?
2. Why is it fine the first two or three times through. (Note: each
time the movies tried are .mp3 files)
Thanks,
Ethan...
_______________________________________________
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