如何解决eglCreateWindowSurface() 只能用 Surface、SurfaceView、SurfaceTexture 或 SurfaceHolder 的实例调用
我正在使用 RecordableSurfaceView https://github.com/spaceLenny/recordablesurfaceview/blob/master/recordablesurfaceview/src/main/java/com/uncorkedstudios/android/view/recordablesurfaceview/RecordableSurfaceView.java
对于 android 6,(api 23) 我收到此错误。有没有办法解决这个问题?
eglCreateWindowSurface() can only be called with an instance of Surface,SurfaceView,SurfaceTexture or SurfaceHolder at the moment,this will be fixed later.
.RecordableSurfaceView
潜在的代码段。
mEGLSurface = EGL14
.eglCreateWindowSurface(mEGLdisplay,eglConfig,RecordableSurfaceView.this,surfaceAttribs,0);
EGL14.eglMakeCurrent(mEGLdisplay,mEGLSurface,mEGLContext);
// guarantee to only report surface as created once GL context
// associated with the surface has been created,and call on the GL thread
// NOT the main thread but BEFORE the codec surface is attached to the GL context
if (mRendererCallbacksWeakReference != null
&& mRendererCallbacksWeakReference.get() != null) {
mRendererCallbacksWeakReference.get().onSurfaceCreated();
}
mEGLSurfaceMedia = EGL14
.eglCreateWindowSurface(mEGLdisplay,mSurface,0);
GLES20.glClearColor(0.1f,0.1f,1.0f);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。