Bug 1342822 - Backed out changeset 70bc7d4e8512 (bug 1338924). r=gerald

MozReview-Commit-ID: DXGgfMMghOD

--HG--
extra : rebase_source : e5d329122754dfab6750ff2aedadc1f65a52f0f8
This commit is contained in:
Chris Pearce 2017-02-27 13:58:27 +13:00
parent 892e18f12e
commit 6425456721
11 changed files with 14 additions and 24 deletions

View File

@ -63,8 +63,7 @@ public:
}
void Decrypt(GMPBuffer* aBuffer,
GMPEncryptedBufferMetadata* aMetadata,
uint64_t aDurationUses) override
GMPEncryptedBufferMetadata* aMetadata) override
{
}

View File

@ -696,7 +696,7 @@ GMPCDMProxy::gmp_Decrypt(RefPtr<DecryptJob> aJob)
nsTArray<uint8_t> data;
data.AppendElements(aJob->mSample->Data(), aJob->mSample->Size());
mCDM->Decrypt(aJob->mId, aJob->mSample->mCrypto, data, aJob->mSample->mDuration);
mCDM->Decrypt(aJob->mId, aJob->mSample->mCrypto, data);
mDecryptionJobs.AppendElement(aJob.forget());
}

View File

@ -332,8 +332,7 @@ GMPDecryptorChild::RecvSetServerCertificate(const uint32_t& aPromiseId,
mozilla::ipc::IPCResult
GMPDecryptorChild::RecvDecrypt(const uint32_t& aId,
InfallibleTArray<uint8_t>&& aBuffer,
const GMPDecryptionData& aMetadata,
const uint64_t& aDurationUsecs)
const GMPDecryptionData& aMetadata)
{
if (!mSession) {
return IPC_FAIL_NO_REASON(this);
@ -347,7 +346,7 @@ GMPDecryptorChild::RecvDecrypt(const uint32_t& aId,
GMPEncryptedBufferDataImpl* metadata = new GMPEncryptedBufferDataImpl(aMetadata);
buffer->SetMetadata(metadata);
mSession->Decrypt(buffer, metadata, aDurationUsecs);
mSession->Decrypt(buffer, metadata);
return IPC_OK();
}

View File

@ -103,8 +103,7 @@ private:
mozilla::ipc::IPCResult RecvDecrypt(const uint32_t& aId,
InfallibleTArray<uint8_t>&& aBuffer,
const GMPDecryptionData& aMetadata,
const uint64_t& aDurationUsecs) override;
const GMPDecryptionData& aMetadata) override;
// Resolve/reject promise on completion.
mozilla::ipc::IPCResult RecvSetServerCertificate(const uint32_t& aPromiseId,

View File

@ -173,8 +173,7 @@ GMPDecryptorParent::SetServerCertificate(uint32_t aPromiseId,
void
GMPDecryptorParent::Decrypt(uint32_t aId,
const CryptoSample& aCrypto,
const nsTArray<uint8_t>& aBuffer,
uint64_t aDurationUsecs)
const nsTArray<uint8_t>& aBuffer)
{
LOGV(("GMPDecryptorParent[%p]::Decrypt(id=%d)", this, aId));
@ -193,10 +192,10 @@ GMPDecryptorParent::Decrypt(uint32_t aId,
aCrypto.mEncryptedSizes,
aCrypto.mSessionIds);
Unused << SendDecrypt(aId, aBuffer, data, aDurationUsecs);
Unused << SendDecrypt(aId, aBuffer, data);
} else {
GMPDecryptionData data;
Unused << SendDecrypt(aId, aBuffer, data, aDurationUsecs);
Unused << SendDecrypt(aId, aBuffer, data);
}
}

View File

@ -61,8 +61,7 @@ public:
void Decrypt(uint32_t aId,
const CryptoSample& aCrypto,
const nsTArray<uint8_t>& aBuffer,
uint64_t aDurationUsecs) override;
const nsTArray<uint8_t>& aBuffer) override;
void Close() override;

View File

@ -55,8 +55,7 @@ public:
virtual void Decrypt(uint32_t aId,
const mozilla::CryptoSample& aCrypto,
const nsTArray<uint8_t>& aBuffer,
uint64_t aDurationUsecs) = 0;
const nsTArray<uint8_t>& aBuffer) = 0;
virtual void Close() = 0;
};

View File

@ -46,8 +46,7 @@ child:
async Decrypt(uint32_t aId,
uint8_t[] aBuffer,
GMPDecryptionData aMetadata,
uint64_t aDurationUsecs);
GMPDecryptionData aMetadata);
async DecryptingComplete();

View File

@ -324,8 +324,7 @@ public:
// is deleted. Don't forget to call Decrypted(), as otherwise aBuffer's
// memory will leak!
virtual void Decrypt(GMPBuffer* aBuffer,
GMPEncryptedBufferMetadata* aMetadata,
uint64_t aDurationUsecs) = 0;
GMPEncryptedBufferMetadata* aMetadata) = 0;
// Called when the decryption operations are complete.
// Do not call the GMPDecryptorCallback's functions after this is called.

View File

@ -160,8 +160,7 @@ WidevineDecryptor::SetServerCertificate(uint32_t aPromiseId,
void
WidevineDecryptor::Decrypt(GMPBuffer* aBuffer,
GMPEncryptedBufferMetadata* aMetadata,
uint64_t aDurationUsecs)
GMPEncryptedBufferMetadata* aMetadata)
{
if (!mCallback) {
CDM_LOG("WidevineDecryptor::Decrypt() this=%p FAIL; !mCallback", this);

View File

@ -64,8 +64,7 @@ public:
uint32_t aServerCertSize) override;
void Decrypt(GMPBuffer* aBuffer,
GMPEncryptedBufferMetadata* aMetadata,
uint64_t aDurationUsecs) override;
GMPEncryptedBufferMetadata* aMetadata) override;
void DecryptingComplete() override;