This question is probably relevant to other first time CIFilter writers, also. I need advice on updating a video player QTKit application for Mac OS X (based on QTKitPlayer) to use CIFilters. I've already read the Image Unit and Core Image guides. And I've successfully gotten the app to load and run the builtin CIFilters, using [CIPlugIn loadAllPlugIns].
I've also successfully written my first CIFilter, wrapped it as an Image Unit, and placed it into /Library/Graphics/Image Units And I've tested it successfully with Quartz Composer, which loads it and runs sucessfully. I've also loaded it successfully in Core Image Fun House.
However,the altered QTKitPlayer app won't LOAD my CIFilter. Breakpoints reveal that all the builtin CIFilters loaded, but my filter did not.
Since I'm a newbie to writing and using CIFilters, I'm worried that I must've missed some Core Image initialization code, or a QTMovieView nib flag, or compiler flag, or something. Do I need to do any set-up stuff before invoking loadAllPlugins? Here's the code:
[CIPlugIn loadAllPlugIns]; CIFilter *ciFilter = [CIFilter filterWithName:@"MyDistortionWarp"];
I check to see if it loads with:
NSArray *filterList = [CIFilter filterNamesInCategories:[NSArray arrayWithObject:kCICategoryDistortionEffect]];
During debugging, my CIFilter does not appear in the filterList inside my QTKitPlayer derivative. But, inserting the same code into the Core Image Fun House src, shows that filterList does contain my filter. FunHouse also sets ciFilter to the filter, but my app only get set to a Nil.
What is my QTKit app missing, that it needs to load a CIPlugin?