Closed Bug 1721411 Opened 3 years ago Closed 3 years ago

[meta] Create a mechanism to configure the Clearkey CDM so we can toggle features on/off for protection query tests

Categories

(Core :: Audio/Video: GMP, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: bryce, Assigned: bryce)

References

(Blocks 1 open bug)

Details

(Keywords: meta)

It would be useful to allow for configuration of the Clearkey CDM so that we can toggle features on/off. Bug 1711912 is driving my desire for this. We want to add a new check to the CDM, but I'd prefer to only have these checks turned on for tests that use them. Having the checks be always on would complicate existing tests. This would also allow for easier additions of configurable features to the CDM in feature.

This isn't as straight forward as just having some prefs the toggle features -- the GMP process doesn't understand prefs. There are various other limitations imposed on us by the GMP and Clearkey CDM architectures.

Chromium manage this by having different keysystems supported by clearkey. These keysystems have names such as org.chromium.externalclearkey.fileiotest or org.chromium.externalclearkey.outputprotectiontest. When their Clearkey CDM is created, these names are passed to it and it decides what features to enable.

I'm not 100% on an approach yet. Using a different keysystem with the clearkey CDM would work, and is one of the nicer approaches within the cdm interface we use.

I plan to do this by passing different key systems and using those different key systems to toggle behaviour. This works well with the APIs we have available.

Making this meta so I can chunk out different tasks involved.

Keywords: meta
Summary: Create a mechanism to configure the Clearkey CDM so we can toggle features on/off → [meta] Create a mechanism to configure the Clearkey CDM so we can toggle features on/off

Some more background for the work I'm planning.

From the EME spec:

A Key System is a generic term for a decryption mechanism and/or content protection provider. Key System strings provide unique identification of a Key System. They are used by the user agent to select a CDM and identify the source of a key-related event...

I.e. gecko uses a key system to select a content decryption module (CDM) to load to handle certain kinds of content.

Some of Gecko's code currently makes the assumption that a key system to CDM mapping is 1 to 1. E.g. the org.w3.clearkey key system is handled by the clearkey CDM, and no other key systems are handled by that CDM.

However, a CDM is allowed to handle multiple key systems per the spec. There's no reason the clearkey CDM can't handle both org.w3.clearkey and some other key system com.mycompany.clearkey.

Depending on the key system used to create a CDM we can toggle on or off different behaviour and this will be useful for testing. We just need to rework the current handling to support this.

Summary: [meta] Create a mechanism to configure the Clearkey CDM so we can toggle features on/off → [meta] Create a mechanism to configure the Clearkey CDM so we can toggle features on/off for protection query tests

The current blockers on this bug fix

  • The plumbing needed for a CDM to be made aware of the key system it's being loaded for (bug 1724751).
  • Implementing a new key system for the clear key CDM that can be used to toggle behaviour (bug 1724781).

These should be sufficient to unblock bug 1711912, I'll continue work there.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.