OH_NativeImage_UpdateSurfaceImage接口错误码

在官方文档https://developer.huawei.com/consumer/cn/doc/harmonyos-references/_o_h___native_image-0000001820880681#ZH-CN_TOPIC_0000001820880681__oh_nativeimage_updatesurfaceimage中,只有接口的定义和成功的返回值。

但在调用OH_NativeImage中OH_NativeImage_UpdateSurfaceImage,结果返回50001000的错误码,不知道错误码的含义,无法进行问题定位。

报错信息如下:OH_NativeImage* image = OH_NativeImage_Create(textureId, GL_TEXTURE_2D);

02-21 16:42:22.863 9049-9059 C01401/Bufferqueue com.openharmony.videocompressor E <429>OnBufferAvailable: SurfaceImageListener::OnBufferAvailable 
02-21 16:42:22.864 9049-9792 A03200/videoCompressor com.openharmony.videocompressor E notifySurfaceTextureAvaliable 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I dump private handle: 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I [basic info] fd = 0x<private>, handleId = <private>, format = <private>, width = <private>, height = <private>, size = <private> 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I [basic info] stride(in byte) = <private>, stride(in pixel) = <private>, usage = 0x<private>, vir addr = 0x<private> 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I [yuv info] offset = <private>, ustride = <private>, vstride = <private>, uoffset = <private>, voffset = <private> 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I [iova info] iova addr = 0x<private>, iova size = <private> 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I [attr info] attr addr = 0x<private>, attr vir addr = 0x<private> 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I [compression info] compress type = <private> 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I [reserve info] reserve fds = <private>, reserve ints = <private> 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I [HEBC info] hebcHeaderYStride = <private>, hebcHeaderUVOffset = <private>, hebcHeaderUVStride = <private> 
02-21 16:42:22.864 1140-1385 C014c0/GRALLOC composer_host I hebcPa

文档中给出的初始化方式是这样的,如果我想将OH_NativeImage_AcquireNativeWindow获取的OHNativeWindow关联到解码器,texture的target是不是应该是GL_TEXTURE_EXTERNAL_OES,但是现在没有办法声明成这个target,头文件中没有。

HarmonyOS
2024-05-08 23:33:41
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
day_night

1、声明成这个target–这个问题,请包含"egl_render_context.h" , “shader_program.h” 这两个头文件之后再尝试(这两个头文件是api11才有的,建议升级11之后引入这两个头文件之后再行尝试)。

2、错误码50001000:表示egl环境有问题。

分享
微博
QQ
微信
回复
2024-05-09 14:40:19
相关问题
华为事件通知接口返回10008错误码
7303浏览 • 2回复 待解决
Socket连接报错,错误码88
343浏览 • 1回复 待解决
startAbility跳转失败返回错误码16000001
339浏览 • 1回复 待解决
错误码62980096怎么处理
58浏览 • 1回复 待解决
请求广告返回错误码401
269浏览 • 1回复 待解决
Web的onErrorReceive错误码含义
151浏览 • 1回复 待解决
请求广告返回错误码21800003
319浏览 • 1回复 待解决
startAbility跳转不成功,错误码16000001
470浏览 • 1回复 待解决
润和轻量系统mqtt连接报错误码2
996浏览 • 0回复 待解决
错误码15500000(首选项)如何处理?
53浏览 • 1回复 待解决
Xcomponent、NativeImage开发指导
66浏览 • 1回复 待解决
OH _Audio播放音频问题
160浏览 • 1回复 待解决
Native Image模块API-OH_PixelMap_CreatePixelMap
155浏览 • 1回复 待解决
OH_AudioStreamBuilder_SetRendererInfo的用处
155浏览 • 1回复 待解决
请问鸿蒙和OH支持软总线互相通信吗
1457浏览 • 0回复 待解决
提问
该提问已有0人参与 ,帮助了0人