Closed Bug 1152208 Opened 10 years ago Closed 10 years ago

[EME] add clear-key path to gmp service on B2G

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(1 file, 3 obsolete files)

It looks like GMPProvider.jsm is not run on B2G which will add clear-key path to the gmp service [1]. [1] https://hg.mozilla.org/mozilla-central/file/078128c2600a/toolkit/mozapps/extensions/internal/GMPProvider.jsm#l502
Blocks: 1142899
Hi Stephen, Do you know how we should do this on B2G? In bug 1089867, CDM is integrated into add-on manager. How do we add the clear-key path so that we can enable clear-key CDM on B2G?
Flags: needinfo?(spohl.mozilla.bugs)
Hmm, I'm not very familiar with B2G and how things are done there. Are we only interested in adding ClearKey to B2G, or will we also want to add the ability to download other GMPs? If the latter, we may want to bite the bullet and add support for GMPProvider.jsm in B2G now. If we only care about ClearKey we could potentially add the path in browser.js. I'm just not sure if this is the right place to do it for B2G.
Flags: needinfo?(spohl.mozilla.bugs)
Yes, for now we are only interested in adding clearkey to B2G. We don't need to add the ability to download other plugins on B2G since vendors would just preload the plugins during shipment and they can customize browser.js to add more plugin paths.
Btw, which browser.js do you mean? I see plenty of them.
Flags: needinfo?(spohl.mozilla.bugs)
Interesting, I could have sworn this file was called browser.js for B2G as well. However, I couldn't find it and asking in #developers revealed that B2G seemingly uses a file called shell.js[1] as the equivalent to desktop's browser.js. [1] http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.js
Flags: needinfo?(spohl.mozilla.bugs)
Attached patch 1152208_add_clearkey_path-v1.patch (obsolete) (deleted) — Splinter Review
Hi Stephen, I got below error messages: adding clearkey path [Exception... "Component returned failure code: 0x80570018 (NS_ERROR_XPC_BAD_IID) [nsIJSCID.getService]" nsresult: "0x80570018 (NS_ERROR_XPC_BAD_IID)" location: "JS frame :: chrome://b2g/content/shell.js :: <T OP_LEVEL> :: line 1084" data: no] failed to add clearkey path It looks like something wrong to the interface id. Do you have any clue?
Attachment #8592579 - Flags: feedback?(spohl.mozilla.bugs)
It looks like mozIGeckoMediaPluginChromeService.idl is not exposed on gonk. Chris, is this an obvious thing for you to explain?
Flags: needinfo?(cpearce)
(In reply to Stephen Pohl [:spohl] from comment #7) > It looks like mozIGeckoMediaPluginChromeService.idl is not exposed on gonk. > Chris, is this an obvious thing for you to explain? Uh... I didn't even know that was possible... I have no idea what's going on there... Peter?
Flags: needinfo?(cpearce) → needinfo?(peterv)
What process is that running in? That interface is only available in the chrome process (see http://mxr.mozilla.org/mozilla-central/source/dom/media/gmp/GMPService.cpp#112).
Flags: needinfo?(peterv)
Comment on attachment 8592579 [details] [diff] [review] 1152208_add_clearkey_path-v1.patch Review of attachment 8592579 [details] [diff] [review]: ----------------------------------------------------------------- ::: b2g/chrome/content/shell.js @@ +1092,5 @@ > +#ifdef MOZ_WIDGET_GONK > +try { > + dump("adding clearkey path\n"); > + let gmpService = Cc["@mozilla.org/gecko-media-plugin-service;1"] > + .getService(Ci.mozIGeckoMediaPluginChromeService); It turns out Ci.mozIGeckoMediaPluginChromeService is undefined. How could this be?
Attachment #8592579 - Flags: feedback?(spohl.mozilla.bugs) → feedback?(peterv)
Comment on attachment 8592579 [details] [diff] [review] 1152208_add_clearkey_path-v1.patch See comment 11
Attachment #8592579 - Flags: feedback?(peterv)
Thanks. It works!
Attached patch 1152208_add_clearkey_path-v2.patch (obsolete) (deleted) — Splinter Review
Add clear-key path to GMP service on B2G.
Assignee: nobody → jwwang
Attachment #8592579 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8594579 - Flags: review?(spohl.mozilla.bugs)
Attached patch 1152208_add_clearkey_path-v3.patch (obsolete) (deleted) — Splinter Review
Wrong patch uploaded.
Attachment #8594579 - Attachment is obsolete: true
Attachment #8594579 - Flags: review?(spohl.mozilla.bugs)
Attachment #8594580 - Flags: review?(spohl.mozilla.bugs)
Comment on attachment 8594580 [details] [diff] [review] 1152208_add_clearkey_path-v3.patch This looks good to me, but you should also get a review from a b2g module owner or peer[1] just to cover our bases. Thanks! [1] https://wiki.mozilla.org/Modules/All#FirefoxOS
Attachment #8594580 - Flags: review?(spohl.mozilla.bugs) → review+
Comment on attachment 8594580 [details] [diff] [review] 1152208_add_clearkey_path-v3.patch Hi Jonas, Can you review this patch? We would like to add clear-key path to GMP service on B2G so we can play clear-key encrypted content on B2G. Thanks.
Flags: needinfo?(jonas)
Looks like Jonas is not available for now.
Flags: needinfo?(jonas)
Comment on attachment 8594580 [details] [diff] [review] 1152208_add_clearkey_path-v3.patch Hi fabrice, Can you review this patch? We would like to add clear-key path to GMP service on B2G so we can play clear-key encrypted content on B2G. Thanks.
Attachment #8594580 - Flags: review+ → review?(fabrice)
Comment on attachment 8594580 [details] [diff] [review] 1152208_add_clearkey_path-v3.patch Review of attachment 8594580 [details] [diff] [review]: ----------------------------------------------------------------- ::: b2g/chrome/content/shell.js @@ +1092,5 @@ > +#ifdef MOZ_WIDGET_GONK > +try { > + let gmpService = Cc["@mozilla.org/gecko-media-plugin-service;1"] > + .getService(Ci.mozIGeckoMediaPluginChromeService); > + gmpService.addPluginDirectory('/system/b2g/gmp-clearkey/0.1'); nit: double quotes for strings.
Attachment #8594580 - Flags: review?(fabrice) → review+
Thanks.
Fix nits.
Attachment #8594580 - Attachment is obsolete: true
Attachment #8597040 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: