QMediaPlaylist - display image with custom timeout / elapsed time



  • Hello
    I work on QT5.2.1 (windows 8.1)
    I try create simple slider to video and images

    @

    playlist = new QMediaPlaylist;
    player = new QMediaPlayer;
    videoWidget = new QVideoWidget;

    playlist->addMedia(QUrl("video1.mp4")); // duration 15secound
    playlist->addMedia(QUrl("image1.jpg")); // I would like 10 seconds
    playlist->addMedia(QUrl("video2.mp4")); // duration 20secound
    playlist->addMedia(QUrl("image2.jpg")); // I would like 10 seconds

    playlist->setPlaybackMode(QMediaPlaylist::Loop);
    player->setPlaylist(playlist);
    player->setVideoOutput(videoWidget);
    player->play();

    @

    When i run this program i see video1.mp4 (15 secound) after i see image1.jpg but only 0.5secound and after
    video2.mp4 (20 secound) and image2.jpg (only 0.5secound)

    How can i set custom duration for image1.jpg and image2.jpg??


Log in to reply
 

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