我正在将我的代码从静止图像应用程序转移到生成电影文件的应用程序。但是,以下代码存在问题,其中最终输出是使用 GPUImageLookupFilter 过滤器的黑色电影屏幕。谁能发现我做错了什么或我可能错过了什么。
Header File Sample
GPUImagePicture *lookupImageSource;
GPUImageOutput<GPUImageInput> *filter;
GPUImageMovie *movieFile;
GPUImageMovieWriter *movieWriter;
@property(nonatomic,strong) GPUImagePicture *lookupImageSource;
Main File
filter = [[GPUImageFilterGroup alloc] init];
self.lookupImageSource = [[GPUImagePicture alloc] initWithImage:[UIImage imageNamed:@"ExtremeVintage1.png"]];
GPUImageLookupFilter * filterLookup = [[GPUImageLookupFilter alloc] init];
[self.lookupImageSource addTarget:filterLookup];
[self.lookupImageSource processImage];
[(GPUImageFilterGroup *)filter addFilter:filterLookup];
[(GPUImageFilterGroup *)filter setInitialFilters:[NSArray arrayWithObject:filterLookup]];
[(GPUImageFilterGroup *)filter setTerminalFilter:filterLookup];
[movieFile addTarget:filter];
谢谢
**** 更新 *****
新代码
self.lookupImageSource = [[GPUImagePicture alloc] initWithImage:[UIImage imageNamed:@"ExtremeVintage1.png"]];
[self.lookupImageSource processImage];
filter = [[GPUImageLookupFilter alloc] init];
[lookupImageSource addTarget:filter];
[movieFile addTarget:filter];