Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple MovieDrawingCompleteUPP's in objective-c



<x-tad-bigger>Hello All

My objective-c application plays multiple movies simultaneously, each movie is owned by an obj-c class instance. I require that each instance of the class receives a MovieDrawingComplete callback and have implemented the code shown below. This works just fine when the first movie is played, but any subsequent movies do not get the callback.

Is it possible to have discreet callbacks for each of my obj-c instances?

Is my use of the SetMovieDrawingCompleteProc refCon wrong?
</x-tad-bigger>


Thanks, Nick


@interface MovieLayer : Layer
{
MovieDrawingCompleteUPP _DrawingCompleteUPP;
Movie _movie;
...
}




@implementation MovieLayer


pascal OSErr _DrawingCompleteProc(Movie theMovie, long refCon)
{
NSLog([(MovieLayer*)refCon name]);

return noErr;
}



- (id)initWithFilename:(NSString *)filename
{
_DrawingCompleteUPP = NewMovieDrawingCompleteUPP(&_DrawingCompleteProc);


...
}


- (void)setLayerPlayEnable:(NSNumber*)flag
{
SetMovieDrawingCompleteProc(_movie, movieDrawingCallWhenChanged, _DrawingCompleteUPP, (self);

...
}


 _______________________________________________
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

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.