im trying to use Qt library QtMultiMedia to play music. I want it to support .flac format as well. I'm running Windows 8.1, i installed flac codecs from http://xiph.org/dshow/ . BTW it works perfectly with mp3s .
Sample code:
QMediaPlaylist plst;
plst.addMedia(QUrl::fromLocalFile("path/file.flac"));
QMediaPlayer pl;
pl.setPlaylist(plst);
pl.play();
It does not play anything.
I tried it without QMediaPlaylist and it worked...
I tested you code and it didn't work... even with absolute Path.
MAYBE OPTIONAL!!! ==>
I got a gstreamer error message which I inspected and ended up in learning gstreamer... even more error messages with 0.10 and 1.0. So I installed everything depending on gstreamer (both versions) and with the last update I was finally able to play sound in both versions
<== MAYBE OPTIONAL END
Your code still didn't work. So I compared...
I used pointers!
Now it works! (don't ask me why...).
To sum it up: Pointers and Absolute Path [maybe gstreamer-plugins...]
This is only a solution for Debian...
Can you tell me if it works in Windows?
How did you solve it?
If you close the application while still playing you get a SegFault.