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

no method for getting dimensions of video

    XMLWordPrintable

Details

    • All
    • 3ab77c90c4b199fdb09184ba8347872b38925657 (qt/qtmultimedia/dev) 0350374dcdf7e13478f6696c940b8b86fc67c2af (qt/qtmultimedia/6.2)

    Description

      in Qt5, one can, behind the scenes, create a temp QMediaPlayer and a QGraphicsVideoItem, get its surface, and hook in to surfaceFormatChanged() signal, start playback (secretly), and wait for the signal, then grab the dimensions.

      this is not possible in Qt6.

      i've tried hooking into all these signals:

      QVideoSink::newVideoFrame()

      QMediaPlayer::mediaStatusChanged(), hasVideoChanged(), metaDataChanged(), videoOutputChanged()

      but either they don't get called within 5 seconds, OR they get called but the dimensions of the QVideoSink are still (0, 0).

      Please provide a method to get the dimensions of a video without having to play it in a window.

       

      more info:

      https://forum.qt.io/topic/128381/qt6-porting-guidance-qmediaplayer

      see the section "Question 2"

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            davecotter David M. Cotter
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes