QtQuick: cannot playback any video on embedded linux

此生再无相见时 提交于 2019-12-07 16:47:23

问题


I cross compiled Qt 5.2.1 for TI AM335x board using the toolchain provided by TI together with their SDK 6.00.00.

Unluckily I am not able to reproduce any video in QML...

The debug console tells:

defaultServiceProvider::requestService(): no service found for – “org.qt-project.qt.mediaplayer”

Is there something that I am missing in cross-compilation? maybe some dependencies? Can somebody help me in determining what I am missing?

You can find here my cross-compilation configuration and here the full trace of messages produced by the application when setting the environment variable QT_DEBUG_PLUGIN


回答1:


You are missing a QtMultimedia backend that can actually play audio. Either it is not installed into the correct directory, or it was not built. Since your log output says that one backend (an audio capture one) was found, I'd rule out an installation problem.

You need to rebuild your QtMultimedia with the proper dependencies in place. For example, when gstreamer is found when building QtMultimedia, a GStreamer backend plugin will be built. The Qt documentation has a list of available backends.

When you build QtMultimedia, it will actually tell you what libraries it found, which is an indication of which backends will be built. Here is an example output when running qmake on QtMultimedia for desktop Linux - which built a gstreamer backend for me:

Running qmake /home/thomas/src/qt/qtmultimedia-stable ...
Info: creating cache file /home/thomas/build/qt/qtmultimedia-stable/.qmake.cache
Checking for openal... no
Checking for alsa... yes
Checking for pulseaudio... no
Checking for gstreamer... yes
Checking for gstreamer_photography... no
Checking for gstreamer_encodingprofiles... yes
Checking for gstreamer_appsrc... yes
Checking for resourcepolicy... no


来源:https://stackoverflow.com/questions/22966150/qtquick-cannot-playback-any-video-on-embedded-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!