GPUImage displaying image instead of live video

只愿长相守 提交于 2019-12-06 13:15:52

You need to hang on to your GPUImageVideoCamera somewhere. If the above is placed in a method, and ARC is enabled for the project, the GPUImageVideoCamera instance will be deallocated the instant that method exits. This will terminate the video capture and could lead to other unsettling artifacts.

Make a GPUImageVideoCamera instance variable in your class, instead, and use that for the above. You're also going to need that so that you can pause and stop the camera when done.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!