GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

Over releasing frame buffer when updating the a UI element.

Open samuelbeek opened this issue 9 years ago • 5 comments
trafficstars

Hi,

I'm trying to update a GPUImageUIElement-filter only when the content of the element has changed, because updating UIElements is an expensive operation and really bad for the frame rate. However, whenever I try to call uiElement.update() it throws this error:

Tried to overrelease a framebuffer, did you forget to call -useNextFrameForImageCapture before using -imageFromCurrentFramebuffer?

I've tried this on avery qeue/thread, that doesn't matter.

My setup is the following:

VideoCamera --> CropFilter ----> GaussianBlurFilter ----\
                                                        BlendFilter ----> PreviewLayer
                                          UIElement ----/ 

It currently only works when I update the UIElement like this:

blurFilter.frameProcessingCompletionBlock = { [weak self] output, time in
    self?.uiElements.update()
}

Even if I do it only once per second there by checking the time and only update once every second, it throws the same error.

I've spend a couple of days figuring out how to make this work, but didn't succeed. I've read almost every Stack Overflow and GitHub issue on this matter and haven't found a solution yet, so I'm a little desperate. Anyone knows what might be causing this issue? Thanks in advance.

samuelbeek avatar Apr 29 '16 10:04 samuelbeek

Same issue for me, can someone help?

kevin-zqw avatar May 17 '16 08:05 kevin-zqw

I have the same issue.

klemenzagar91 avatar May 31 '16 06:05 klemenzagar91

I have the same issue too,is someone can help?

mokeClub avatar Nov 08 '16 03:11 mokeClub

you guys can see https://github.com/BradLarson/GPUImage/issues/2211 hope can help you

mokeClub avatar Nov 08 '16 07:11 mokeClub

I have the same issue too,is someone can help?

smallqiang avatar Feb 21 '19 08:02 smallqiang