Bug 1827266 - support AV1 for MFCDM. r=media-playback-reviewers,jolin

Differential Revision: https://phabricator.services.mozilla.com/D211584
This commit is contained in:
alwu 2024-05-25 02:15:55 +00:00
parent b7c7e03438
commit 76e53e7c22

View File

@ -824,7 +824,9 @@ void MFCDMParent::GetCapabilities(const nsString& aKeySystem,
if (aCodec.Equals(KeySystemConfig::EME_CODEC_HEVC)) {
return "hev1"_ns;
}
// TODO : support AV1?
if (aCodec.Equals(KeySystemConfig::EME_CODEC_AV1)) {
return "av01"_ns;
}
if (aCodec.Equals(KeySystemConfig::EME_CODEC_AAC)) {
return "mp4a"_ns;
}
@ -841,13 +843,10 @@ void MFCDMParent::GetCapabilities(const nsString& aKeySystem,
return "none"_ns;
};
// TODO : add AV1
static nsTArray<KeySystemConfig::EMECodecString> kVideoCodecs({
KeySystemConfig::EME_CODEC_H264,
KeySystemConfig::EME_CODEC_VP8,
KeySystemConfig::EME_CODEC_VP9,
KeySystemConfig::EME_CODEC_HEVC,
});
static nsTArray<KeySystemConfig::EMECodecString> kVideoCodecs(
{KeySystemConfig::EME_CODEC_H264, KeySystemConfig::EME_CODEC_VP8,
KeySystemConfig::EME_CODEC_VP9, KeySystemConfig::EME_CODEC_HEVC,
KeySystemConfig::EME_CODEC_AV1});
// Remember supported video codecs.
// It will be used when collecting audio codec and encryption scheme