QTMovie problem, thread-safety issue?
QTMovie problem, thread-safety issue?
- Subject: QTMovie problem, thread-safety issue?
- From: Daniel Thorpe <email@hidden>
- Date: Thu, 9 Oct 2008 17:24:55 +0100
Hi everyone,
I'm trying to access metadata from audio files (m4a files encoded
using aac in iTunes) using the Quicktime QTMetaDataRef class. So, to
do this I first need to get a QTMovie instance, hence I'm calling this
bit of code:
NSLog(@"processing %@", fullpath);
if([QTMovie canInitWithFile:fullpath]) {
NSLog(@"We're in business!");
}
This is being executed within the main function of an NSOperation
subclass. The first NSLog call works fine, and prints out the path to
the file, but the QTMovie class method crashes. I've stepped through
the execution in the debugger and it crashes with mach_msg_trap.
Anyway, I've not used QTKit before, but I've been reading about thread
safety with it, and am now calling EnterMoviesOnThread(0); and
ExitMoviesOnThread(); in my newly created threads, but it still fails.
I'm not calling AttachMovieToCurrentThread and
DetachMovieFromCurrentThread because I don't yet have any QTMovie and/
or Movie objects (I'm going to create one at this point in the
program's execution).
I also saw this post http://lists.apple.com/archives/quicktime-api/2005/Nov/msg00251.html
and so it seems as though the + (BOOL)canInitWith functions should
be thread safe, can anyone confirm this?
So, I'm thoroughly confused, and hoping that someone can shed some
light on what I've missed.
Thanks
Dan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden