Bug 1314858 - Add MP4Decoder::IsAAC. r=gerald

We have this for H.264, so we may as well have it for AAC too.

MozReview-Commit-ID: 2k64ANJGUNN

--HG--
extra : rebase_source : 6fe2543788afd26682d31c0ec45b9ac80e501ab1
This commit is contained in:
Chris Pearce 2016-11-02 09:43:45 +13:00
Родитель a7baaddbf0
Коммит 50e79d67a0
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -168,6 +168,13 @@ MP4Decoder::IsH264(const nsACString& aMimeType)
aMimeType.EqualsLiteral("video/avc");
}
/* static */
bool
MP4Decoder::IsAAC(const nsACString& aMimeType)
{
return aMimeType.EqualsLiteral("audio/mp4a-latm");
}
/* static */
bool
MP4Decoder::IsEnabled()

Просмотреть файл

@ -40,6 +40,11 @@ public:
// space matters.
static bool IsH264(const nsACString& aMimeType);
// Return true if aMimeType is a one of the strings used by our demuxers to
// identify AAC. Does not parse general content type strings, i.e. white
// space matters.
static bool IsAAC(const nsACString& aMimeType);
// Returns true if the MP4 backend is preffed on.
static bool IsEnabled();