Does QMediaPlayer work with URLs in QT 4.7.0 and QT mobility 1.1?



  • I am trying to play the streams from Internet Radio servers on Symbian handsets and I used the QMediaPlayer API for the same. However it is not giving any error and audio is also not being played. Please do let me know if anyone has able to play the streams using QMediaPlayer.

    @
    QMediaPlayer *player = new QMediaPlayer(this);
    player->setMedia(QUrl("http://localhost/TheComedyChannel.mp3"));
    player->setVolume(50);
    player->play();
    qDebug() << player->metaData(QtMultimediaKit::SampleRate);
    int err = player->error();
    qDebug() << "Error : " << err;
    QMediaPlayer *player = new QMediaPlayer(this);
    player->setMedia(QUrl("http://localhost/TheComedyChannel.mp3"));
    player->setVolume(50);
    player->play();
    qDebug() << player->metaData(QtMultimediaKit::SampleRate);
    int err = player->error();
    qDebug() << "Error : " << err;
    @

    [EDIT: code formatting, use @-Tags, Volker]



  • hi gajendra, could you enclose the code in @ tags



  • [EDIT: deleted double content. Please use the edit link on the right of your post to change formatting, Volker]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.