somnathbanik
20th November 2010, 11:02
hi,
1. Phonon can play the media files that can be played by Windows Media Player .
2. Phonon supports a mime type video/x-ms-asf . I checked with
void HelloMeego::checkPhononCapabilities()
{
QStringList sl=Phonon::BackendCapabilities::availableMimeTypes ();
qDebug() << sl;
}
3. This link http://www.bbc.co.uk/radio/listen/live/r5l.asx plays in Windows Media Player and has a mime type video/x-ms-asf (.asx)
4. Check this link http://support.microsoft.com/kb/288102 for .asx mime type
Now if I play this link http://www.bbc.co.uk/radio/listen/live/r5l.asx using Qt Phonon, its not playing.
Here is my code
void HelloMeego::on_pushButton_8_clicked()
{
Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
// Phonon::VideoPlayer *myPlayer= new Phonon::VideoPlayer(Phonon::VideoCategory, this);
Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(this);
Phonon::createPath(mediaObject, videoWidget);
ui->verticalLayout_2->addWidget(videoWidget);
Phonon::AudioOutput *audioOutput =
new Phonon::AudioOutput(Phonon::VideoCategory, this);
Phonon::createPath(mediaObject, audioOutput);
QString urlVideo ="http://www.bbc.co.uk/radio/listen/live/r5l.asx";
Phonon::MediaSource source = Phonon::MediaSource(urlVideo);
mediaObject->setCurrentSource(source);
mediaObject->play();
}
Please suggest me.
1. Phonon can play the media files that can be played by Windows Media Player .
2. Phonon supports a mime type video/x-ms-asf . I checked with
void HelloMeego::checkPhononCapabilities()
{
QStringList sl=Phonon::BackendCapabilities::availableMimeTypes ();
qDebug() << sl;
}
3. This link http://www.bbc.co.uk/radio/listen/live/r5l.asx plays in Windows Media Player and has a mime type video/x-ms-asf (.asx)
4. Check this link http://support.microsoft.com/kb/288102 for .asx mime type
Now if I play this link http://www.bbc.co.uk/radio/listen/live/r5l.asx using Qt Phonon, its not playing.
Here is my code
void HelloMeego::on_pushButton_8_clicked()
{
Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
// Phonon::VideoPlayer *myPlayer= new Phonon::VideoPlayer(Phonon::VideoCategory, this);
Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(this);
Phonon::createPath(mediaObject, videoWidget);
ui->verticalLayout_2->addWidget(videoWidget);
Phonon::AudioOutput *audioOutput =
new Phonon::AudioOutput(Phonon::VideoCategory, this);
Phonon::createPath(mediaObject, audioOutput);
QString urlVideo ="http://www.bbc.co.uk/radio/listen/live/r5l.asx";
Phonon::MediaSource source = Phonon::MediaSource(urlVideo);
mediaObject->setCurrentSource(source);
mediaObject->play();
}
Please suggest me.