Hmm, that seems to be a misprint in the online documentation. If you
look in the header, the string should be "QCImage" not "QCPortImage"
To get an image out of a renderer and specify the type, you would use
the -valueForOutputKey:ofType:
It will be better to use that opaque type than CVPixelBuffer because
it will be more flexible. If the internal representation one day turns
out to be a CIImage instead, then passing it as a QCImage will not
make a costly conversion.
Troy
On Feb 7, 2008, at 11:54 PM, vade wrote:
Greetings.
Happy days! Ive finally gotten around to making a working simple app
that passes data from one QC Composition to another. However, im
using NSImage as the image type, and looking at :
http://developer.apple.com/documentation/Cocoa/Reference/QCRenderer_Protocol/Reference/Reference.html#/
/apple_ref/doc/uid/TP40004786-CH3g-DontLinkElementID_1
I note there is an 'Opaque QCPortImage' datatype I should be able to
use to pass images from the output of one composition to another. Id
love to get this working as optimally as possible.
In my test application, the source patch is simply a video input
patch with the image output published. Using the private patch
Image Debugging info, I note it is a CVPixelBuffer, so, in short,
where can i find out how to make one of these, or how / can I use
the QCPortImage datatype instead since im just going QC -> QC and so
on?
Ive only seen reference to QCPortImage on that doc too, which makes
me curious...
My code for passing output of one QC Comp to the input of another is:
if(![v001SourceRenderer renderAtTime:time arguments:nil])
NSLog(@"Rendering failed at time %.3fs", time);
NSImage* sourceImage;
sourceImage = [v001SourceRenderer
valueForOutputKey:@"SourceOutput1"];
[v001DestinationRenderer setValue:sourceImage
forInputKey:@"DestinationInput1"];
if(![v001DestinationRenderer renderAtTime:time arguments:nil])
NSLog(@"Rendering failed at time %.3fs", time);
[v001GLContext flushBuffer];
Thanks,
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected]
)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/tkoelling%40apple.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]