Commit Graph

204 Commits

Author SHA1 Message Date
Chris Pearce
1ec646af14 Bug 1278198 - Implement "Get Supported Configuration" algorithm in MediaKeySystemAccess. r=gerald
MozReview-Commit-ID: KiJMOm5HgHe

--HG--
extra : rebase_source : 0c60b76ad38cb9c5513e6618c8d8f4bc6f43b168
2016-07-01 13:36:57 +12:00
Chris Pearce
1ea9b742f5 Bug 1278198 - Update EME code to reflect new WebIDL name changes. r=gerald
MozReview-Commit-ID: EssCsJxBBwt

--HG--
extra : rebase_source : 154746eca911e2250f3fa94a6a2d4b2624910e50
2016-07-04 14:14:01 +12:00
Iris Hsiao
371d555f4a Backed out changeset 656b778e0f15 (bug 1278198) 2016-07-22 12:06:50 +08:00
Iris Hsiao
20a56b15d5 Backed out changeset 9c3ef7ef33d9 (bug 1278198) 2016-07-22 12:06:26 +08:00
Iris Hsiao
b2381608d3 Backed out changeset af577b7547c4 (bug 1278198) 2016-07-22 12:06:00 +08:00
Iris Hsiao
dbc7ffb037 Backed out changeset 3ab20077e16d (bug 1278198) for GTest crash 2016-07-22 12:05:18 +08:00
Chris Pearce
ff7c022786 Bug 1278198 - Enforce codecs match the capability and content type in GetSupportedCapabilities(). r=gerald
We're supposed to reject MediaKeySystemCapabilities which have a contentType
that has codecs which don't match their major type, i.e. audio codecs in a
video container type.

I missed that, and it's causing us to fail the
test_eme_requestMediaKeySystemAccess case "MP4 video container with both audio
and video codec type in videoType".


MozReview-Commit-ID: KQVGk9hX3eC

--HG--
extra : rebase_source : b64919e71128b0cd3a1129af56f915ffa5d2025b
2016-07-21 19:22:59 +12:00
Chris Pearce
06a7c88a23 Bug 1278198 - Pipe through distinctive identifier and persistent state allowed. r=gerald
MozReview-Commit-ID: A92e0XGp5s4

--HG--
extra : rebase_source : 6bf51883e4236a0dff1485c4335578f38debdc09
2016-07-07 17:26:15 +12:00
Chris Pearce
151988ebac Bug 1278198 - Implement "Get Supported Configuration" algorithm in MediaKeySystemAccess. r=gerald
MozReview-Commit-ID: KiJMOm5HgHe

--HG--
extra : rebase_source : a465eee5c29acb8ece448b1cc371fcf893563fff
2016-07-01 13:36:57 +12:00
Chris Pearce
bc86455eb5 Bug 1278198 - Update EME code to reflect new WebIDL name changes. r=gerald
MozReview-Commit-ID: EssCsJxBBwt

--HG--
extra : rebase_source : 5ac95874355dd70d97f6749143542b5cfb5abfc8
2016-07-04 14:14:01 +12:00
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson
b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
James Cheng
0cb95c8c46 Bug 1284192 - get rid of GMPErr from CDMProxy base class. r=cpearce
MozReview-Commit-ID: 43WduOtIfZH
2016-07-18 22:12:00 +02:00
James Cheng
02c5726f49 Bug 1284192 - Make CDMProxy be a base class and move the logic into subclass. r=cpearce
MozReview-Commit-ID: 4Lr3uqVexFD

--HG--
rename : dom/media/eme/CDMProxy.cpp => dom/media/gmp/GMPCDMProxy.cpp
rename : dom/media/eme/CDMProxy.h => dom/media/gmp/GMPCDMProxy.h
2016-07-18 22:13:00 +02:00
James Cheng
96e45dba10 Bug 1284809 - Rename CDMCallbackProxy to GMPCDMCallbackProxy to make it GMP specific use. r=jwwang
MozReview-Commit-ID: Ceq6vpGPNdA

--HG--
rename : dom/media/eme/CDMCallbackProxy.cpp => dom/media/gmp/GMPCDMCallbackProxy.cpp
rename : dom/media/eme/CDMCallbackProxy.h => dom/media/gmp/GMPCDMCallbackProxy.h
extra : transplant_source : %E1g%E9yJ%A8%7B%FFYw%FF%D3%B3%A4%D3%8F%93%DE%1B%7C
2016-07-11 12:52:07 +08:00
stefanh@inbox.com
51626f0a16 Bug 1284007 - Remove obsolete OS X version checks in dom/media. r=cpearce, jesup. 2016-07-07 18:22:41 +02:00
Chris Pearce
4b3a0f0d42 Bug 1267918 - Remove obsolete GMP crash handling code. r=gerald
MozReview-Commit-ID: EqzJagCHk7n

--HG--
extra : rebase_source : e66aa2a4b5939ae8bcf833a5d1a59ef508a679b3
2016-06-29 11:42:14 +12:00
Chris Pearce
7517d84f1b Bug 1267918 - Add GMPCrashHelper for MediaKeys. r=gerald
So if a GMP crashes while doing EME, we'll get a crash report using the new
mechanism.

MozReview-Commit-ID: G8BlFI9jmiF

--HG--
extra : rebase_source : 1cda5c93ea9e547636b34ec2149ef9cd2506ca73
2016-06-29 11:42:04 +12:00
Chris Pearce
e0a9078a6f Bug 1267918 - Add GMPCrashHelper to GMPService::GetGMP* functions. r=gerald
This enables callers to specify a way to determine the correct window to
dispatch the PluginCrashed event to should the GMP actor crash.

We need a way to determine the correct window at crash time, as the GMP's
window can change at runtime. For example, if the GMP is being used for
unencrypted decoding, the <video> element can be moved to a new browser window
at runtime.

Note: I don't handle disconnecting the GMPCrashHandlers in this patch; we do
delete the GMPCrashHandlers in this patch when their associated GMP crashes, and
in the next patch we handle disconnecting GMPCrashHandlers in the case where
we don't crash.

MozReview-Commit-ID: DrwcZAB6Ys0

--HG--
extra : rebase_source : 8da188b68456914773e6adae8cbccd6bf6a6e7a7
2016-06-29 11:41:56 +12:00
Chris Pearce
0405241de4 Bug 1283666 - Remove code to handle obsolete MediaKeySystemConfiguration attributes. r=jwwang
MozReview-Commit-ID: 1T3DH0JVstQ

--HG--
extra : source : f2d2fd02cdba4bd5c3c60c4005c852c3ee12ee9e
2016-07-01 11:26:29 +12:00
Chris Pearce
8e789d39c5 Bug 1283630 - Remove remaining MOZ_WIDEVINE_EME define checks. r=jwwang
I had meant to remove all of these in bug 1276132, but I missed a couple. We
should now check whether Widevine is enabled before hitting these code paths
by checking the preference.

MozReview-Commit-ID: FmAdlgbF0Py

--HG--
extra : source : 586eff45c5479c7efc86435add5f6e9edd5e43b0
extra : amend_source : 65a9902374155d9e3180f0510b1d1434b986dc83
2016-07-01 09:39:48 +12:00
Bryce Van Dyk
3e3f638e3e Bug 1257716 - Handle clearkey encrypted WebMs. r=cpearce
Handle encrypted WebM streams for the clearkey case. Add checking for the
widevine case, though these should currently fail, as not all of the plumping
is in place for widevine.

MozReview-Commit-ID: 5d9fvc5IkZF

--HG--
extra : rebase_source : 9baad2afd7778c350c404c72dcd81426092aa908
2016-06-08 14:07:09 +12:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Chris Pearce
91ab2bc0c4 Bug 1276132 - Remove use of #ifdef MOZ_{KEYSYSTEM}_EME in dom/media code. r=jwwang
Instead of controlling visibility of EME keysystems by build config, do it by
preference. This means keysystems can be turned on easier.


MozReview-Commit-ID: Ky1zrHPubOJ

--HG--
extra : rebase_source : 35d9c26436a86683b902225e7b0d6645b02d8ff9
2016-05-31 11:00:55 +12:00
Phil Ringnalda
7270ed519a Back out 4 changesets (bug 1276132) for browser_gmpProvider.js failures
CLOSED TREE

Backed out changeset 511a2389ca48 (bug 1276132)
Backed out changeset 91b3cdd0640a (bug 1276132)
Backed out changeset 09b9972e36f9 (bug 1276132)
Backed out changeset 69052d4e3dbb (bug 1276132)
2016-06-08 20:36:22 -07:00
Chris Pearce
64f7e2a1c9 Bug 1276132 - Remove use of #ifdef MOZ_{KEYSYSTEM}_EME in dom/media code. r=jwwang
Instead of controlling visibility of EME keysystems by build config, do it by
preference. This means keysystems can be turned on easier.


MozReview-Commit-ID: Ky1zrHPubOJ

--HG--
extra : rebase_source : 7d68ad8389afdac8fcfffd2c505f8467107c05a5
2016-05-31 11:00:55 +12:00
Chris Pearce
ac79946809 Bug 1272521 - Reject Widevine keysystem requests on MacOSX 10.6. r=gerald
The Widevine CDM is crashing trying to determine the screen layout, and since
10.6 is being deprecated in August, we're not going to bother making it work.


MozReview-Commit-ID: K1k1WZqjoyy

--HG--
extra : rebase_source : 7862852195a796e6bb18ef763f1b20837801531a
2016-05-13 14:00:29 +12:00
Jean-Yves Avenard
d31cb0499b Bug 1206637: P2. Replace all cached preferences with MediaPrefs ones. r=cpearce
Additionally, clean up stray and unused Preferences.h header.

MozReview-Commit-ID: IcPrD2inkDE

--HG--
extra : rebase_source : c3c6e37767627db3601090c2855a3dfa98cb4368
2016-05-10 11:02:28 +10:00
Chris Pearce
46a1552995 Bug 1271242 - Remove GMPDecryptorCallback::SetCapabilities(). r=jwwang
Now that GMPParent detects whether gmp-clearkey can decode using AAC/H.264
using WMF before reporting gmp-clearkey's GMPParent can decode AAC/H.264, we
don't need the GMPDecryptorCallback::SetCapabilities() callback from the GMP to
signal to the PDMFactory that the GMP can decode. We can now trust what the
GMPService tells us.

So we can remove the "waiting for CDM caps" step in the state machine's startup
sequence. And all the plumbing. :)

If we need more caps, like for an decode-and-render path, we can declare those
as API strings in the info file.


MozReview-Commit-ID: E0QhU4cYhjo

--HG--
extra : rebase_source : 7d15ab6a45bac88c15c053f416d941b5fe0807b0
2016-05-10 10:28:38 +12:00
Kyle Huey
941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book
ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey
48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Kyle Huey
c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Gerald Squelart
5853b8739b Bug 848994 - p3. Check MediaKeySystem requests - r=cpearce
Media Key System access requests are now recorded with their success/failure,
as well as accompanying issues of importance.
In this bug we focus on the Widevine-with-no-WMF case.

MozReview-Commit-ID: ElBN6cXKwAW
2016-04-22 13:42:11 +10:00
Chris Pearce
0e273ade3c Bug 1265587 - Force keystatuses to be cleared when Widevine keysessions are closed. r=gerald
The Widevine CDM, and I believe the Adobe CDM too probably, do not mark a
session's keys as unusable when a key session is closed. This means that
the CDMCaps' copy of the keys that are usable is wrong, and so if the media
with the same keys is reloaded with the same MediaKeys, Firefox will assume
that the keys are usable before the license for the keys has been
re-negotiated, and so decryption will fail.


MozReview-Commit-ID: 1kTDzwSD8PE

--HG--
extra : rebase_source : 89c480f36bfaec11ceb5ca1e8d798b0ae795eaea
2016-04-22 08:31:18 +12:00
Gerald Squelart
ecfb205472 Bug 1248507 - p1. Pass DecoderDoctorDiagnostics to PDMs&more - r=jya
Pass declared-but-yet-undefined DecoderDoctorDiagnostics pointer to various
routines that contribute to deciding if a media format can be played, and
those that create decoders.

Points where a DecoderDoctorDiagnostics can be injected are currently marked
with "/* DecoderDoctorDiagnostics* */ nullptr", and some will be used in
following patches.

MozReview-Commit-ID: 7u37bvY4CpW
2016-04-19 17:36:19 +10:00
Chris Pearce
136af0a4d8 Bug 1265038 - Turn on Adobe EME by build config rather than per-platform basis. r=jwwang
We end up showing the "Adobe EME is preffed off" UI on MacOSX because we're
check for Adobe EME support based on platform, not based on whether it's
configured on in the mozconfig. We should really only check for Adobe EME
if 'ac_add_options --enable-eme=adobe' is present in the build config,
as otherwise preffing it on isn't going to work.


MozReview-Commit-ID: CpSAh6gUU1S

--HG--
extra : rebase_source : 815b5ddf8f2889787acd22ab7a434db9b0f23213
2016-04-18 14:22:58 +12:00
Chris Pearce
d9baf3c3ba Bug 1264832 - Delay resolution of navigator.requestMediaKeySystemAccess promise until Widevine CDM is downloaded. r=gerald
MozReview-Commit-ID: I6OMiKUj9ot

--HG--
extra : rebase_source : ea150c1b3f480bef4579e280c5f7840b8a174a8c
2016-04-15 14:20:33 +12:00
Chris Pearce
a7ef15b6b8 Bug 1245789 - Reject MediaKeys requests for Widevine if we don't have a platform AAC decoder. r=gerald
The Widevine CDM does not have an AAC decoder. It can however decrypt audio
streams. It's our policy to not decode AAC streams decrypted by the Widevine
CDM with the Adobe GMP's unencrypted decoding functionality. So reject
MediaKeySystemAccess requests for Widevine if we don't have a system AAC
decoder that we can use.

MozReview-Commit-ID: Ltq52wT1qno
2016-04-12 16:12:22 +12:00
Chris Pearce
2c831f28f4 Bug 1245789 - Push detection of WMF decoding for clearkey into GMPParent to simplify request media key system access logic. r=gerald
The logic in MediaKeySystemAccess is convoluted because it needs to keep
checking whether we're servicing a clearkey request and whether WMF is
available for gmp-clearkey to decode with. If we instead push those checks down
into GMPParent at the time where we parse the GMP info file, we can just not add
the decode capability to the GMPParent, and can remove the special cases in
MediaKeySystemAccess. This simplifies adding the (similar) special cases for
Widevine in the next patch.

MozReview-Commit-ID: IKD5LU86zIv
2016-04-12 16:12:22 +12:00
Chris Pearce
1fbf846737 Bug 1245789 - Use ifdef MOZ_WIDEVINE_EME to prevent compilation when not enabled. r=gerald
This means we won't try to build it when ac_add_options --enable-eme=widevine is
not present, and critically, we won't try to build it on Android, since the Chromium
Widevine plugin isn't available there.

MozReview-Commit-ID: 1jQvAbJP8HG
2016-04-12 16:12:21 +12:00
Chris Pearce
581bf9fd48 Bug 1245789 - Added support for --enable-eme=widevine and expose MOZ_$(keySystem)_EME in dom/media/{eme,gmp}. r=glandium
We need to not build Widevine by default, and when enabled we will need to be able to
ifdef on MOZ_WIDEVINE_EME (see next patch) so that we can not build the code on platforms
where it can't possibly work (Android specifcally, as Widevine isn't available as a
Chromium plugin there).



MozReview-Commit-ID: Avgz5NRcl9v
2016-02-26 14:01:41 +13:00
Chris Pearce
85c4260134 Bug 1245789 - Add Widevine KeySystem to EME. r=gerald
This means we recognize the keysystem string in our APIs.

MozReview-Commit-ID: E3KU3JTihcr
2016-04-12 16:12:20 +12:00
Kilik Kuo
89ac1fb7b9 Bug 1256186 - Part 3: Remove the temporary solution which ignores MediaKeySystemStatus::Cdm_not_supported. r=jwwang
MozReview-Commit-ID: Jny48PqVFYR
2016-04-06 00:09:32 +08:00
Kilik Kuo
517dc21177 Bug 1256186 - Part 1: Show 'Enable EME' notification box only when MediaKeys requested for supported keysystem. r=jwwang
MozReview-Commit-ID: CxJbgzNKGJQ
2016-04-01 18:34:13 +08:00
James Cheng
23a3da9399 Bug 1260377 - Fix CDMProxy::SetServerCertificate crash since null pointer. r=cpearce 2016-03-30 11:26:44 +13:00
Chris Pearce
648f43b562 Bug 1252168 - Don't send CDM unsupported notifications from Gecko to chrome. r=kentuckyfriedtakahe
MozReview-Commit-ID: FDfpeEt3HfT

--HG--
extra : rebase_source : 5bddbeae15a8afb750f4baae416d9ff8257893c4
2016-03-03 11:02:17 +13:00
Boris Zbarsky
3366af6c39 Bug 1243001 part 5. Get rid of most of the dom::Promise methods when SPIDERMONKEY_PROMISE is defined, and reimplement the rest in terms of SpiderMonkey Promise. r=peterv
This is the bulk of the new dom::Promise implementation.  It's using the APIs
that bug 911216 part 1 adds.
2016-02-09 17:40:31 -05:00
Chris Pearce
ab9dc9ea26 Bug 1243878 - Null check CDMProxy::mKeys in CDMProxy::OnExpirationChange() before use. r=jwwang
All the methods in CDMProxy except CDMProxy::OnExpirationChange() that use
mKeys null check mKeys before using it because it can go away during shutdown
before the IPC message to call the methods have had a chance to run.

We should do the null check in CDMProxy::OnExpirationChange() too.
2016-01-29 10:23:45 +13:00
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00