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

no method for getting dimensions of video

XMLWordPrintable

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

      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"

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes