-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
老哥,在部分华为手机上,运行您的Demo,拍照可以保存照片,但照片是黑色,是什么原因? #36
Comments
华为手机需要另外找办法从GPU中提取数据,比如ImageReader等工具,glReadPixels无法提取。华为官方没给出解决方案,这个问题都存在好几年了。 |
有实现的Demo,或者可以提供一下具体的解决思路或者博客吗?网站找glReadPixels获取失败的相关解决都是无效的,相关资料也很少 |
跟这篇文章写的思路是一样的 —— android 使用ImageReader+共享EGLContext把opengles渲染的图像转bitmap |
这个问题你解决了吗 |
这个主要的原因在于Mali GPU 的驱动上有差异。这个问题的解决方案有两种,一种是,拍照时重新渲染一次,刷新GPU缓存的指令。另外一种方法就是采用ImageReader回调数据。但第一种方案无法百分百保证。ImageReader由于是标准接口,因此建议使用这种方法,使用方式跟录制的SharedContext一样。Camera2 的API也是采用ImageReader回调的。不过我暂时还没时间搞相机部分的功能。目前在弄短视频编辑部分的功能,没时间改这个,见谅。
发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用
…________________________________
发件人: gaoqianZ <notifications@github.com>
发送时间: Tuesday, March 12, 2019 4:01:47 PM
收件人: CainKernel/CainCamera
抄送: 黄文君; Comment
主题: Re: [CainKernel/CainCamera] 老哥,在部分华为手机上,运行您的Demo,拍照可以保存照片,但照片是黑色,是什么原因? (#36)
这个问题你解决了吗
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#36 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AK7ZPIsYFM2k-vqlsGaqH2jAifp12jnlks5vV17rgaJpZM4aQo8a>.
|
感谢作者百忙中抽出时间回复,最近忙新的项目,这个问题也一直拖着没解决,您分享的内容及解决办法我大致看了下,只是没时间去代码实现,非常感谢您!! |
No description provided.
The text was updated successfully, but these errors were encountered: