On Nov 19, 2010, at 2:36 PM, Christopher Wright wrote:

> 
>> This brings up a larger question: My program is a Foundation tool, so I 
>> create my QCView with:
>> 
>>     myQCView = [[QCView alloc] initWithFrame:NSMakeRect(100.0, 100.0, 160.0, 
>> 128.0)];
>> 
>> and then load and render my qtz composition.
>> 
>> Does QC actually do anything unless I insert the QCView into a window? I 
>> notice that when I say:
>> 
>>     status = [myQCView startRendering];
>> 
>> ...there is a system process called IIDCVideoAssistant that runs at 6.5% 
>> CPU. (My composition accesses a Firewire camera; my program reads frames 
>> through a published output in the composition.) I don't see anything 
>> onscreen, but if it's rendering frames, I guess I'll be able to read them?
> 
> That's actually a tricky question.
> 
> QCViews (and NSViews in general) like to live on NSWindows (or subclasses 
> thereof).  If you just want to read frames/output, you should use QCRenderer 
> instead of QCView.
> 
> a QCView may not be fully/completely initialized until it's on a window, so 
> while some things may work (e.g., a simple composition that adds 2 numbers, 
> and outputs the result via a published port), more complex things (e.g., 
> anything that requires OpenGL) may fail/act strangely/crash (hopefully not 
> crash, but I've never tried it :).
> 
> Seeing supporting services spin up is expected, because -startRendering will 
> actually set up timers and initialize the patches so that they'll either 
> start doing work, or at least be able to.

Interesting. I downloaded the Apple sample project "Quartz Composer Offline":
    
http://developer.apple.com/library/mac/#samplecode/Offline/Introduction/Intro.html

This uses QCRenderer -initOffScreenWithSize:colorSpace:composition: which would 
fit the bill perfectly, but it unfortunately doesn't seem to work for 
compositions that access a camera, it returns blank white images, maybe because 
it doesn't wait for the camera to come on? Is there a way to modify this to 
work with a camera?


 _______________________________________________
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]

Reply via email to