void GMPDecryptorParent::Decrypt(uint32_t aId, const CryptoSample& aCrypto, const nsTArray<uint8_t>& aBuffer) { LOGV(("GMPDecryptorParent[%p]::Decrypt(id=%d)", this, aId)); if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); return; } // Caller should ensure parameters passed in are valid. MOZ_ASSERT(!aBuffer.IsEmpty()); if (aCrypto.mValid) { GMPDecryptionData data(aCrypto.mKeyId, aCrypto.mIV, aCrypto.mPlainSizes, aCrypto.mEncryptedSizes, aCrypto.mSessionIds); Unused << SendDecrypt(aId, aBuffer, data); } else { GMPDecryptionData data; Unused << SendDecrypt(aId, aBuffer, data); } }
void GMPDecryptorParent::Decrypt(uint32_t aId, const mp4_demuxer::CryptoSample& aCrypto, const nsTArray<uint8_t>& aBuffer) { if (!mIsOpen) { NS_WARNING("Trying to use a dead GMP decrypter!"); return; } // Caller should ensure parameters passed in are valid. MOZ_ASSERT(!aBuffer.IsEmpty() && aCrypto.valid); GMPDecryptionData data(aCrypto.key, aCrypto.iv, aCrypto.plain_sizes, aCrypto.encrypted_sizes); unused << SendDecrypt(aId, aBuffer, data); }