我将封面设置为QMediaPlayer
的mp3媒体,我调用QMediaPlayer::isMetaDataAvailable()
然后返回true,然后调用QMediaPlayer::availableMetaData()
,然后返回:
("Author", "AverageLevel", "Description", "PeakValue", "Title", "WM/AlbumArtist", "WM/AlbumTitle", "WM/Composer", "WM/ContentGroupDescription", "WM/Genre", "WM/Picture", "WM/Track", "WM/TrackNumber", "WM/Year")
如果我打电话给例如QMediaPlayer::metaData(QMediaMetaData::Title).toString()
,它会返回正确的标题。
但由于某种原因,以上所有都只会让空虚回归:
qDebug()<< player->metaData(QMediaMetaData::CoverArtImage).toString();
qDebug()<< player->metaData(QMediaMetaData::CoverArtUrlLarge).toString();
qDebug()<< player->metaData(QMediaMetaData::CoverArtUrlLarge).toString();
qDebug()<< player->metaData(QMediaMetaData::CoverArtUrlSmall).toString();
qDebug()<< player->metaData(QMediaMetaData::PosterImage).toString();
qDebug()<< player->metaData(QMediaMetaData::PosterUrl).toString();
我不明白为什么。有人可以给我任何建议吗?