somnathbanik
12th November 2010, 10:40
Hi,
I am trying to stream RTSP link
I tried this code but not working, but the same code is working for other file streaming link wma, mp3, etc.
Here is the code
void MainWindow::on_pushButton_clicked()
{
QString url = "rtsp://rm.bbc.co.uk/radio2/r2online_id.rm";
QWidget *dummy = new QWidget();
dummy->setDisabled(true);
Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(dummy);
Phonon::createPath(mediaObject, videoWidget);
Phonon::MediaSource source = Phonon::MediaSource(url);
mediaObject->setCurrentSource(source);
mediaObject->play();
}
Please suggest me.
I am trying to stream RTSP link
I tried this code but not working, but the same code is working for other file streaming link wma, mp3, etc.
Here is the code
void MainWindow::on_pushButton_clicked()
{
QString url = "rtsp://rm.bbc.co.uk/radio2/r2online_id.rm";
QWidget *dummy = new QWidget();
dummy->setDisabled(true);
Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(dummy);
Phonon::createPath(mediaObject, videoWidget);
Phonon::MediaSource source = Phonon::MediaSource(url);
mediaObject->setCurrentSource(source);
mediaObject->play();
}
Please suggest me.