• Lv0
    粉丝0

积分0 / 贡献0

提问1答案被采纳0文章0

作者动态

    Xcomponent如何获取OHNativeWindow以便解码器输出送显?

    m0_63192735 显示全部楼层 发表于 2024-9-10 11:26:47

    【问题描述】

    1. 介绍问题现象和发生的背景 Xcomponent如何获取OHNativeWindow以便解码器输出送显?
    2. 相关的代码(请勿使用截图)
    3. 运行结果、错误截图
    4. 我尝试过的解决方法和结果
    5. 我想要达到的结果

    【运行环境】

    硬件: ROM版本: DevEvoStudio版本:4.1 SDK版本:11

    您尚未登录,无法参与评论,登录后可以:
    参与开源共建问题交流
    认同或收藏高质量问答
    获取积分成为开源共建先驱

    精彩评论5

    kuaile

    沙发 发表于 7 天前
    你好,可以从native侧的生命周期等回调中获取native window句柄

    m0_63192735

    发表于 2024-9-18 09:43  IP属地: 四川省成都市

    回复 kuaile: 你好,我在native侧的回调获取native Window句柄的时候,遇到这个问题:        OHNativeWindowBuffer *buffer = nullptr;
            int fenceFd;
            // 通过 OH_NativeWindow_NativeWindowRequestBuffer 获取 OHNativeWindowBuffer 实例
            ret = OH_NativeWindow_NativeWindowRequestBuffer(nativeWindow, &buffer, &fenceFd);
    这个操作会报错 OH_NativeWindow_NativeWindowRequestBuffer ret = 40601000。


    这是具体的日志

    m0_63192735

    发表于 2024-9-18 09:43  IP属地: 四川省成都市

    回复 kuaile: 这是具体的日志01-01 08:57:08.883   7308-7335    C03f00/MUSL-LDSO               pid-7308              E     do_dlsym failed: symbol not found. so=/vendor/lib/chipsetsdk/libEGL_impl.so s=glEndQuery v=
    01-01 08:57:08.883   7272-7272    A01027/ScreenTag               pid-7272              I     test 1.5
    01-01 08:57:08.883   7272-7272    A01027/ScreenTag               pid-7272              I     OnSurfaceCreatedCB start
    01-01 08:57:08.883   7272-7272    A01027/ScreenTag               pid-7272              I     OH_NativeXComponent_GetXComponentId id = xcomponent_test_id
    01-01 08:57:08.883   7308-7335    C03f00/MUSL-LDSO               pid-7308              E     do_dlsym failed: symbol not found. so=/vendor/lib/chipsetsdk/libEGL_impl.so s=glGetQueryiv v=
    01-01 08:57:08.883   7272-7272    A01027/ScreenTag               pid-7272              I     OH_NativeXComponent_GetXComponentSize, width = 320, height = 240
    01-01 08:57:08.883   7272-7272    A01027/ScreenTag               pid-7272              I     OH_NativeWindow_NativeWindowHandle Opt ret = 0 , code = 0
    01-01 08:57:08.883   2369-2988    C01401/Bufferqueue             render_service        E     <516>CheckBufferConfig: width or height is greater than 0, now is w 320 h 0
    01-01 08:57:08.883   2369-2988    C01401/Bufferqueue             render_service        E     (xcomponent_test_idSurface) AllocBuffer: Failure [71], Reason: Alloc failed, then <400 invalid arguments>
    01-01 08:57:08.883   2369-2988    C01401/Bufferqueue             render_service        E     (xcomponent_test_idSurface) RequestBuffer: Fail to alloc or map Buffer[320 0] ret: 40001000, id: 10174777524281
    01-01 08:57:08.884   7308-7335    C03f00/MUSL-LDSO               pid-7308              E     do_dlsym failed: symbol not found. so=/vendor/lib/chipsetsdk/libEGL_impl.so s=glGetQueryObjectuiv v=
    01-01 08:57:08.884   7272-7272    C01401/Bufferqueue             pid-7272              E     <115>NativeWindowRequestBuffer: API failed, please check RequestBuffer function ret:40001000, Queue Id:10174777524281
    01-01 08:57:08.884   7272-7272    A01027/ScreenTag               pid-7272              I     OH_NativeWindow_NativeWindowRequestBuffer ret = 40601000
    01-01 08:57:08.884   7272-7272    A01027/ScreenTag               pid-7272              I     OnSurfaceCreatedCB finish

    kuaile

    发表于 2024-9-18 17:53  IP属地: 江苏省扬州市

    回复 m0_63192735: 01-01 08:57:08.883   2369-2988    C01401/Bufferqueue             render_service        E     <516>CheckBufferConfig: width or height is greater than 0, now is w 320 h 0                   高度不合法

    m0_63192735

    发表于 2024-9-19 09:15  IP属地: 广东省广州市

    回复 kuaile: 具体可能是什么原因造成的勒?我最开始设置的是320*240,用api接口获取size也是正常的

    【4 条回复】

    Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

    返回顶部