Closed Bug 1139270 Opened 5 years ago Closed 5 years ago
[EME] Setting a key to output-downscaled causes it to not be playable
When a CDM/GMP sets a keyId to be output-downscaled, we're supposed to still use the CDM to decrypt content for that key. We're not doing that however, we're stopping sending input to the CDM. I think this is because we only send input to the CDM if the key is in usable state; we should instead send if the key is usable *or* output-downscaled. JW: This is blocking Adobe, can you take it please?
To be clear, the fail case/STR is: CDM plays video encrypted with a keyId, during playback sets keyId as "output-downscaled" status, and Gecko refuses to send more input. Gecko should still send input for "output-downscaled" status keyIds.
Not sure if EMEMediaDataDecoderProxy::Input() is the right place to look at? It looks like we can return true for CDMCaps::AutoLock::IsKeyUsable() when a key is either kGMPUsable or kGMPOutputDownscaled so that SamplesWaitingForKey won't hold samples from Input().
I suspect that'd do it. You should test it; just temporarily modify set a timer in gmp-clearkey which marks keys as output-downscaled.
A test case to send "output-downscaled" during playback.
test steps: 1. apply 1139270_testcase.patch 2. ./mach run http://people.mozilla.org/~cpearce/mse-clearkey/ You will see video stuck after a while.
Mark kGMPOutputDownscaled keys "able to decrypt" so we can still decrypt samples with keys that are kGMPOutputDownscaled.
Attachment #8572505 - Flags: review?(cpearce)
Comment on attachment 8572505 [details] [diff] [review] 1139270_handle_output_downscaled-v1.patch Review of attachment 8572505 [details] [diff] [review]: ----------------------------------------------------------------- We should get a testcase somehow so that we don't regress this, but first let's land this!
Attachment #8572505 - Flags: review?(cpearce) → review+
Comment on attachment 8572505 [details] [diff] [review] 1139270_handle_output_downscaled-v1.patch Approval Request Comment [Feature/regressing bug #]: EME [User impact if declined]: EME videos could stop playback mid stream. [Describe test coverage new/current, TreeHerder]: Local manual testing performed. Currently this only affects Adobe's EME plugin, and it's difficult to write a standalone test. [Risks and why]: Low, this patch makes us more likely to play, not less likely. [String/UUID change made/needed]: None.
Comment on attachment 8572505 [details] [diff] [review] 1139270_handle_output_downscaled-v1.patch This change is isolated to EME and doesn't look to pose a risk to other video playback paths. Beta+ Aurora+
You need to log in before you can comment on or make changes to this bug.