Debugging MediaPlayer under Qt 5.5 Multimedia
-
hello, I'm trying to debug Media Player which is not playing wav or any other format on my embedded imx6 board. I can play files from console by setting up and playing Gstreamer pipeline.
However when i run my application with QMediaPalyer and QMediaPlaylist I immediately get QMediaPlayer::StoppedState after attempting to play. I get no error on the first try but on the second attempt I get: "The QMediaPlayer object does not have a valid service".Could someone explain how to begin to analyze this problem. I read that QMediaPlayer uses Gstreamer 1.0 (in Qt5.5) so there must be a way to verify if things are setup correctly or get more debug info.
Thanks!
-
Hi,
Did you build Qt yourself ? If so, did you select the GStreamer 1.0 backend ?
-
I tried the Quick Player demo today (with slight modifications - removed the QtWinExtras to make it work) and i did get the same error:
"The QMediaPlayer object does not have a valid service"This confirms that it is not my code and as SGaist mentioned it might be the Gstreamer 1.0 backend, but honestly I'm not sure what that means, how to add it and where to search for more info on this topic.
qt.io webpage does not seem to go into any details on how Gstreamer is hooked up with Qt Multimedia or does not list requirements for it to work on embedded arm board. Or maybe it does and I have missed it.
Help would be greatly appreciated!
-
In order to build QtMultimedia with GStreamer support, you have to have the GStreamer dev-package for your target which AFAIK, should be provided by yocto.
-
That you should check with the Yocto project.
-
Ok, I added the following line to the local.conf file:
PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer"
(Note that gstreamer actually means Gstreamer 1.0)and in IMAGE_INSTALL_append section I these items related to Gstreamer. I am not 100% sue which are necessary for basic gstreamer functionality.
gstreamer1.0
gstreamer1.0-plugins-base
gstreamer1.0-plugins-good
gstreamer1.0-plugins-bad
gstreamer1.0-plugins-ugly
gstreamer1.0-libav
gstreamer1.0-dev
gstreamer1.0-plugins-imx
gst1.0-fsl-plugin
packagegroup-fsl-gstreamer1.0
packagegroup-fsl-tools-testapps
packagegroup-fsl-tools-benchmark \So now (after bitbaking new image and new toolchain) I got an issue with Gstreamer, but the same error is reported by Qt and standalone Gstreamer.
~# gst-launch-1.0 filesrc location=/home/Music/test.mp3 ! mad ! alsasink display(/dev/fb0) resolution is (800x480). ERROR: v4l2 capture: slave not found! [INFO] Product Info: i.MX6Q/D/S ERROR: v4l2 capture: slave not found! Can't get caps from capture device, use the default setting. Perhaps haven't capture device. (gst-plugin-scanner:472): GLib-GObject-WARNING **: cannot register existing type 'GstImxCompositorPad' (gst-plugin-scanner:472): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
Not sure why I'm seeing capture device issue when trying to play mp3.
This seems like a step in a wrong direction. I will try to delete the build dir and bitbake the whole image from scratch (previously I did incremental changes)
-
So after several builds and modifications (removal of all gstreamer plugins) to local.conf I narrowed it down to this plugin:
gst1.0-fsl-plugin \
When this was removed then Gstreamer and Qt Multimedia (QPlayer) started to work. Could someone sprinkle some Qt/Gstreamer/Freescale wisdom on this issue? Thanks in advance!here is my current local.conf file:
MACHINE ??= 'wandboard' DISTRO ?= 'poky' PACKAGE_CLASSES ?= "package_rpm" IMAGE_FEATURES += "package-management" EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh" CORE_IMAGE_EXTRA_INSTALL_append="openssh-sftp-server" TOOLCHAIN_HOST_TASK_append = " nativesdk-python-subprocess" USER_CLASSES ?= "buildstats image-mklibs image-prelink" PATCHRESOLVE = "noop" BB_DISKMON_DIRS = "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ ABORT,${TMPDIR},100M,1K \ ABORT,${DL_DIR},100M,1K \ ABORT,${SSTATE_DIR},100M,1K" PACKAGECONFIG_append_pn-qemu-native = " sdl" PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" PACKAGECONFIG_append_pn-qtbase = " accessibility" PACKAGECONFIG_append_pn-qtquickcontrols = " accessibility" PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer" ASSUME_PROVIDED += "libsdl-native" CONF_VERSION = "1" BB_NUMBER_THREADS = '4' PARALLEL_MAKE = '-j 4' DL_DIR ?= "${BSPDIR}/downloads/" ACCEPT_FSL_EULA = "1" DISTRO_FEATURES_remove = "x11 wayland" LICENSE_FLAGS_WHITELIST = "commercial" IMAGE_INSTALL_append = " \ gcc \ g++ \ binutils \ libgcc \ libgcc-dev \ libstdc++ \ libstdc++-dev \ libstdc++-staticdev \ tslib-conf \ tslib-tests \ tslib-calibrate \ tslib \ evtest \ autoconf \ automake \ ccache \ chkconfig \ glib-networking \ glibmm \ packagegroup-core-buildessential \ pkgconfig \ boost \ cmake \ zlib \ glib-2.0 \ packagegroup-fsl-tools-testapps \ ruby \ cpufrequtils \ nano \ gdb \ qtquickcontrols-qmlplugins \ openssh-sftp-server \ gstreamer1.0-plugins-imx \ packagegroup-fsl-gstreamer1.0 \ packagegroup-fsl-tools-testapps \ packagegroup-fsl-tools-benchmark \ imx-vpu \ imx-test \ qtbase-fonts \ qtbase-plugins \ qtbase-tools \ qtdeclarative \ qtdeclarative-plugins \ qtdeclarative-tools \ qtdeclarative-qmlplugins \ qtmultimedia \ qtmultimedia-plugins \ qtmultimedia-qmlplugins \ qtsvg \ qtsvg-plugins \ qtsensors \ qtimageformats-plugins \ qtsystems \ qtsystems-tools \ qtsystems-qmlplugins \ qtscript \ qt3d \ qt3d-qmlplugins \ qtwebkit \ qtwebkit-qmlplugins \ qtgraphicaleffects-qmlplugins \ qtconnectivity-qmlplugins \ qtlocation-plugins \ qtlocation-qmlplugins \ cinematicexperience \ cairo \ pango \ fontconfig \ freetype \ pulseaudio \ dbus \ alsa-lib \ alsa-tools \ alsa-state \ fsl-alsa-plugins \ i2c-tools \ firmware-imx-vpu-imx6d \ "
-
Glad you found out and thanks for sharing !
I'd check that with the plugin author/freescale community