Results 1 to 4 of 4

Thread: Determining playable media formats in qtmultimedia

  1. #1
    Join Date
    Feb 2010
    Location
    Wokingham, United Kingdom
    Posts
    36
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Determining playable media formats in qtmultimedia

    Hi all,
    I would like to write a function to determine which media formats can be played.
    I thought about using QMediaPlayer::supportedMimeTypes, however the docs say this method is depreciated.
    Is there any other way in qt or would i have to dig into kde frameworks/Windows Media apis for this.

    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Determining playable media formats in qtmultimedia

    Looks like this was deprecated because it can depend on the output device.

    See QAudioDeviceInfo::availableDevice() and QAudioDeviceInfo::supportedCodecs().

    Haven't checked if there are similar classes for Video or how they are called.

    Cheers,
    _

    P.S.: in lots of cases it can be helpful to check how a deprecated function is implemented. Often this gives hints on alternatives.
    Doesn't fully help here since apparently the current implementation depends on non-public API
    https://code.woboq.org/qt5/qtmultime...agsINS_4FlagEE
    and
    https://code.woboq.org/qt5/qtmultime...r.cpp.html#525
    Last edited by anda_skoa; 24th March 2019 at 19:22.

  3. #3
    Join Date
    Feb 2010
    Location
    Wokingham, United Kingdom
    Posts
    36
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Determining playable media formats in qtmultimedia

    Thanks for the reply.
    QAudioDeviceInfo::supportedCodecs() returns only the pcm codec for some reason.
    I could use QMimeDatabase but I'm unsure how well that works on Windows. Or macos for that matter.
    Oh well more Google fu required

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Determining playable media formats in qtmultimedia

    In any case the QMediaPlayer::supportedMimeTypes() will at least continue to work until Qt6, at which point there is likely documentation what to port this call to.

    Cheers,
    _

Similar Threads

  1. Replies: 0
    Last Post: 21st December 2012, 17:56
  2. making qml playable
    By kito in forum Qt Quick
    Replies: 2
    Last Post: 5th December 2012, 06:42
  3. How to play various media formats in Qmediaplayer
    By S P in forum Qt Programming
    Replies: 0
    Last Post: 1st June 2010, 14:28
  4. Human-Human playable game over Internet
    By A.H.M. Mahfuzur Rahman in forum KDE Forum
    Replies: 0
    Last Post: 2nd August 2009, 04:26
  5. Seekable media formats
    By Mari in forum Qt Programming
    Replies: 2
    Last Post: 6th August 2008, 11:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.