Closed Bug 1075182 Opened 11 years ago Closed 10 years ago

[EME] Make ClearKey GMP work outside of mochitests

Categories

(Core :: Audio/Video, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36
Tracking Status
firefox37 --- fixed
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: cpearce, Assigned: eflores)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

We need our regular ClearKey GMP to work in normal web content (when EME is enabled) rather than only in our mochitests.
Attached patch clearkey-package.patch (obsolete) — Splinter Review
First go. Factored out most of OpenH264Provider into GMPProvider and generalised it slightly. Still need to generalise GMPWrapper.findUpdates() and GMPInstallManager to make updates work with other GMPs, but outside scope of this bug.
Attachment #8516351 - Flags: feedback?(georg.fritzsche)
Attachment #8516351 - Flags: feedback?(bmcbride)
Comment on attachment 8516351 [details] [diff] [review] clearkey-package.patch Review of attachment 8516351 [details] [diff] [review]: ----------------------------------------------------------------- I'm not sure if introducing a new provider jsm for every GMP we add scales so well, especially with the minimal differences here that are mostly just different data. Lets wait what Blair says, but i'd rather see one GMPProvider.jsm that is parameterized from a collection of GM plugins data instead of registering/instantiating/... a new provider for every new plugin. ::: toolkit/mozapps/extensions/internal/moz.build @@ +21,5 @@ > # Don't ship unused providers on Android > if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android': > EXTRA_JS_MODULES.addons += [ > 'OpenH264Provider.jsm', > 'PluginProvider.jsm', You should add ClearKeyProvider.jsm here.
Attachment #8516351 - Flags: feedback?(georg.fritzsche)
Comment on attachment 8516351 [details] [diff] [review] clearkey-package.patch Review of attachment 8516351 [details] [diff] [review]: ----------------------------------------------------------------- What Georg said. Providers should be considered heavyweight - each provider should relate to a reasonably wide category of the type of add-on it provides. Consider XPIProvider, for instance, which handles extensions, dictionaries, locales, etc - as there's only subtle differences between them. There isn't much implementation overlap between the Addon objects for OpenH264 and ClearKey, but they overlap logically. And the Addon object for ClearKey only needs to be a very simple object that just provides basic info. However... I question why we're adding this to the Add-on Manager at all. It's a built-in component, no update facility, no useful info to show, and I don't see any use-case for someone disabling/enabling it separately from disabling/enabling EME as a whole. It feels like it just adds noise to the UI without any benefit.
Attachment #8516351 - Flags: feedback?(bmcbride) → feedback-
Attached patch clearkey-package-easy.patch (obsolete) — Splinter Review
Just add another |addPluginDirectory| call. Will defer doing it properly for other GMPs to whenever we need it.
Attachment #8516351 - Attachment is obsolete: true
Attachment #8517903 - Flags: review?(bmcbride)
Comment on attachment 8517903 [details] [diff] [review] clearkey-package-easy.patch Review of attachment 8517903 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/mozapps/extensions/internal/OpenH264Provider.jsm @@ +281,5 @@ > } > > + gmpService.addPluginDirectory(OS.Path.join(OS.Constants.Path.libDir, > + CLEARKEY_PLUGIN_ID, > + CLEARKEY_VERSION)); Is the ClearKey GMP really bundled for all builds the addon manager is available in? I think you want to at least catch exceptions from this call.
(In reply to Georg Fritzsche [:gfritzsche] from comment #5) > Is the ClearKey GMP really bundled for all builds the addon manager is > available in? All desktop builds, where MOZ_EME is enabled (which it is by default).
Attachment #8517903 - Attachment is obsolete: true
Attachment #8517903 - Flags: review?(bmcbride)
Attachment #8518575 - Flags: review?(bmcbride)
Attachment #8518575 - Flags: feedback?(georg.fritzsche)
Attachment #8518575 - Flags: review?(bmcbride)
Attachment #8518575 - Flags: review+
Attachment #8518575 - Flags: feedback?(georg.fritzsche)
Comment on attachment 8518575 [details] [diff] [review] clearkey-package-easy.patch Review of attachment 8518575 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/mozapps/extensions/internal/OpenH264Provider.jsm @@ +286,5 @@ > + gmpService.addPluginDirectory(OS.Path.join(OS.Constants.Path.libDir, > + CLEARKEY_PLUGIN_ID, > + CLEARKEY_VERSION)); > + } catch (e) { > + this._log.warn("startup() - adding clearkey CDM failed with exception " + e.name); Note that Log.jsm has support for neat formatting of errors, exceptions and more: this._log.warn("startup() - adding clearkey CDM failed", e);
Can this land?
Flags: needinfo?(edwin)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Depends on: 1100164
Depends on: 1100450
Mass update firefox-status to track EME uplift.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: