[Solved] Qt 5 multimedia : how to check if media has video ?
-
Hi,
As said in the title, how can i know if loaded media with QMediaPlayer is a simple audio file or a video file (without testing the extension file) ? More exactly, i'm looking for the equivalent for Phonon::MediaObject::hasVideo() method !
I'm using Qt 5.2.Thanks.
-
I had just to wait the media status be QMediaPlayer::LoadedMedia (instead of QMediaPlayer::LoadingMedia) and then test the video availability with QMediaPlayer::isVideoAvailable().