Connecting QCRenderers

detour's picture

OK, after spending a large amount of time reading through discussions here and abroad and experimenting with my code, I'm stuck. Just trying a simple proof of concept to connect one QCRenderer with a Movie Loader patch to another renderer with a clear/sprite. Both have the needed output/input published, but I'm only getting the sprite rendering its white frame. Swapping in a still image patch seems to work, but I am suspicious that even that is working as it should. If anyone has a moment to look at my code, I'd be grateful.


MultiCompTest.zip16.27 MB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

.lov.'s picture
Re: Connecting QCRenderers

Its because you have to make the connections between the renders each time you render a frame. Put this into your render method:

[_renderer2 setValue:[_renderer1 valueForOutputKey:@"VideoOut" ofType:@"QCImage"] forInputKey:@"VideoIn"];

Note: don't use relative filepath if you don't copy the file to the Resources, because the Video Loader 2.qtz will be in folder.

detour's picture
Re: Connecting QCRenderers

OK, thank you. That makes sense now. I simply assumed that making the initial connection after instantiating the renderers took care of that. But it makes sense that you need to pass each image along the chain while you render. I just hadn't found any documentation that explained the concept.

The local filename was replaced simply so it wouldn't have my unqiue pathname on my system. Ah well.