QuickTime Callback
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