mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1654397 - Set crypto scheme when initializing video decoder CDM. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D88038
This commit is contained in:
parent
a58061ddd7
commit
aaf9237935
@ -71,6 +71,20 @@ RefPtr<MediaDataDecoder::InitPromise> ChromiumCDMVideoDecoder::Init() {
|
||||
}
|
||||
config.mImageWidth() = mConfig.mImage.width;
|
||||
config.mImageHeight() = mConfig.mImage.height;
|
||||
config.mEncryptionScheme() = cdm::EncryptionScheme::kUnencrypted;
|
||||
switch (mConfig.mCrypto.mCryptoScheme) {
|
||||
case CryptoScheme::None:
|
||||
break;
|
||||
case CryptoScheme::Cenc:
|
||||
config.mEncryptionScheme() = cdm::EncryptionScheme::kCenc;
|
||||
break;
|
||||
case CryptoScheme::Cbcs:
|
||||
config.mEncryptionScheme() = cdm::EncryptionScheme::kCenc;
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("Should not have unrecognized encryption type");
|
||||
break;
|
||||
}
|
||||
|
||||
RefPtr<gmp::ChromiumCDMParent> cdm = mCDMParent;
|
||||
VideoInfo info = mConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user