Closed Bug 1180070 Opened 10 years ago Closed 10 years ago

[EME] Use MediaPromise for CDMProxy::Decrypt

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

Details

Attachments

(1 file)

In bug 1171257 Sotaro discovered that we can receive a decrypt result after flushing, resulting in test failures. When an EMEDecryptor flushes, we need to also ensure that the decrypts we're waiting on are flushed. We can use MediaPromises to achieve this; we just need to disconnect all promises on flush or drain.
Use MediaPromises for CDMProxy::Decrypt, so that we can disconnect the promises we're waiting on when the EMEDecryptor flushes or drains. This means we can't get a decrypt result that was in progress before a flush after the flush completes. https://treeherder.mozilla.org/#/jobs?repo=try&revision=1efc5599cf23 Sotaro: Can you please check that this still fixes your bug? Thanks.
Attachment #8629172 - Flags: review?(jwwang)
Attachment #8629172 - Flags: feedback?(sotaro.ikeda.g)
Comment on attachment 8629172 [details] [diff] [review] Patch: Use MediaPromises for CDMProxy::Decrypt Review of attachment 8629172 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp @@ +73,2 @@ > MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn()); > + MOZ_ASSERT(aDecrypted.mSample); Is it true that aDecrypted.mSample is non-null whether aDecrypted.mStatus returns an error or not?
Attachment #8629172 - Flags: review?(jwwang) → review+
Comment on attachment 8629172 [details] [diff] [review] Patch: Use MediaPromises for CDMProxy::Decrypt Review of attachment 8629172 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/platforms/agnostic/eme/EMEDecoderModule.cpp @@ +73,2 @@ > MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn()); > + MOZ_ASSERT(aDecrypted.mSample); Yes. We used to make mSample null in CDMProxy::DecryptJob::PostResult() in the error case, but I removed that in this patch.
Comment on attachment 8629172 [details] [diff] [review] Patch: Use MediaPromises for CDMProxy::Decrypt From the following, the test failures was fixed by the patch. https://treeherder.mozilla.org/#/jobs?repo=try&revision=b4c3aaf7ce43
Attachment #8629172 - Flags: feedback?(sotaro.ikeda.g) → feedback+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: