MediaFile/MediaTrack: Use metadata to retrieve copyright
This commit is contained in:
parent
c6a23a5827
commit
9b50ad1db8
@ -197,14 +197,25 @@ BMediaFile::GetMetaData(BMessage* _data) const
|
||||
|
||||
_data->MakeEmpty();
|
||||
|
||||
return fExtractor->GetMetaData(_data);
|
||||
BMetaData* metaData = NULL;
|
||||
if (fExtractor->GetMetaData(metaData) == B_OK) {
|
||||
*_data = *metaData->Message();
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
BMediaFile::Copyright() const
|
||||
{
|
||||
return fExtractor->Copyright();
|
||||
BMetaData data;
|
||||
BString copyright;
|
||||
if (fExtractor->GetMetaData(&data) == B_OK)
|
||||
data.GetString(kCopyright, ©right);
|
||||
|
||||
return copyright.String();
|
||||
}
|
||||
|
||||
|
||||
|
@ -301,7 +301,12 @@ BMediaTrack::GetMetaData(BMessage* _data) const
|
||||
|
||||
_data->MakeEmpty();
|
||||
|
||||
return fExtractor->GetStreamMetaData(fStream, _data);
|
||||
BMetaData data;
|
||||
if (fExtractor->GetStreamMetaData(fStream, &data) != B_OK) {
|
||||
*_data = *data.Message();
|
||||
return B_OK;
|
||||
}
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user