Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt 5.8 CPU rendering in QML for video playback
Qt 6.11 is out! See what's new in the release blog

Qt 5.8 CPU rendering in QML for video playback

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 638 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    theonlylawislove
    wrote on last edited by
    #1

    For reasons I won't explain here, I have to use the CPU to render my video. I call this static method in my main.

    QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software)
    

    Then, I have the following QML to playback video.

    VideoOutput {
        id: videoOut
        anchors.fill: parent
        source: player
    }
    
    MediaPlayer {
        id: player
        source: "file:///test.mp4"
        autoPlay: true
    }
    

    As you can guess, this doesn't work. You just see a black rectangle. If I comment out the setSceneGraphBackend call, it works.

    So my question is, how do I customize the VideoOutput element so that it works using the CPU (not GPU/OpenGL/etc)?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved