查看: 11480|回复: 22

[求助] imx6solo.qt5视频播放问题

[复制链接]

该用户从未签到

4

主题

14

帖子

0

注册会员

Rank: 2

积分
56
最后登录
2016-10-20
发表于 2016-9-6 21:34:30 | 显示全部楼层 |阅读模式
各位好:
           我用的imx6solo板开发qt5程序。用的3.14.28内核的yocto工程,里面是qt5.3.2的qt5。根据文档加自己摸索能运行qt5的程序了。但是不能播放视频。用qt5自带的multimediawidgets里面的例子不能跑,提示defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"。我按community.nxp.com上的帖子在local.conf 添加了PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer"也是不行。报同样的错。希望有搞过imx6 qt5播放视频的朋友给些指导,谢谢。
我知道答案 目前已有22人回答
回复

使用道具 举报

  • TA的每日心情
    难过
    2019-11-15 11:44
  • 签到天数: 117 天

    连续签到: 1 天

    [LV.6]常住居民II

    4

    主题

    362

    帖子

    0

    高级会员

    Rank: 4

    积分
    758
    最后登录
    2019-11-15
    发表于 2016-9-7 10:24:43 | 显示全部楼层
    我来顶。
    哎...今天够累的,签到来了~
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    2017-2-13 08:29
  • 签到天数: 20 天

    连续签到: 1 天

    [LV.4]偶尔看看III

    531

    主题

    2048

    帖子

    0

    中级会员

    Rank: 3Rank: 3

    积分
    210
    最后登录
    2018-8-14
    发表于 2016-9-7 14:57:56 | 显示全部楼层
    已经叫工程师来帮您解决了
    签到 签到
    回复 支持 反对

    使用道具 举报

  • TA的每日心情

    2017-1-4 08:05
  • 签到天数: 11 天

    连续签到: 1 天

    [LV.3]偶尔看看II

    85

    主题

    1629

    帖子

    1

    版主

    Rank: 7Rank: 7Rank: 7

    积分
    2569

    优秀版主

    最后登录
    2019-3-28
    发表于 2016-9-7 15:11:45 | 显示全部楼层
    别急,帮你问了,正在等回复
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    1

    主题

    20

    帖子

    0

    社区小助手

    Rank: 7Rank: 7Rank: 7

    积分
    108
    最后登录
    2020-6-29
    发表于 2016-9-7 15:30:19 | 显示全部楼层
    http://community.nxp.com/docs/DOC-101118

    1. check whether the gtreamer is built
    2.if gtreamer can built, what is the name? in this case, PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer010 "
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4

    主题

    14

    帖子

    0

    注册会员

    Rank: 2

    积分
    56
    最后登录
    2016-10-20
     楼主| 发表于 2016-9-7 16:02:18 | 显示全部楼层
    小强尼 发表于 2016-9-7 15:30
    http://community.nxp.com/docs/DOC-101118

    1. check whether the gtreamer is built

    谢谢回复,我把gstreamer改成gstreamer010后编译看到有加进gstreamer,但是编译报错,如下:imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/gstvideoconnector.c: In function 'gst_video_connector_new_buffer_probe':
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/gstvideoconnector.c:467:32: error: 'GST_PAD_PROBE_DROP' undeclared (first use in this function)
         return element->relinked ? GST_PAD_PROBE_DROP : GST_PAD_PROBE_OK;
                                    ^
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/gstvideoconnector.c:467:32: note: each undeclared identifier is reported only once for each function it appears in
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/gstvideoconnector.c:467:53: error: 'GST_PAD_PROBE_OK' undeclared (first use in this function)
         return element->relinked ? GST_PAD_PROBE_DROP : GST_PAD_PROBE_OK;
                                                         ^
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/gstvideoconnector.c: In function 'gst_video_connector_handle_sink_event':
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/gstvideoconnector.c:623:11: error: 'parent' undeclared (first use in this function)
         (void)parent;
               ^
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/gstvideoconnector.c: In function 'gst_video_connector_new_buffer_probe':
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/gstvideoconnector.c:468:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
    Makefile:792: recipe for target '.obj/gstvideoconnector.o' failed
    make[2]: *** [.obj/gstvideoconnector.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/qgstreamervideowindow.cpp:48:36: fatal error: gst/video/videooverlay.h: No such file or directory
    #include <gst/video/videooverlay.h>
                                        ^
    compilation terminated.
    Makefile:852: recipe for target '.obj/qgstreamervideowindow.o' failed
    make[2]: *** [.obj/qgstreamervideowindow.o] Error 1
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/qgstreameraudioprobecontrol.cpp: In member function 'void QGstreamerAudioProbeControl::bufferProbed(GstBuffer*)':
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/qgstreameraudioprobecontrol.cpp:64:10: error: 'caps' was not declared in this scope
         if (!caps)
              ^
    /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/qtmultimedia-opensource-src-5.3.2/src/gsttools/qgstreameraudioprobecontrol.cpp:67:57: error: 'caps' was not declared in this scope
         QAudioFormat format = QGstUtils::audioFormatForCaps(caps);
                                                             ^
    Makefile:833: recipe for target '.obj/qgstreameraudioprobecontrol.o' failed
    make[2]: *** [.obj/qgstreameraudioprobecontrol.o] Error 1
    make[2]: Leaving directory '/imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/build/src/gsttools'
    Makefile:145: recipe for target 'sub-gsttools-make_first' failed
    make[1]: *** [sub-gsttools-make_first] Error 2
    make[1]: Leaving directory '/imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/build/src'
    Makefile:40: recipe for target 'sub-src-make_first' failed
    make: *** [sub-src-make_first] Error 2
    ERROR: oe_runmake failed
    WARNING: exit code 1 from a shell command.
    ERROR: Function failed: do_compile (log file is located at /imx6dizzy/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/qtmultimedia/5.3.2-r0/temp/log.do_compile.24651)
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    1

    主题

    20

    帖子

    0

    社区小助手

    Rank: 7Rank: 7Rank: 7

    积分
    108
    最后登录
    2020-6-29
    发表于 2016-9-7 16:20:20 | 显示全部楼层
    It looks like some definition file is missing in your environment, but
    1. what is your config in local.conf and component?
    2. check whether GST_PAD_PROBE_DROP is missing in whole yocto (grep it), if so , you may need to git QT again
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2016-10-28 10:25
  • 签到天数: 4 天

    连续签到: 1 天

    [LV.2]偶尔看看I

    1

    主题

    65

    帖子

    0

    中级会员

    Rank: 3Rank: 3

    积分
    256
    最后登录
    2018-3-22
    发表于 2016-9-7 19:25:18 | 显示全部楼层
    本帖最后由 魏科 于 2016-9-7 19:41 编辑

    您好!这个问题做QT媒体播放的都可能遇到,以前我也遇到过,现在结合你的环境和当时我的解决方法,大致分析如下:

    1.首先看到
    的错误,用的底层render中间件是gstreamer,其实还有其他的,先不管,  IMX6平台就依照gstreamer做,所以需要先保证gstreamer编译成功,并部署到可识别的环境中。

    2.我这里没有QT5.3版本,但是我这里有QT5.5版本,根据
    的编译报错:
    error: 'GST_PAD_PROBE_DROP' undeclared
    我查找了我QT5.5的gstvideoconnector.c文件,发现这个GST_PAD_PROBE_DROP不存在了,
    但是在qgstreamerbufferprobe.cpp中看到了对GST_PAD_PROBE_DROP

    3.我在QT5.5的源码中,全局grep查找了GST_PAD_PROBE_DROP关键字,没有找到类似#define GST_PAD_PROBE_DROP  。。。的定义说明这些定义是在gstreamer第三方库中定义的。

    4.通过上述现象,您可能先确保
    的gstreamer成功编译了,然后把编译好的头文件和库文件部署到QT能够识别的路径中。

    5.因为gstreamer是第三方的东西,就算IMX的工程师移植过,仍然是头文件+库的形式呈现给QT5,这个和TSLIB,DBUS是一个道理,  所以,简单地说,就是您的gstreamer的库和头文件路径没有放正确,您去参考tslib,dbus和QT5的对接来走模仿,仅供您参考。

    6.另外当您遇到这个问题的时候,要记得多执行make clean,qmake,make,因为我们不知道自己改的地方是否真的写入到Makefile去了。


    回复 支持 反对

    使用道具 举报

  • TA的每日心情

    2017-1-4 08:05
  • 签到天数: 11 天

    连续签到: 1 天

    [LV.3]偶尔看看II

    85

    主题

    1629

    帖子

    1

    版主

    Rank: 7Rank: 7Rank: 7

    积分
    2569

    优秀版主

    最后登录
    2019-3-28
    发表于 2016-9-7 20:12:47 来自手机 | 显示全部楼层
    谢谢诸位支持
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4

    主题

    14

    帖子

    0

    注册会员

    Rank: 2

    积分
    56
    最后登录
    2016-10-20
     楼主| 发表于 2016-9-8 11:07:01 | 显示全部楼层
    魏科 发表于 2016-9-7 19:25
    您好!这个问题做QT媒体播放的都可能遇到,以前我也遇到过,现在结合你的环境和当时我的解决方法,大致分析 ...

    谢谢你的回答,gstreamer这块我已经自己找到方法编译通过了,也有对应的库在根文件系统里面,但是用qt5自带的multimediawidgets里面的例子还是放不了视频。
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /3 下一条

    Archiver|手机版|小黑屋|恩智浦技术社区

    GMT+8, 2025-7-21 11:51 , Processed in 0.104413 second(s), 30 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

    快速回复 返回顶部 返回列表