Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116779

FFmpeg backend: GUI thread freezes when initializing an network source

    XMLWordPrintable

Details

    • 4b51aa786 (dev), 53768801f (dev), b5b8de410 (6.6), 20fe4dc06 (6.6), 3de6d08af (tqtc/lts-6.5), 40356de19 (dev), 3cbf8c22c (6.6), ecdf1f340 (dev), 5c90b355d (6.6), 512ae4720 (tqtc/lts-6.5), d20e2479c (tqtc/lts-6.5), c291c5027 (tqtc/lts-6.5)

    Description

      Code

      import QtQuick
      import QtMultimedia
      import QtQuick.Controls.Fusion
      
      Window {
          id: root
          width: 800
          height: 600
          visible: true
          title: `${video.source} (${video.playbackState})`
      
          Video {
              id: video
              anchors.fill: parent
          }
          Column {
              Button {
                  text: "Load"
                  onClicked: video.source = "rtsp://google.com/stream" // Invalid URL causes GUI to freeze for 5s
                  // onClicked: video.source = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" // Valid URL causes a shorter (but still significant) freeze
               }
              Button {
                  text: video.playbackState === MediaPlayer.StoppedState ? "Play" : "Stop"
                  onClicked: {
                      if (video.playbackState === MediaPlayer.StoppedState)
                          video.play()
                      else
                          video.stop()
                  }
              }
              ProgressBar {
                  width: root.width
                  NumberAnimation on value {
                      loops: Animation.Infinite
                      duration: 1000
                      from: 0.0
                      to: 1.0
                  }
              }
          }
      }
      

       

      Steps to reproduce

      1. Run the code above
      2. Click "Load"

       

      Outcomes

      From the moment you click "Load" until the URL appears on the title bar (or until the connection attempt times out), the GUI is completely unresponsive: Progress bar freezes; buttons don't respond to mouse hover/click events; window cannot be resized. This freeze should not happen – connections should occur in the background.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-116779
          # Subject Branch Project Status CR V

          Activity

            People

              johanseg Jøger Hansegård
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: