imx6qsabresd mediaplayer problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6qsabresd mediaplayer problem

2,555 Views
Mihan
Contributor IV

Hi. I want to use QMediaPlayer to play muisc and video. But when running the project,it show:

defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

I have read some topic about this problem. But I dont't know how to fix it. It has gstreamer-1.0, the qt plugin just only have

root@imx6qsabresd:/usr/lib/qt5/plugins/mediaservice# ls
libqtmedia_audioengine.so

So what should I do?

Labels (3)
0 Kudos
Reply
11 Replies

2,193 Views
Mihan
Contributor IV

*介于语言和技术水平有限,在本文下方再以中文表述一次。

当我尝试使用QMediaPlayer播放音频时出现提示:

   defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"、

起初以为系统环境或者Qt的插件不全导致,但检查一遍发现GStreamer存在,Qt中存在libqtmedia_audioengine.so,运行提供的例程也能输出GStreamer版本,MPlayer能正常播放。

后来更换为QSoundEffect播放仍然出现问题,再检查了一下PulseAudio,却发现它没有运行起来:

   W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
   E: [pulseaudio] module-console-kit.c: GetSessionsForUnixUser() call failed:    org.freedesktop.DBus.Error.Spawn.PermissionsInvalid: The permission of the setuid helper is not correct
   E: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed.
   E: [pulseaudio] main.c: Module load failed.
   E: [pulseaudio] main.c: Failed to initialize daemon.

随后尝试使用基本的alsa播放wav,结果在设置参数时被告知参数无效(参数是读取wav文件的)。

*以上方法均能在虚拟机运行的ubuntu 12.04中使用的Qt 5.6.2实现,开发板Qt版本也是Qt5.6.2

目前正在按照上述方法下载了预构建包,更新了我烧写工具中.../profile/Linux/OS Firmware/firmware的内容。但当烧写工具准备烧写后,它无法找到usb设备,但桌面有显示U盘连接上,到这一步就怀疑需要我修改烧写工具的配置文件(ucl2.xml、cfg.ini、UICfg.ini等),请问能否提供

另一方面,我再按照上述提供的说明书一步一步重头开始,目前停留在 repo sync 这一步中,已经更换了源(REPO_URL),但仍然下载缓慢。最后还是忍不了翻墙直接用回原来的谷歌源下载,然后现在已经运行了setup-environment ,下一步需要做些什么,才能让开发板拥有全部功能,是否需要修改local.conf,需要如何修改,还请大家详细说明一下。但我尝试跟着指示去bitbake core-image-base 发现它提示ubuntu12.04 的git版本过低然后无法继续运行。

请求各位提供不同的建议或意见去处理这个问题。最终目的是希望统一将我想实现的功能都用Qt实现,方便日后不同平台的移植。

感谢大家

0 Kudos
Reply

2,193 Views
karangajjar
Senior Contributor II

Hi 铭恒 李,

Please follow the instructions given in the Yocto user guide and imx linux user guide.

After you have done init repo for Yocto version 4.1.15 or the version that you use(Section 3 & 4 from Yocto user guide). You do not have to change anything in local.conf

Follow below instruction to set build configurations:

DISTRO=<distro name> MACHINE=<machine name> source fsl-setup-release.sh -b <build dir>

Next build the image with qt application, this will depend upon the yocto version(please check section 5.2) :

bitbake fsl-image-qt5

Next flash the SD card as instructed in imx linux user guide(section 4.3.2) and boot up the board and check for qt application.

Regards,

Karan Gajjar

0 Kudos
Reply

2,193 Views
Mihan
Contributor IV

Thank you so much for your help these days karan.gajjar@volansystech.com

Yep I'm performing "bitbake fsl-image-qt5" . But in this step, there are many warning messages like:

"iso-codes-3.65-r0 do_fetch: Failed to fetch URL https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-3.65.tar.xz, attempting MIRRORS if available"

What effect wil they have?

0 Kudos
Reply

2,193 Views
karangajjar
Senior Contributor II

Hi 铭恒 李 ,

If the image is build successfully without any error then the things will work for you.

Regards,

Karan Gajjar

0 Kudos
Reply

2,193 Views
Mihan
Contributor IV

I have made a new clean ubuntu 14.04 to do.But it still has error:

ERROR: qtdeclarative-5.6.1+gitAUTOINC+a05f59388e-r0 do_compile: oe_runmake failed
ERROR: qtdeclarative-5.6.1+gitAUTOINC+a05f59388e-r0 do_compile: Function failed: do_compile (log file is located at /home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/temp/log.do_compile.2494)
ERROR: Logfile of failure stored in: /home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/temp/log.do_compile.2494
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 MAKEFLAGS=-j 4 OE_QMAKE_COMPILER=arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/imx6qsabresd OE_QMAKE_CC=arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/imx6qsabresd OE_QMAKE_CXX=arm-poky-linux-gnueabi-g++ -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/imx6qsabresd OE_QMAKE_CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0=/usr/src/debug/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0 -fdebug-prefix-map=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/imx6qsabresd= OE_QMAKE_CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0=/usr/src/debug/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0 -fdebug-prefix-map=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/imx6qsabresd= -fvisibility-inlines-hidden OE_QMAKE_LINK=arm-poky-linux-gnueabi-g++ -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/imx6qsabresd OE_QMAKE_LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed OE_QMAKE_AR=arm-poky-linux-gnueabi-ar OE_QMAKE_STRIP=echo OE_QMAKE_WAYLAND_SCANNER=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux/usr/bin/wayland-scanner OE_QMAKE_INCDIR_QT=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/imx6qsabresd//usr/include/qt5 QMAKE_SYNCQT=/home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux/usr/bin/qt5/syncqt
| cd src/ && ( test -e Makefile || /home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux/usr/bin/qt5/qmake /home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/git/src/src.pro CONFIG+=OE_QTXMLPATTERNS_ENABLED -o Makefile ) && make -f Makefile
| make[1]: Entering directory `/home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/build/src'
| cd qml/ && ( test -e Makefile || /home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux/usr/bin/qt5/qmake /home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/git/src/qml/qml.pro CONFIG+=OE_QTXMLPATTERNS_ENABLED -o Makefile ) && make -f Makefile
| make[2]: Entering directory `/home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/build/src/qml'
| make[2]: Nothing to be done for `first'.
| make[2]: Leaving directory `/home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/build/src/qml'
| cd quick/ && ( test -e Makefile || /home/mihan/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux/usr/bin/qt5/qmake /home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/git/src/quick/quick.pro CONFIG+=OE_QTXMLPATTERNS_ENABLED -o Makefile ) && make -f Makefile
| make[2]: Entering directory `/home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/build/src/quick'
| rm -f libQt5Quick.so.5.6.2 libQt5Quick.so libQt5Quick.so.5 libQt5Quick.so.5.6
| linking ../../lib/libQt5Quick.so.5.6.2
| /usr/src/debug/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/git/src/quick/qtquick2.cpp:180: error: undefined reference to 'QQuickItemsModule::defineModule()'
| collect2: error: ld returned 1 exit status
| make[2]: *** [../../lib/libQt5Quick.so.5.6.2] Error 1
| make[2]: Leaving directory `/home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/build/src/quick'
| make[1]: *** [sub-quick-make_first-ordered] Error 2
| make[1]: Leaving directory `/home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/build/src'
| make: *** [sub-src-make_first] Error 2
| WARNING: exit code 1 from a shell command.
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/mihan/fsl-release-bsp/build-x11/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtdeclarative/5.6.1+gitAUTOINC+a05f59388e-r0/temp/log.do_compile.2494)
ERROR: Task 1154 (/home/mihan/fsl-release-bsp/sources/meta-qt5/recipes-qt/qt5/qtdeclarative_git.bb, do_compile) failed with exit code '1'

0 Kudos
Reply

2,193 Views
karangajjar
Senior Contributor II

Hi 铭恒 李,

Which image are using? Have you tried prebuilds?

https://www.nxp.com/webapp/Download?colCode=L4.14.98_2.0.0_MX6QDLSOLOX&appType=license 

And have you followed Yocto and Linux user guide from below link for building image with QT and setting bootargs for display?

https://www.nxp.com/webapp/Download?colCode=imx-yocto-L4.14.98_2.0.0_ga 

Regards,

Karan Gajjar

0 Kudos
Reply

2,193 Views
Mihan
Contributor IV

Thank you karan.gajjar@volansystech.com

I'm a new to this part, could you please tell me how to do it specifically?

I also made a topic on Qt forum,they told me that I should use the same distribution (yocto) and install the development I need to cross-compile Qt again.

I think it's Qt project running without some plugins.So I try crossing compile again by myself.But when I use my Ubuntu to do that, it always shown 

checking for GStreamer 1.0...
Project WARNING: pkg-config disabled, can't check package existence
Project ERROR: gstreamer-1.0 development package not found
GStreamer 1.0 disabled.
checking for GStreamer 0.10...
Project WARNING: pkg-config disabled, can't check package existence
Project ERROR: gstreamer-0.10 development package not found
GStreamer 0.10 disabled.
GStreamer support cannot be enabled due to functionality tests!

I have installed all about GStreamer by sudo apt-get install as I can.

So do you have any other suggestion to me?

0 Kudos
Reply

2,193 Views
karangajjar
Senior Contributor II

Hi 铭恒 李,

Please flash above mentioned prebuilds and then try playing video.

Prebuilds: https://www.nxp.com/webapp/Download?colCode=L4.14.98_2.0.0_MX6QDLSOLOX&appType=license

Let us know if you still face any issue.

Regards,

Karan Gajjar

0 Kudos
Reply

2,193 Views
Mihan
Contributor IV

Thank you karan.gajjar@volansystech.com‌.

I will try doing that. But could you give me some tutorials about how to flash? I'm a new to this.

Cus I bought this ARM board online with few instructions.

I found there is a directory in the burning tool provided that contains the prebuilds.

../mfgtools-linux4.1.15/profiles/Linux/OS Firmware/firmware.

Do I just replace those and burn it to the board?

But after replacing those file, the burning tool (mfgtool) can not run.  picture.bmp

What should I do?

0 Kudos
Reply

2,193 Views
karangajjar
Senior Contributor II

Hi 铭恒 李,

You can checkout the imx user guide for your specific yocto version on how to flash the memory card and boot up the board.

Below is the link for kernel version 4.1.15 and yocto krogoth:

https://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0-LINUX-DOCS 

Regards,

Karan Gajjar

0 Kudos
Reply

2,193 Views
Mihan
Contributor IV

Thanks karan.gajjar@volansystech.com

I'm trying to follow the instructions to download the bsp, but the speed is too slow. 

On the other hand, could you please tell me how to modify the ucl2.xml, or give me a new one can be used with the pre-builds above mentioned? Because I think I need to modify it after replacing those file in ..../profile/Linux/OS Firmware/firmware

Now I have finished downloading, and I have run the setup-environment. What should I do next to make it have all the functions.

0 Kudos
Reply