Commit Graph

364 Commits

Author SHA1 Message Date
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
e2b41d3d04 Bug 1278198 - Add Widevine FileIO. r=gerald
MozReview-Commit-ID: IXgSobtF24L

--HG--
extra : rebase_source : e1df08666b0713fa4c10fc020d6482a802d2fb52
2016-07-07 17:28:14 +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
4eba68c8bf Backed out changeset 1894b74b8931 (bug 1278198) 2016-07-22 12:06:09 +08:00
Iris Hsiao
b2381608d3 Backed out changeset af577b7547c4 (bug 1278198) 2016-07-22 12:06:00 +08:00
Iris Hsiao
8494189c07 Backed out changeset c9e56c91112e (bug 1278198) 2016-07-22 12:05:35 +08:00
Chris Pearce
831d889b55 Bug 1278198 - Adapt Adobe GMP's obsolete GMPDecryptor interface to new interface. r=gerald
The Adobe GMP only supports up to GMPDecryptor version 7. We're now up to
version 9.  So we need to provide an adaptor to convert the old version to run
with the new interface.

MozReview-Commit-ID: 5dKreev7JMv

--HG--
extra : rebase_source : f944a40e2287c7a7dd01a2fb145a9e5882dd2368
2016-07-14 13:33:48 +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
b6e1300359 Bug 1278198 - Add Widevine FileIO. r=gerald
MozReview-Commit-ID: IXgSobtF24L

--HG--
extra : rebase_source : 528d9c344aa2a2c1c4b0eb321ff239397d4c0d29
2016-07-07 17:28:14 +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
Bob Owen
94305927f7 Bug 1288021: When we have a network GMP path fix the format for the sandbox rule. r=cpearce
MozReview-Commit-ID: BYMvKvwdFOK

--HG--
extra : rebase_source : 3c4ab54fbb87387c4816c96e3b998b460804cf49
2016-07-20 09:20:30 +01: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
Chris Pearce
48d570573b Bug 1282577 - Guard against multiple intr messages causes us to multi-delete GMP actors. r=jesup.
This is a regression from bug 1162358.

We must be hitting the #ifndef SHMEM_ALLOC_IN_CHILD block in
GMPVideoDecoderChild::Alloc() with multiple allocs doing intr calls at once.
If this happens when a DecodingComplete() comes in, we'll end up sending one
task to re-call RecvDecodingComplete for every Alloc() blocked on an intr
response.  This would result in us ending up trying to Send__delete__() in
RecvDecodingComplete() twice.  Which causes the runtime abort we're seeing
here.

I think that could happen in the WidevineVideoDecoder if a Decode message comes
in, and goes into a ReturnOutput(), tries to alloc a frame and has to spin on
an intr message response, and another Decode message comes in and does the
same, so GMPVideoDecoderChild::mNeedShmemIntrCount will be 2, and then a
DecodingComplete comes in, and when two tasks on the stack in
GMPVideoDecoderChild::Alloc() finish they both end up dispatching a task to
re-call GMPVideoDecoderChild::RecvDecodingComplete(). So we end up trying to
Send__delete__() in RecvDecodingComplete() twice.

I expect the same problem exists in the GMPVideoEncoder too.

intr, or spinning event loops in general for that matter, is evil.


MozReview-Commit-ID: AKsvP62G3Cx

--HG--
extra : rebase_source : 53ca12dbbbf3ab071788e2322b7c926ec7c0325f
2016-07-11 21:52:31 +12:00
Gerald Squelart
6fab8ba294 Bug 1285231 - Use Swap to move&empty plugins list before unloading - r=jwwang
MozReview-Commit-ID: LMkuOA0lBKD

--HG--
extra : rebase_source : 948fa73d618ef1ff1cf83ddfd8af3228b49226b5
2016-07-07 23:57:46 +10:00
David Anderson
e6a98dc91b Clean up Transport memory management in IPDL. (bug 1283744, r=billm) 2016-07-06 18:51:20 -07: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
8b965f3eac Bug 1267918 - Add GMPCrashHelperHolder to automatically disconnect crash helpers on actor destory. r=gerald
Disconnecting the GMPCrashHelpers at the right time is hard, because in the
crashing case we're all shutdown before the GMPCrashHelpers can be invoked to
help handle the crash report. So add a class to help the helpers;
GMPCrashHelperHolder. This composes into the GMP content protocol actors, to
help them disconnect the crash helpers at the right time. See the comment in
GMPCrashHelperHolder for the details.


MozReview-Commit-ID: E5rE6e5Jues

--HG--
extra : rebase_source : f688bf727f23f773eb995611cec6412ebf021029
2016-06-29 11:42:00 +12:00
Chris Pearce
dcfb0a0d17 Bug 1267918 - Ensure GMPCrashHelper instances are destroyed on the main thread. r=karlt
MozReview-Commit-ID: 7GFx6uoyAi9

--HG--
extra : rebase_source : ceb32673c2ee64b89d090b02cdf48cc615ad1057
2016-06-30 14:19:08 +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
fed9c17730 Bug 1267918 - Split LoadGMP message into select and load messages. r=gerald
This will allow us to attach a crash handler to a GMP process after deciding
which GMP to load but before actually loading it.


MozReview-Commit-ID: HwBZU2Q4TX6

--HG--
extra : rebase_source : a68b9cbc31c0b886ba491f8f15f02e4d0e32cae7
2016-06-29 11:41:52 +12:00
Bill McCloskey
cb8a9c03a3 Bug 1277705 - Remove waitable_event_watcher (r=dvander) 2016-06-24 13:15:41 -07:00
Mats Palmgren
a25ec1d6dc Bug 1280743 - Put Widevine stuff under #ifdef MOZ_EME to make this file compile under --disable-eme. r=cpearce 2016-06-21 13:23:29 +02: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
191e25eeb7 Bug 1276132 - Make more Widevine class constructors explicit to keep gcc happy. r=jwwang
Fixes compile errors on Linux when Widevine is compiled.

MozReview-Commit-ID: 19qQw02CqdQ

--HG--
extra : rebase_source : 335124655869da1f899986f7dcd0d7ec1e441f6a
2016-05-31 12:05:24 +12: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
57fa470692 Bug 1276132 - Make more Widevine class constructors explicit to keep gcc happy. r=jwwang
Fixes compile errors on Linux when Widevine is compiled.

MozReview-Commit-ID: 19qQw02CqdQ

--HG--
extra : rebase_source : ebb98b25738e0438d873834f07c72be1f4eb71db
2016-05-31 12:05:24 +12: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 Peterson
11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
Bill McCloskey
291c555f34 Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Chris Pearce
a7ee9fee8a Bug 1271169 - Move all device binding code into librlz and remove static runtime requirement. r=glandium
I want the EME device binding/nodeId code to be callable from gtests, as well
as in plugin-container. I need this because I want to add a gtest that ensures
that we don't regress the EME/GMP device binding code. I want to call the GMP
device binding code in the gtest and in the GMP process, and compare the
result.

So we need to make it possible to link the device binding code into the gtests
as well as plugin-container. So move all code that device binding calls into
librlz, to make it easier to link against all the code required.

Note: the device binding code needs to be statically linked into
plugin-container so that it's covered by the Adobe CDM's voucher tool.


MozReview-Commit-ID: AvBAe1dh49Z

--HG--
rename : ipc/app/sha256.c => dom/media/gmp/rlz/sha256.c
rename : ipc/app/sha256.h => dom/media/gmp/rlz/sha256.h
extra : rebase_source : f60f1e68649fa90cbe1f2fe09f5f69948444b1df
2016-05-20 16:11:29 +12:00
Chris Pearce
9c711e8fb4 Bug 1271169 - Move EME/GMP device binding code into GMPDeviceBinding.h/cpp. r=gerald
I want the EME device binding/nodeId code to be callable from gtests, as well
as from in plugin-container.

First step is to move the device binding code into a discrete file, so I can
also link that into gtests, and call it from there to compare the result with
what's in the GMP process.

MozReview-Commit-ID: 9xT2rp3hWW

--HG--
extra : rebase_source : 824c7a9841bce83c438decad48ce210f6c2a5571
2016-05-11 19:56:42 +12:00
Bob Owen
c43bf02cda Bug 1035125 Part 8: Pass sandboxing pointers through XRE_InitChildProcess instead of linking to more functions in xul. r=aklotz,glandium
MozReview-Commit-ID: 5AiktOArpfU

--HG--
extra : rebase_source : 1ba3be949e2bfeb3b67687ab05d43342852ab764
2016-05-15 16:35:22 +01:00
Bob Owen
71b3258726 Bug 1035125 Part 4: Back out changeset 8ae39d920f5c and associated subsequent changes. r=glandium
The original changeset that is being backed out had comment:
Bug 1023941 - Part 2: Static-link the CRT into plugin-container.exe.

MozReview-Commit-ID: 1iPJghgd0t2

--HG--
extra : rebase_source : cbed4e43f51af8ea0c3adbfc150ed029fe0d0f57
2016-05-15 16:23:57 +01:00
Chris Pearce
b4b5bfb254 Bug 1270689 - Clear WidevineDecryptor::mCallback in WidevineDecryptor::DecryptingComplete(). r=gerald
The OnSessionClosed() callback is happening on a timer, after
WidevineDecryptor::DecryptingComplete() has been called. So mCallback could
actually be non-null because DecryptingComplete() has been called, but the
object pointed to by mCallback has been deallocated, and mCallback is a
dangling pointer.

MozReview-Commit-ID: 4xdHYRn7EAS

--HG--
extra : source : 55d79997aa3e3e2133d9155c37f4435317b44061
2016-05-16 14:34:20 +12:00
Chris Peterson
353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Kyle Huey
c8143d07d7 Bug 1272415: Don't include task.h everywhere. r=froydnj 2016-05-12 15:15:43 -07: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
Chris Pearce
817b6c705e Bug 1270689 - Null-check WidevineDecryptor::mCallback before use. r=gerald
We've observed some crashes derefing the callback pointer, which may be
occuring due to shutdown happening before init has setup the callback pointer.

MozReview-Commit-ID: JsOqfjejMVI

--HG--
extra : rebase_source : e175dd8556ad50316bc16232782e593eea3e2ec8
2016-05-09 14:21:26 +12:00
Gerald Squelart
a147091776 Bug 1268434 - Mutex-protect and check GMP abstract thread before uses - c?cpearce r=cpearce
GeckoMediaPluginService::mAbstractThread was not reset as expected from
ShutdownGMPThread, meaning it would retain a reference to the GMP thread, and
it would allow dispatch attempts to the GMP thread after shutdown.

Also mAbstractThread was not protected by a mutex (as mGMPThread was), which is
definitely needed now that it can be reset at shutdown time.

As its prefix implies, GetAbstractThread could return a nullptr, so it should
be checked before every use.
Note that this GetAbstractThread call (and its check) has been moved closer to
the start of functions using it, to avoid unnecessary and potentially invariant-
breaking partial work to take place when we can know in advance that it won't
fully succeed because the GMP thread is not available.

MozReview-Commit-ID: B1drOeM65hr

--HG--
extra : rebase_source : 1d389c663e26a25035bf2aa22b2cca478ef954fe
2016-05-06 21:36:22 +10:00
Chris Pearce
eddc1e9562 Bug 1270968 - Add mechanism to clear GMP storage when its version changes. r=gerald
In bug 1264497 we discovered that Netflix was broken because we'd made a change
to not send the Adobe GMP the device bound nodeId, which it stored in GMP
storage. When the GMP was comparing the nodeId it had stored against what it was
passed (nothing) the comparison was failing. Users could have worked around this
problem by clearing their GMP storage, whereupon the Adobe GMP will have stored
"nothing" as its nodeId.

When bug 1264497 was fixed, users who'd cleared their storage will see Netflix
fail again, as their stored nodeId of "nothing" will again not match what we
pass in. So to fix Netflix for these users, we need to clear GMP storage.

This is another instance of a more general problem that we have occasionally
encountered, namely that sometimes GMP storage becomes incompatible, and we
need to clear it. Having a general mechanism that we can use to clear storage
remotely will be helpful, so this patch adds one, and triggers it to fire.

This mechanism is pref controlled, so that we can issue a hotfix if necessary
to clear GMP storage.


MozReview-Commit-ID: GzSyBj0P2JG

--HG--
extra : rebase_source : b854860ee533b0742a664c862278ce54c9052596
2016-05-07 09:19:15 +12:00
Chris Pearce
d0c07d0732 Bug 1264497 - Call GMPSetNodeId in GMPLoader. r=gerald
MozReview-Commit-ID: I6BApLKpjPS

--HG--
extra : rebase_source : de79801f0a0e295725c6bc8b8a99fe7022323956
2016-05-06 14:49:12 +12:00
Gerald Squelart
a2b3ad3b63 Bug 1266336 - Clarify expected usage of CDM wrapper - r=cpearce
Assert that the CDM wrapper is given a non-null CDM pointer.
(so GetCDM() doesn't need to be null-checked.)
Renamed WidevineVideoDecoder mCDM to mCDMWrapper, to avoid (my) confusion.
Assert that WidevineVideoDecoder is given a non-null CDM-wrapper pointer.
Assert that WidevineVideoDecoder only accesses the CDM before DecodingComplete.

Small optimization: Move aCDM into mCDM (to save an AddRef/Release pair).

MozReview-Commit-ID: yKupY067ly

--HG--
extra : rebase_source : 94140b423a04f28368de0831761406c145fad93e
2016-05-06 12:10:59 +10:00
Gerald Squelart
bb3afc2867 Bug 1266336 - Check actual CDM creation - r=cpearce
Check the return result from Widevine's CDM creation function, and handle
failure.

MozReview-Commit-ID: HYvKgdK53aQ

--HG--
extra : rebase_source : b3e28ba5e0020e3a6dd77c8a83b58be233fdc770
2016-05-05 12:04:07 +10:00
Gerald Squelart
7a14964bfb Bug 1266336 - Check sCDMWrapper before creating video decoder - r=cpearce
Ensure that there is a CDM before creating a video decoder that relies on that
CDM. This is mainly to prevent using the Widevine video decoder alone, without
decryption.

MozReview-Commit-ID: 7p49CnmV2r7

--HG--
extra : rebase_source : 49b07100b2be56584bc14f41d39d4872f0539c3a
2016-05-05 11:37:22 +10:00