问题描述
我有一个扩展TextureView
的自定义类。在此TextureView
中,我有一个surfaceTexture
,mSurfaceTexture
。这是一个单缓冲表面。
根据android文档,here:
在单缓冲模式下,应用程序负责序列化对图像内容缓冲区的访问。每次要更新图像内容时,必须在图像内容生产者获得缓冲区所有权之前调用releaseTexImage()方法。
因此,只要图像制作者获得所有权,我就称呼它。在Android 10上运行正常,但是在android 9上却出现以下错误:
11-05 19:05:53.960 23442 24509 E AndroidRuntime: java.lang.IllegalStateException: Unable to release texture contents (see logcat for details)
11-05 19:05:53.960 23442 24509 E AndroidRuntime: at android.graphics.SurfaceTexture.nativeReleaseTexImage(Native Method)
11-05 19:05:53.960 23442 24509 E AndroidRuntime: at android.graphics.SurfaceTexture.releaseTexImage(SurfaceTexture.java:252)
我正在致电ANativeWindow_fromSurface
。使用此功能后,我还应该做其他一些事情,例如发布nativewindow等吗?
关于为什么发生这种情况的任何想法,还有其他人也有类似的问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)