How to show real time filtered camera preview while recording videos?

ぐ巨炮叔叔 提交于 2019-11-27 22:28:12

问题


I want to show filtered camera preview while recording a video using media recorder. To filter the preview i need frames normally which i can get that from onPreviewFrame() function but while recording video with media recorder, onPreviewFrame() function does not get called. So what i want to know , is there any other ways to get these frames for filtering and then show them after modification ? I checked some apps from Google Play for example, Videocam Illusion. Its showing preview with effects during recording videos. I want to do something like that but have no hint how to do so. So i will appreciate any help/hints/code/sample regarding the issue. Thanks.


回答1:


I haven't done it myself, but searched for it not so long ago. There's an answer on StackOverflow to show modified buffer of PreviewFrame:

https://groups.google.com/forum/?fromgroups=#!topic/android-developers/yF6CmrIJzuo

And here, a google groups link on the same topic.

How can I manipulate the camera preview?

Hope this helps, I'm planning on an application that modifies the preview frames, but is not going to record anything.

Best Regars.



来源:https://stackoverflow.com/questions/12352615/how-to-show-real-time-filtered-camera-preview-while-recording-videos

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