HarmonyOS 硬件解码器设置nativewindow失败

硬件解码器设置nativewindow失败,

(SurfaceImage-37432-0) Disconnect: Surface has been disconnect.

nativewindow是根据创建的纹理id在gl线程创建

glGenTextures(1, &mOESTextureId);
glBindTexture(GL_TEXTURE_2D, mOESTextureId); //这里原来是oes的也会有这个问题
mNativeImage = std::shared_ptr<OH_NativeImage>(OH_NativeImage_Create(mOESTextureId, GL_TEXTURE_2D),
[](OH_NativeImage *p) { OH_NativeImage_Destroy(&p); });

mNativeWindow = std::shared_ptr<OHNativeWindow>(OH_NativeImage_AcquireNativeWindow(mNativeImage.get()),
[](OHNativeWindow *p){ OH_NativeWindow_DestroyNativeWindow(p);});
HarmonyOS
7天前
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
FengTianYa
分享
微博
QQ
微信
回复
7天前
相关问题
java播放怎么用解码器?
4904浏览 • 1回复 待解决
【播放】硬解码支持的Demo
1984浏览 • 1回复 待解决
硬件设备如何适配HarmonyOS
12680浏览 • 1回复 待解决
HarmonyOS 硬件回声消除
96浏览 • 1回复 待解决
真机和模拟安装失败
11498浏览 • 2回复 待解决