GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

gpuimagemoviewriter completion block is never called.

Open GufranAnsari opened this issue 12 years ago • 5 comments

i am applying effect on movie using gpu image framework but gpuimagemoviewriter completion block is never called because of that can not be able to end processing and file not saved

GufranAnsari avatar Jun 18 '14 07:06 GufranAnsari

I also got this problem.Everyone there?, who can help us.

ngocphu2810 avatar Jun 22 '14 13:06 ngocphu2810

I am having the same problem, and it seems to be caused by a call to [GPUImageMovieWriter newFrameReadyAtTime:(CMTime)frameTime atIndex:(NSInteger)textureIndex] that is made during recording after a call to [assetWriter finishWritingWithCompletionHandler] inside [GPUImageWriter finishRecordingWithCompletionHandler]. The Apple documentation states that you should assure that you are NOT processing any sample buffers (that those are complete) before making this call--otherwise your finish call may not return due to the asset writer being in the wrong state. GPUImage currently does not have code there to do this.

Has anyone found an answer to this?

GQAdonis avatar Jul 08 '14 12:07 GQAdonis

I was having the same problem, but was due to reusing a filter: GPUImageFilter's endProcessing only allows to be ended once, if I have the same filter object in two different places and in one is called endProcessing, it calls endProcessing on its targets, but if afterwards endProcessing is called again, it won't call endProcessing on its targets.

CristianoCastroNabia avatar Oct 06 '14 16:10 CristianoCastroNabia

Guys, not a single one of you even gave a code example. My guess is your movie writer is in a local scope and being released immediately (and your callback) because there is no reference to it

rromanchuk avatar Mar 19 '15 23:03 rromanchuk

I also had this problem after re-using a filter. Once you init a filter and use it for image processing or for movie processing you have to set it to nil and re-initialize it to use it again or the completion block is never called.

o0JoeCool0o avatar Apr 25 '16 02:04 o0JoeCool0o