HarmonyOS 鸿蒙Next有Surface模式的视频编码demo吗,按文档编写代码测试报错
HarmonyOS 鸿蒙Next有Surface模式的视频编码demo吗,按文档编写代码测试报错
参考此文档 https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/video-encoding-V5#surface%E6%A8%A1%E5%BC%8F 测试视频硬编码surface模式,使用编码器的surface创建EGLSurface,使用gles绘制
调用OpenGL函数时报错如下:
C02B30/CodecClient I {CreateListenerObject():84} Succeed
C02B30/CodecClient I {Create():39} Succeed
C02B30/CodecClient I {Init():108} Succeed
C02B30/CodecClient I {SetCallback():354} AVBuffer callback
C02B30/CodecClient I {Configure():123} Succeed
C02B30/CodecClient I {CreateInputSurface():227} Succeed
C02B30/CodecClient I {Start():141} Succeed
C02C03/PARAM_WATCHER I [watcher_manager_kits.cpp:172]Add watcher keyPrefix debug_layer remoteWatcherId 165 success
C01400/OpenGLWrapper E LoadLayers failed.
C01400/OpenGLWrapper E EglWrapperLayer Init Failed.
C03F00/MUSL-LDSO E [invalidDomain]Dlopen absolute pathname: /system/lib64/libiGraphicsCore.z.so
C0140A/iGraphicsCore I [nodict]IGraphicsCoreGameOptPrepare(451): [0020080c] pn: com.example.gl_codec_test, p: 59045
C05810/abr E module.metadata.empty
C05810/abr I GetMetaDataValue:
C05810/abr E module.metadata.empty
C05810/abr I GetMetaDataValue:
C05810/abr E module.metadata.empty
C05810/abr I GetMetaDataValue:
C0140A/iGraphicsCore I [nodict]IGraphicsCoreGameOptPrepare(468): [0030080c] no spt app: com.example.gl_codec_test
C01400/OpenGLWrapper E EglWrapperHookLayer init Failed!
C01400/OpenGLWrapper I initialized ver=1.4
A00000/native I gl_version: 3.000000
C01401/Bufferqueue E <141>NativeWindowRequestBuffer: API failed, please check RequestBuffer function ret:50002000, Queue Id:6189047873567
A00000/native E GL error after glClear(): 0x00000505
C04608/APS_MANAGER W [nodict]redo Connect
C04608/APS_MANAGER I [nodict]Start to ConnectService
C04608/APS_MANAGER I [nodict]GetSystemAbilityManager success
C01401/Bufferqueue E <141>NativeWindowRequestBuffer: API failed, please check RequestBuffer function ret:50002000, Queue Id:6189047873567
C0420C/WMSEvent I [window_scene_session_impl.cpp] ConsumePointerEventInner<555>: InputTracking id:7810, windowId:153, pointId:0, sourceType:2, pointPos:[791, 2353], winRect:[0, 0, 1260, 2720], needNotifyEvent:1
C04608/APS_MANAGER I [nodict]GetSystemAbility success
C057C2/IPCObjectProxy E SendRequest 143: failed, handle:62 error:29201 desc:.IApsManager time:44681563074947
C04608/APS_MANAGER W [nodict][ApsManagerProxy::RegisterGameFpsListener] Send Request faild code = 29201
C04608/APS_MANAGER E [nodict]ApsGameFpsController::RegisterGameFpsListener delete callback
C057C2/IPCObjectProxy E SendRequest 143: failed, handle:0 error:7 desc:.ISystemAbilityManager time:44683557918697
C0470A/GameServicePerf W [invalidDomain][report_utils.cpp(GetReportProxy:27)]Check systemAbility not exist.
C0470A/GameServicePerf E [invalidDomain][egl_slice_report.cpp(HandleBufferData:63)]GameService-graphics: game opt disable
<button style="position: absolute; padding: 4px 8px 0px; cursor: pointer; top: 8px; right: 8px; font-size: 14px;">复制</button>
C01401/Bufferqueue E <141>NativeWindowRequestBuffer: API failed, please check RequestBuffer function ret:50002000, Queue Id:6189047873567
报错是在调用 glClear(GL_COLOR_BUFFER_BIT) 时,编码器无回调
同样的流程使用XComponent绘制到屏幕上是正常的
测试设备:Mate 60 Pro
软件版本:NEXT.0.0.26 Developer Beta 1
OpenHarmony版本:5.0.25(Beta1)