KeineAhnung
19th August 2014, 12:21
Hi there,
I would like to load a pls file into my QMediaPlayer using QMediaPlaylist. First of all is pls supported? (I think so because I found a bug report but I am not sure)
This is my code: (source is correct. Because if the source file is a m3u it works)
AudioPlayer::AudioPlayer(QObject *parent) :
QObject(parent){
playlist = new QMediaPlaylist;
player = new QMediaPlayer;
}
void AudioPlayer::setSource(const QString &source){
qDebug() << "Loading Playlist" << source;
playlist->load(source);
if(playlist->error())
qDebug() << playlist->errorString();
else
qDebug() << "Playlist loaded";
playlist->setCurrentIndex(1);
player->setPlaylist(playlist);
}
But I get the error that I provided an empty file. Can someone tell me what the proper way is to load a pls file?
Thanks!
I would like to load a pls file into my QMediaPlayer using QMediaPlaylist. First of all is pls supported? (I think so because I found a bug report but I am not sure)
This is my code: (source is correct. Because if the source file is a m3u it works)
AudioPlayer::AudioPlayer(QObject *parent) :
QObject(parent){
playlist = new QMediaPlaylist;
player = new QMediaPlayer;
}
void AudioPlayer::setSource(const QString &source){
qDebug() << "Loading Playlist" << source;
playlist->load(source);
if(playlist->error())
qDebug() << playlist->errorString();
else
qDebug() << "Playlist loaded";
playlist->setCurrentIndex(1);
player->setPlaylist(playlist);
}
But I get the error that I provided an empty file. Can someone tell me what the proper way is to load a pls file?
Thanks!