Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QMediaPlayer : Getting information about audio streams



  • I would like to get information about the audio streams of the video loaded into QMediaPlayer.

    By searching the Qt sources, I have found that apparently to get this information, I need to access QMediaStreamsControl via this command :

    QMediaStreamsControl* streamControl = (QMediaStreamsControl*)(player->service()->requestControl(QMediaStreamsControl_iid));
    

    However, the above always returns zero.

    Does someone know why, or another way of accessing streams information ?


  • Lifetime Qt Champion

    Hi,

    Not all plugins provide all control. Which platform are you on ?

    On a side note, you should either use qobject_cast or the templated version of requestControl.



  • I'm on Windows, and other tools have no trouble accessing that information.

    But this problem is only the latest addition to a too long list of features that don't work.
    Frankly, I'm quite disappointed with the quality of Multimedia compared with other Qt components.


  • Lifetime Qt Champion

    That's not necessarily a feature that doesn't work, it might just have not been implemented yet.


Log in to reply