Mailing Lists: Apple Mailing Lists

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

Re: Using QC Composition as Plugin



// if there is a frame available from a quicktime movie
if(QTVisualContextIsNewImageAvailable(_visualContext, NULL) && (QTVisualContextCopyImageForTime(_visualContext, NULL, NULL, &imageBuffer) == kCVReturnSuccess)) {
// convert frame to a CIImage
CIImage* inputImage = [CIImage imageWithCVImageBuffer:imageBuffer];
// send the new CIImage to the renderer input
if(![_renderer setValue:inputImage forInputKey:kRendererImageInput])
NSLog(@"Could not pass frames cache to composition");

It's better to pass directly the CVImageBuffer (see http:// developer.apple.com/technotes/tn2005/tn2143.html)


// tell it to render
// ??? Can I pass 0 for the time ???
[_renderer renderAtTime:0 arguments:NULL];

Yes 0 is definitely a valid value

// get the output image
NSImage* outImage = [_renderer valueForOutputKey:kRendererImageOutput];
if(!outImage)
NSLog(@"Could not get output image to composition");


The problem is that the output image is always NULL. Any ideas?

Can you post the composition somewhere - it's difficult to say without seeing it?


________________________________________________________
Pierre-Olivier Latour                            email@hidden
Quartz Composer Architect                Graphics & Imaging Team

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >Using QC Composition as Plugin (From: Mark Coniglio <email@hidden>)
 >Re: Using QC Composition as Plugin (From: Pierre-Olivier Latour <email@hidden>)
 >Re: Using QC Composition as Plugin (From: Mark Coniglio <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.