• 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
QuickTime Callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QuickTime Callback


  • Subject: QuickTime Callback
  • From: Michael Hanna <email@hidden>
  • Date: Fri, 5 Nov 2004 22:27:09 -0500

I'm getting an EXC_BAD_ACCESS at the initialization of my QuickTime callback:

- (void)setupMoviePlayingCompleteCallback:(Movie)theMovie callbackUPP:(QTCallBackUPP) callbackUPP
{
TimeBase tb = GetMovieTimeBase (theMovie);
OSErr err = noErr;


gQtCallBack = NewCallBack (tb, callBackAtExtremes); /******** debugger halts here <*********/
if (gQtCallBack != NULL)
{
err = CallMeWhen (gQtCallBack,
callbackUPP,
NULL, /* refCon */
triggerAtStop, /* flags - call us when stopped */
NULL, /* param2 - don't care */
NULL); /* param3 - don't care */
}
}


This happens in MyDocument.m when I load a pre-existing document(i.e. from the Open Recent... menu item) and does the loadRepresentationFromData: method.

If I load the movie via my Import Movie... menu item, which runs the exact same code(but does not use loadRepresentationFromData:), I get no error(!)

I don't see why there is a difference, since all I'm loading from my archived object is an NSString of the path to the Movie file(then later a fileURL) . The Import... method retrieves an NSString of the file with an openPanel.

This code was essentially 'borrowed' from the SimpleCocoaMovie project in order to tell me when the movie has stopped playing. I do have the callback and the global properly defined, I didn't include them for brevity.

I don't know much about Classic programming or Carbon for that matter, so I feel pretty much at a loss for what to do. I've looked at the QuickTime docs online but I find it a bit confusing. Any suggestions would be greatly appreciated.

Michael

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Regex pattern to find URLs
  • Next by Date: Custom control, changing cursor, bindings and placeholders
  • Previous by thread: Re: Regex pattern to find URLs
  • Next by thread: Re: QuickTime Callback
  • Index(es):
    • Date
    • Thread