我将带封面的 mp3 媒体设置为QMediaPlayer
,我调用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();
我不明白为什么。有人可以给我任何建议吗?