Closed Bug 1083658 Opened 6 years ago Closed 5 years ago

Send EME downscaling notification from CDM to JS

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox37 --- fixed
firefox38 --- fixed

People

(Reporter: cpeterson, Assigned: jwwang)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

If a CDM loses authority to decode HD video, it downscales HD input to SD output. The CDM needs a way to notify the web app so it can save bandwidth by switching from HD to SD stream.
Summary: Send EME downscaling notification from CDM to web app → Send EME downscaling notification from CDM to JS
cpearce says: Sounds like the preferred solution is to have MediaKeySession.getUsableKeyIds return info about whether downscaling is required for a particular key and send a keyschange event when downscaling happens.
These bugs are fit and finish issues that might block EME uplift to Aurora.
Blocks: eme-m3
No longer blocks: eme-m3
Basically here we need to update MediaKeySession.usableKeyIds to be keyStatuses instead, and ensure that the CDM can use that API to report downscaling. We may need to add something to the MediaKeyStatus enumeration.

We need to sync up with Adobe before we implement this.
Can we associate resolution with MediaKeyStatus? "output-not-allowed" doesn't really tell much.
JW: would you be able to take this? I'm being sidetracked helping out with MSE for the next couple of weeks.

I think we should go ahead and include a "downscaled" key status, as is being proposed here, even though it's not made it into the spec yet:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25092
Flags: needinfo?(jwwang)
sure.
Flags: needinfo?(jwwang)
Assignee: nobody → jwwang
It looks like MediaKeySession.keyStatuses is not implemented at all. Is there already a bug for that?

[1] https://w3c.github.io/encrypted-media/#widl-MediaKeySession-keyStatuses
Flags: needinfo?(cpearce)
Yes. This bug covers implementing keyStatuses. :)
Flags: needinfo?(cpearce)
Depends on: 1121332
Add kGMPOutputDownscaled and kGMPInternalError to GMPMediaKeyStatus.
Attachment #8557542 - Flags: review?(cpearce)
Comment on attachment 8557542 [details] [diff] [review]
1083658_support_downscaling_notification-v1.patch

Review of attachment 8557542 [details] [diff] [review]:
-----------------------------------------------------------------

Excellent. Thank! This can land right? Would be good if we can get this into Sunday night PST's Nightly.
Attachment #8557542 - Flags: review?(cpearce) → review+
https://hg.mozilla.org/mozilla-central/rev/ae8394c92f28
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Attached patch Beta patchSplinter Review
Patch for beta branch as part of EME platform uplift.
Comment on attachment 8572336 [details] [diff] [review]
Beta patch

Requesting retroactive approval for Beta landing as part of EME platform uplift.
Attachment #8572336 - Flags: approval-mozilla-beta?
Comment on attachment 8572336 [details] [diff] [review]
Beta patch

Previously approved as part of the EME platform landing on Beta.
Attachment #8572336 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.