you have to add GStreamer to the QtMultimedia PACKAGECONFIG, e.g. by adding the following line to your local.conf:
PACKAGECONFIG_append_pn-qtmultimedia = " gstreamer010"
This makes the QML Video Players (qmlvideo/qmlvideofx) work on our custom board with Yocto 1.6.1 and Qt 5.3.1. I don't know why Freescale does not configure Qt like this in their official BSP.
However, the Qt Widget Video Player (videowidget/videographicsitem) still does not work with this configuration. I do not have any idea how to make this work. It seems as if there is no appropriate GStreamer sink available for this type of application. Has anyone managed to get Video playback work in an iMX6 from a QtWidgets application?
Freescale's imxplayer does not make use of QtMultimedia for playing videos at all. Instead, it uses the gstreamer API directly. You can see that in the fslqtapplications recipe, gstreamer is listed as a dependency there. Calling objdump on the imxplayer binary shows this dependency as well.
So yeah, Freescale, I would like to join the initial question and even ask some more:
1. Is the imxplayer source code available somewhere?
2. Why is it included in Yocto as binary at all? Is there anything special inside?
3. Why did you choose to use the GStreamer API directly instead of using QtMultimedia?
Thanks for you answering, i am trying your solution, but i did not get the mean 'QtMultimedia PACKAGECONFIG'.
Do i need add the command before bitbake. Or after compile Qt , recompile QtMultimedia.
Where i suppose put the line.
Finally, it worked for both QMediaPlayer and QML (qmlvideo/qmlvideofx) demo, I added the line into local.conf.
but got the "no qmultimedia" error for QML demo.
Then added these into local.conf.
IMAGE_INSTALL_append = " \
QML got work, and QMediaPlayer demo put the video into QGraphiceSence instead of QVideoWidget, also worked.
By the way, QMediaPlayer was able to play the video, but still got some warning about the gstreamer buffer,and the video performance was awful.
QML was pretty good.
You can find the documentation in the following links :
These examples is exactly i tried, and the media video file for testing is Mp4.
looks like "libgstmediaplayer.so" and "gstreamer" lib is necessary for project compiling.
So is there any tutorial for gstreamer?
I am using yocto project 1.8 fido edition and kernel version 3.14.28. I am running videowidget example project on sabre board and I am getting the same error "The QMediaPlayer object does not have a valid service". Did you solve the problem?