How to play audio in qt multimedia? I very tired!
-
I try to force work a qt multimedia at 2 days, but it not work. My program has that simple code
@QUrl url;
QString s = "http://host.net/some.mp3"; url.setUrl(s); QMediaPlayer audio_player; audio_player.setMedia(QMediaContent(url)); audio_player.play();@
I try install Ubuntu 12.04, 14.04, 14.10, Debian 7.8, Debian Jessie, Fedora 21 and Qt 4.8.0, Qt 5.0.2, 5.3.2, Qt 5.4.0, bot on all it this code don't work! Always in output show this message:
@GLib-GObject-WARNING **: invalid cast from
WebKitWebSrc' to
GstBaseSrc'** CRITICAL **: gst_base_src_is_live: assertion `GST_IS_BASE_SRC (src)' failed@
I install ubuntu-restricted-extras, ffmpeg, gstreamer devel and other many libraries, but it still not work.
How to make it work?