Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

Video Playback with QMediaPlayer in Qt QNX



  • Hello,

    I am really new to Qt development. Now, I am trying to do video playback with Qt for QNX,x86 platform. Below is my code. When I test those codes in windows, the video can play immediately as a loop. But, I have to wait about 30 seconds to play the video again in QNX.

    QMediaPlaylist *playlist = new QMediaPlaylist(this);
    playlist->addMedia(QUrl::fromLocalFile("D:\test.mp4"));
    playlist->addMedia(QUrl::fromLocalFile("D:\test.mp4"));
    playlist->addMedia(QUrl::fromLocalFile("D:\test.mp4"));
    playlist->setCurrentIndex(0);
    playlist->setPlaybackMode(playlist->Loop);

    QMediaPlayer *player = new QMediaPlayer(this);
    player->setPlaylist(playlist);
    
    QVideoWidget *videoWidget = new QVideoWidget(this);
    player->setVideoOutput(videoWidget);
    videoWidget->setGeometry(80,50,600,300);
    videoWidget->show();
    player->play();
    

    Any of you encounter this issues before ?
    Do you have any suggestions to solve this kind of problems?

    Thank you so much.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    QNX support is an Enterprise feature, you should contact the Qt Company through your Qt Account Support Center.