==== The context ====
I want to make a little Cocoa application that makes some image
processing with a regular C code. My cocoa code would be connected
to two quartz compositions to delegate most of the code.
The first QC would be a simple "Video Input" patch, allowing me to
1)display what my webcam sees in a QCView
2)allows me to capture frames programmatically with some
"valueForOutputKey" on the composition
The second QC is some image processing with CIKernel, so it is
attached to a QCrenderer to perform that offscreen.
My data flow is planned to be :
Video Input running in a QCView => valueForOutputKey: regularly =>
I get an NSImage => I process it using regular C code (offscreen)
=> I inject the result in another Quartz composition using
setValue:forInputKey => some additional processing is performed
offscreen => I get a final result that I can display
==== My questions ====
In the documentation of QuartzComposer, I have learnt that image
ports can receive NSImage or CIImage and make conversions on the
fly if it is necessary. Indeed, with the "valueForOutputKey:" I get
an NSImage, and when I use "setValue:forInputkey:", I inject an
NSImage where a CIImage is needed, but it works well.
However, in my data flow, I expect a decent frame rate, and I am
afraid that NSImage would hit the performances.
1)I can only get an NSImage from a "valueForOutputKey:". Is there
no way to get a CIImage instead ?
2)Is there a performance hit using NSImage, or is the internal
NSCIImageRep highly optimized in this case ?
3)My tests have shown that it performs rather well. But am I doing
wrong anyway, is there a better way to do ?