Screen flickers while changing GPUImageMovie filters
I blend a GPUImageMovie and videoCamera input using GPUImageAddBlendFilter After several times changing the filters, the screen starts flickering hard.
Any idea why / how to fix it?
This is the code that changes the filters:
if (currentFilter) { [currentFilter stopRecording]; [_camera removeAllTargets]; [currentFilter removeAllTargets];
if (_filterBlendingMovie){
_filterBlendingMovie.delegate = nil;
[_filterBlendingMovie cancelProcessing];
[_filterBlendingMovie removeAllTargets];
_filterBlendingMovie = nil;
}
currentFilter = nil;
}
if (newFilter.filterInfo.isVideoFilter){
currentFilter = newFilter;
_filterBlendingMovie = [[GPUImageMovie alloc] initWithURL:[[NSBundle mainBundle] URLForResource:filterInfo.movieFileName withExtension:@"mov"]];
_filterBlendingMovie.playAtActualSpeed = YES;
_filterBlendingMovie.delegate = self;
//camera -> gpuImageView
// filter ->
//movie -> movieWriter
[videoCamera addTarget: currentFilter.gpuFilter ];
[_filterBlendingMovie addTarget:currentFilter.gpuFilter];
[currentFilter.gpuFilter addTarget:gpuImageView];
[currentFilter.gpuFilter addTarget:movieWriter];
gpuImageView.fillMode = kGPUImageFillModePreserveAspectRatioAndFill;
[currentFilter.gpuFilter prepareForImageCapture];
[_filterBlendingMovie startProcessing];
}
Hi Brad.
It seems that I nailed this flickering - there are some synchronization issues within GPUImageMovie. I'll test the fix throughly and will submit a pull request in following days.
Thanks for the framework!
Vadimf, if you find a fix for correctly switching filters on GPUImageMovie, could you kindly let me know?
Sure. where can I send you the files? The code is a bit ugly now, but works.
my email -> [email protected] Ive been experiencing bug's in it to, but it's above my skillset to actually fix it. Thanks.
Or you can add me on skype if needed. I'm always interested to hear more about your fix.
Hey is this resolved?
Hi All,
Did anyone ever find a solution to this?
@vadimf @jNoxx can you Please let me know how you solved the issue ? or please share to [email protected].