Open gadu opened 8 years ago
A few more details. If I run
self.filterImageView.CIImage = nil;
[self.recorder stopRunning];
self.filterImageView.CIImage = nil;
I can get it to successfully black out the previewLayer about 20% of the time. I'm guessing in the time it takes to stop running (or even if there are some buffers in the pipeline) the image gets replaced, so I'm not sure if this is reliable way to do it.
self.filterImageView.hidden = YES;
?
I'm using a custom SCFilterImageView on my SCRecorder.
When my app is backgrounded (and I also want this when
viewWillDisappear
is called) I call[self.recorder stopRunning];
to stop the camera. The issue is whatever frame was currently displaying when i called that, will stay on the previewLayer for the recorder until[self.recorder startRunning]
starts supplying new sample buffers.I hold a reference to the
SCFilterImageView
i use in my camera controller and I've been trying to clear it out by callingself.filterImageView.CIImage = nil;
right before my call to[self.recorder stopRunning];
I assumed this would work because the GLKView's delegate method (
glkView: drawInRect:
) makes a call to render the current CIImage onto the GLKViewI also tried exposing the GLKView, so that I could call
[self.filterImageView.GLKView deleteDrawable]
and messing around with theglClear()
function, but I don't really have experience with OpenGL ES 2.0 so I don't know if I should be messing with that (it also doesn't work).Any help?