hello,
i am developing a radio which gets music from the net (as an .m3u file ), and i have a problem about qmediaplayer. according to my code player needs to get music from the url which is given in setmedia().
i checked in my code player is available but it never be available. so the m3u file not play in my app.
here is the code
#include "QDebug"
#include "QTimer"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
player = new QMediaPlayer(this);
// owned by PlaylistModel
playlist = new QMediaPlaylist();
player->setMedia(QMediaContent(QUrl("http://www.babylon.com.tr/iphone/radyo/listen.m3u")));
player->setPlaylist(playlist);
QTimer *o=new QTimer();
o->start(100);
connect(o,SIGNAL(timeout()),this , SLOT(asd()));
qDebug()<<player->isAvailable();



}
void MainWindow::asd(){
qDebug()<<player->isAvailable();
if (player->isAudioAvailable()){
player->play();
qDebug()<<player->isAvailable();}
}
the timer is used for to understand if the player is downloading the stream ( m3u) but it is not became available.
do you have an idea about my problem? what i am doing wrong ? if my way completely wrong how can i run a m3u file on my qt app?
thanks a lot..
Oruc