• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
QTMovie problem, thread-safety issue?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: QTMovie problem, thread-safety issue?
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Re: NSDrawer detached from window?
  • Next by Date: "Drawing" CATextLayer into a CGImageRef?
  • Previous by thread: Re: NSDrawer detached from window?
  • Next by thread: Re: QTMovie problem, thread-safety issue?
  • Index(es):
    • Date
    • Thread