Phonon can't get Metadata on Mac

拟墨画扇 提交于 2020-01-05 07:31:08

问题


I'm using Phonon to get meta data about songs. On Linux everything seems to work just fine. Here's the code that get's called once the metadata is ready:

QMultiMap<QString, QString> metaData = libAddMetaDataObject->metaData();

QString fileName = libAddMetaDataObject->currentSource().fileName();
QString songName = metaData.value("TITLE");
QString artistName = metaData.value("ARTIST");
QString albumName = metaData.value("ALBUM");
qint64 duration = libAddMetaDataObject->totalTime() / 1000;

if(songName.isNull()){
  DEBUG_MESSAGE("Null Title value")
  songName = getUnknownTitle();
}

if(artistName.isNull()){
  DEBUG_MESSAGE("Null artist value")
  artistName = getUnknownArtist();
}

if(albumName.isNull()){
  DEBUG_MESSAGE("Null album value")
  albumName = getUnknownAlbum();
} 

When I'm on my Mac, artist name and album name are ALWAYS null. Does anyone know why this is happening? Is there an issue with the Phonon-Quicktime backend?


回答1:


In case anyone is still interested in this, the best I can tell is that the phonon_qt7 backend is deficient in this area (is it just me or do all the phonon backends seem to be horribly deficient in one area or another?). My solution was just to use taglib for metadata retrieval.



来源:https://stackoverflow.com/questions/9959576/phonon-cant-get-metadata-on-mac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!