Commit Graph

224 Commits

Author SHA1 Message Date
Boris Zbarsky
0fd831e559 Bug 1302304. Remove IDL bits that reference nsIDOMMediaError; it's not needed anymore. r=bkelly 2016-09-15 11:41:35 -04:00
Jean-Yves Avenard
6a25692b20 Bug 1299072: P10. Pass decoding error details to media element's error attribute. r=jwwang
MozReview-Commit-ID: 49DurV9WI5S

--HG--
extra : rebase_source : 469e6ed4e222fb6d6ac34843c3c3346a044c6023
2016-09-11 00:56:09 +10:00
JW Wang
d13f41c2a0 Bug 1294616 - Somewhat improve the string performance by defining string literals whose length is known at compile time. r=cpearce
MozReview-Commit-ID: LAlqMDtGQN7

--HG--
extra : rebase_source : 4f2cdc9cb9ee7e4dd024d47dad329304f6ba70ae
extra : source : 6db22a524b1452fc50bf56535e7c619a8441dcfe
2016-08-15 15:41:53 +08:00
James Cheng
c6899c4863 Bug 1290830 - [Part2] Remove the GMP types using genral types instead. r=cpearce
MozReview-Commit-ID: 3EKwTNPddI1

--HG--
extra : rebase_source : 00f7267a76ad299b52d02b16425bb266ee58985b
2016-08-02 15:05:21 +08:00
James Cheng
b74f50bca9 Bug 1290830 - [Part1] Detach the GMPDecryptorProxyCallback interface to DecryptorProxyCallback. r=cpearce
MozReview-Commit-ID: EPGf0ITakPO

--HG--
extra : rebase_source : 1186be0680789c1f9e66366e549fd5ec5b418a38
2016-08-01 17:37:18 +08:00
James Cheng
0593e89ea0 Bug 1293194 - Building with --disable-eme fails with GMPDecoderModule.cpp:15:30: fatal error: mozilla/EMEUtils.h: No such file or directory. r=cpearce
MozReview-Commit-ID: VUGdiaLqkV

--HG--
extra : rebase_source : 3439ba2f7a81ad80f9db514f21c6091cc3e5711a
2016-08-09 12:13:30 +08:00
Kaku Kuo
a6ed727230 Bug 1292091 - Part 2 - replace MaybeResolve(JS::UndefinedHandleValue) with MaybeResolveWithUndefined(); r=bz
MozReview-Commit-ID: KNbxVcCVqts

--HG--
extra : transplant_source : %1D%18%E5%C9o%F0%29%E7%E0%93%EEcR%C7B%3BeX%B3%87
2016-08-09 17:15:13 +08:00
Chris Pearce
b4c569d8b8 Bug 1293101 - Refactor CDMCaps.cpp to treat keys marked as output-restricted as usable in all cases. r=gerald
This is a follow up from bug 1289623, as I missed a few cases in that bug.

MozReview-Commit-ID: DM7FtVSZUo3

--HG--
extra : rebase_source : 4fd7ae93b1418ded54f0c21a50a654fc962d4892
2016-08-08 10:41:38 +12:00
Chris Pearce
7261eef5aa Bug 1289942 - Make MediaKeyStatusMap.get() return undefined for unknown keys. r=bz
The spec requires the MediaKeyStatusMap.get(keyId) function to return an 'any'
type, which is undefined for known keys, or a MediaKeyStatus enum value for
known keys.

https://w3c.github.io/encrypted-media/#idl-def-mediakeystatusmap


MozReview-Commit-ID: 3TOFYLacZSc

--HG--
extra : rebase_source : cd067f545cdbd9352ba64fea914128201b458d9c
2016-07-28 14:03:01 +12:00
Bryce Van Dyk
e06afda01b Bug 1279077 - Update GMP/EME path to support webm. r=cpearce
Update handling of VP8, VP9 to enable decryption and decoding via widevine.
Update handling with further validation to make sure that invalid video types
are rejected when trying to create widevine decryptor session or init widevine
decoders.

MozReview-Commit-ID: 8FOvUJfxr6L

--HG--
extra : rebase_source : 0f6aed8256d7f106a598b09e6f11efe80f0e4bb2
2016-07-29 15:53:22 +12:00
James Cheng
240e465d99 Bug 1288320 - Define each keysystem string as specific identifier instead of placing some.keysystem everywhere. r=cpearce
MozReview-Commit-ID: 1bwPRhMOawu

--HG--
extra : amend_source : 7550352f178c0082484acdd342db05ed0dc02e23
extra : transplant_source : %96%C1%B9%8B%28%B0%96f%8AM%AA%13T%1E%3Bg%98%96%92%C1
2016-07-27 16:07:46 +08:00
Carsten "Tomcat" Book
7293066753 merge mozilla-inbound to mozilla-central a=merge 2016-07-27 16:35:44 +02:00
Chris Pearce
5d7e74fc64 Bug 1289623 - Assume keys marked as 'output-restricted' are usable. r=gerald
Chrome appears to do this.

MozReview-Commit-ID: LbSFQiB0pEO

--HG--
extra : rebase_source : 2e4358ccc2bcfec0f9d286456f726400cfe0e13c
2016-07-27 11:06:43 +12:00
Tim Huang
71ca0b6bc8 Bug 1283325 - Part 1 : Make EME Plugins / Gecko Media Plugins storage OriginAttribute aware. r=cpearce 2016-07-22 08:40:00 +02:00
Kilik Kuo
3de7882657 Bug 1136707 - [Part1] Make pref 'media.eme.enabled' only affect practical DRMs. r=cpearce
MozReview-Commit-ID: 5XeAelzLbIc

--HG--
extra : transplant_source : J%7D%FE%B8%CC3%CF%E7%BAg%A7%3E%19%DDC%C0%EB%92%AD%C8
2016-07-27 12:04:47 +08:00
Carsten "Tomcat" Book
b9a6c687fa merge mozilla-inbound to mozilla-central a=merge 2016-07-25 15:50:41 +02:00
Chris Pearce
d29928ce19 Bug 1288976 - Only retry MediaKeySystemAccess requests on 'gmp-changed' notification if the CDM is now installed. r=gerald
This ensures we'll only retry requests if we know the install operation has
completed for a given GMP. This means if (say) OpenH264 happens to install
while we have a Widevine request pending, we won't retry the Widevine request,
as that would fail. The Widevine request will retry once the Widevine CDM
has downloaded and in turn fires its gmp-changed notification.



MozReview-Commit-ID: E3CV9uID4pS

--HG--
extra : rebase_source : 4e27210a9e6c28118e93f45846b63aaa64f5882d
2016-07-25 13:38:08 +12:00
Chris Pearce
d183d8433b Bug 1288976 - Use gmp-changed rather than gmp-path-added to retry MediaKeys requests. r=gerald
We're already routing the "gmp-changed" observer service notification over from
the chrome process to the content process, and it fires at pretty much the same
time as the "gmp-path-added" notification (and a few more) so we can just switch
to have the MediaKeySystemAccessManager listen on that notification instead, and
we'll be e10s compatible.




MozReview-Commit-ID: EowFDfdWgAJ

--HG--
extra : rebase_source : ad01990278cf9005f6676ef0b7fa0acbf69249eb
2016-07-25 10:18:34 +12:00
Chris Pearce
c45d37db14 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 : f8ed145d050bb27f2f6867ec4b308bbcd30d17a5
2016-07-21 19:22:59 +12:00
Chris Pearce
f49856bc79 Bug 1278198 - Pipe through distinctive identifier and persistent state allowed. r=gerald
MozReview-Commit-ID: A92e0XGp5s4

--HG--
extra : rebase_source : 09f7ba18c9b81263aa345cc7f34f0ef2a2548482
2016-07-07 17:26:15 +12:00
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