added abbreviation for Opus in OGG
This commit is contained in:
parent
240e7d0b42
commit
188e930acd
|
@ -674,6 +674,14 @@ const char *MediaFileInfo::containerFormatAbbreviation() const
|
||||||
unsigned int version = 0;
|
unsigned int version = 0;
|
||||||
switch(m_containerFormat) {
|
switch(m_containerFormat) {
|
||||||
case ContainerFormat::Ogg:
|
case ContainerFormat::Ogg:
|
||||||
|
// check whether only Opus tracks are present
|
||||||
|
version = static_cast<unsigned int>(GeneralMediaFormat::Opus);
|
||||||
|
for(const auto &track : static_cast<OggContainer *>(m_container.get())->tracks()) {
|
||||||
|
if(track->format().general != GeneralMediaFormat::Opus) {
|
||||||
|
version = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
case ContainerFormat::Matroska:
|
case ContainerFormat::Matroska:
|
||||||
case ContainerFormat::Mp4:
|
case ContainerFormat::Mp4:
|
||||||
mediaType = hasTracksOfType(MediaType::Video) ? MediaType::Video : MediaType::Audio;
|
mediaType = hasTracksOfType(MediaType::Video) ? MediaType::Video : MediaType::Audio;
|
||||||
|
|
|
@ -238,13 +238,18 @@ const char *containerFormatAbbreviation(ContainerFormat containerFormat, MediaTy
|
||||||
default:
|
default:
|
||||||
return "mp4";
|
return "mp4";
|
||||||
}
|
}
|
||||||
case ContainerFormat::Ogg: return "ogg";
|
case ContainerFormat::Ogg:
|
||||||
switch(mediaType) {
|
switch(mediaType) {
|
||||||
case MediaType::Video:
|
case MediaType::Video:
|
||||||
return "ogv";
|
return "ogv";
|
||||||
|
default:
|
||||||
|
switch(version) {
|
||||||
|
case static_cast<unsigned int>(GeneralMediaFormat::Opus):
|
||||||
|
return "opus";
|
||||||
default:
|
default:
|
||||||
return "ogg";
|
return "ogg";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case ContainerFormat::PhotoshopDocument: return "psd";
|
case ContainerFormat::PhotoshopDocument: return "psd";
|
||||||
case ContainerFormat::Png: return "png";
|
case ContainerFormat::Png: return "png";
|
||||||
case ContainerFormat::PortableExecutable: return "exe";
|
case ContainerFormat::PortableExecutable: return "exe";
|
||||||
|
|
Loading…
Reference in New Issue