diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp index 7133ec197c7d..30dc6cc2c2f7 100644 --- a/dom/media/fmp4/MP4Decoder.cpp +++ b/dom/media/fmp4/MP4Decoder.cpp @@ -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() diff --git a/dom/media/fmp4/MP4Decoder.h b/dom/media/fmp4/MP4Decoder.h index 0bf8b9959bbc..ad5fba7b5440 100644 --- a/dom/media/fmp4/MP4Decoder.h +++ b/dom/media/fmp4/MP4Decoder.h @@ -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();