Граф коммитов

411 Коммитов

Автор SHA1 Сообщение Дата
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
Chris Pearce faee3cba4f Bug 1268984 - Prefer to re-use a GMPParent with the requested nodeId rather than clone. r=jesup
If you request a GMPParent with a nodeId, you should get any already running
instances with the same nodeId in preference to cloning an existing GMP and
assigning it the nodeId.

This is ensures that EME GMP actors that are same-origin run in the same GMP
instance.

The GMP gtests are failing because of the cross-origin checks in
GeckoMediaPluginServiceParent::SelectPluginForAPI(). The loop there selects the
first GMPParent that can be used from the nodeId passed in. We previously
assumed a GMPParent can be used from a nodeId if the GMPParent has the same
nodeId, or if it has not loaded its process and it has no nodeId. The problem
with assuming that, is if an in-use GMPParent with the target nodeId lies in
the GeckoMediaPluginServiceParent::mPlugins list after a GMPParent with no
nodeId, we'll end up using the first GMPParent (the one with no nodeId) rather
than the one with the target nodeId.

The solution is to change GeckoMediaPluginServiceParent::SelectPluginForAPI()
so that effectively if we have a target nodeId, we'll select the first
GMPParent that has the same nodeId, or we'll clone the first which supported
all the requested capabilities/tags.

This means when you request a GMPParent with a given nodeId, you'll get the one
with the same nodeId (origin) by preference.

MozReview-Commit-ID: 4yVnrO8B1Pg

--HG--
extra : rebase_source : 5db7c6ef5f360df7d2244ca828b68b340c4e9a41
2016-05-05 22:35:44 +12:00
Chris Pearce ad956f902f Bug 1268984 - Store GMPStorage on GMPServiceParent so that it persists inside the same PB session. r=gerald
Prior to this change, we'd store the GMPStorage records for private browsing
sessions in the GMPStorageParent. The problem with this is that they only have
a lifespan matching their corresponding GMPParent. This means that if a GMP
stores something in a PB session, and the GMP is shutdown and then re-created,
we are likely to loose the stored data. This could mean that the PB session
gets results it doesn't expect, and thus expose a way for PB mode to be
detected.


MozReview-Commit-ID: 1OMD0LvidYs

--HG--
extra : rebase_source : 75661a7b1717e39a29c3e12ad203d9273e8485ab
2016-05-05 11:41:33 +12:00
Chris Pearce cc6122ebd1 Bug 1268984 - Ensure GMPs are re-inserted in GMPServiceParent::mPlugins in the same order in ReAddOnGMPThread. r=gerald,jesup
The GMP which GeckoMediaPluginServiceParent::FindPluginForAPIFrom() returns
depends on the order in which GMPs lie in GMPServiceParent::mPlugins. However
when we shutdown a GMPParent we remove and then re-append the GMPParent to
mPlugins. This means the order in which GMPs lie in the list changes.

So when WebRTC requests an H.264 decoder, the first time it will get OpenH264,
since that's first in the list. But once we dispose of that decoder, its
GMPParent will be cloned and the clone will be appended to the end of the
list. This means the next time WebRTC requests a decoder, it'll get whatever
was next in the list.

This could be the Adobe GMP, which seems to be able to handle whatever WebRTC
is putting into it. However, if you do this enough times, you'll get the
Widevine CDM, which can't handle whatever WebRTC is putting into it.

So a quick hack to fix this is in ReAddOnGMPThread is to re-insert the clone
of the GMP into the slot in mPlugins that the original occupied. Then WebRTC
will always get OpenH264 whenever it requests for an H.264 decoder, as the
order of the GMPParents in mPlugins won't change.




MozReview-Commit-ID: Ii4AMqDqAo9

--HG--
extra : rebase_source : 62c10bc5b77ef259917aa6c88309be2423c93914
2016-05-04 13:57:20 +12:00
Chris Pearce 645ef4e747 Bug 1266286 - Ensure crash reports work for GMP used by EME code. r=mconley
Crash reporting for GMPs being used from the EME call site are not generating
crash reports because they depend on the MediaKeys object calling
GMPService::AddPluginCrashHandler() to associate a window to which the
PluginCrashedEvent is fired. This doesn't work with e10s enabled because the
GMPParent which causes the plugin crash handlers to run is in the chrome
process, but the MediaKeys which adds the handler is in the child process. So
the crash handler is on the GMPServiceChild, but we only run the crash handlers
that were added to the GMPServiceParent in the chrome/parent process.

The solution is to broadcast a message from the chrome process to all the
content processes when a GMP has crashed that causes the GMPServiceChild to
also run its crash handlers.

MozReview-Commit-ID: 8Lek16G9ZGb

--HG--
extra : rebase_source : 180691046812df474ea33324d2b98ac71d11c9cd
2016-05-04 20:32:00 -04: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
Kyle Huey 44cee0989e Bug 1268313: Part 6 - Replace NewRunnableMethod with NS_NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Kyle Huey 7311b10562 Bug 1268313: Part 2 - Replace some NewRunnableMethods with NS_NewNonOwningRunnableMethod. r=froydnj 2016-05-05 01:44:59 -07:00
Gerald Squelart 40a8d30e46 Bug 1268379 - Delay WMF checks in GMPParent - r=jesup
The WMF HasAAC/HasH264 checks were done off the main thread, as soon as the
plugin was loaded, which was way too soon in the overall startup process, when
the WMF subsystem may not have been properly initialized yet, or may be in the
middle of it.

The solution here is to delay these checks until they are actually needed to
respond to a format-support request, as they come later in the process.

Note: This may not be the ideal solution yet, as we are still relying on some
magic sequencing of events. Other avenues have been explored unsuccessfully
yet, but we may want to revisit this issue after this urgent patch has landed.

MozReview-Commit-ID: JVgINc5FLFx

--HG--
extra : rebase_source : 3d02570ed26043d050d4848d968e3c673b35f5c3
2016-05-02 15:03:11 +10:00
JW Wang 6197796b59 Bug 1268822 - rename mozilla::gmp::Runnable/SyncRunnable in order not to confuse NS_LOG_ADDREF/NS_LOG_RELEASE. r=rjesup. 2016-05-03 10:37:24 +08:00
Haik Aftandilian 01b38f360c Bug 1267453 - Amazon Widevine rejects HDCP on MacBook Pro with or without an external display. r=gcp
--HG--
extra : amend_source : 6a8094ddea6ac6c50e8ec8c11e0656eaddafc20e
2016-05-02 19:33:08 +02:00
Jim Mathies fa8be62cee Bug 1268714 - Check for failure result or a failed nsresult from SendLoadGMP. r=mccr8
MozReview-Commit-ID: 9bE9hfXiBI5
2016-04-29 13:24:30 -05:00
Carsten "Tomcat" Book dfff02b90d Backed out changeset fd833da413ad (bug 1268313)
--HG--
extra : rebase_source : f857127091900871034f44d89095895abe9932dc
2016-04-29 14:21:25 +02:00
Carsten "Tomcat" Book de92769e7e Backed out changeset 4bcb784492bb (bug 1268313)
--HG--
extra : rebase_source : f2f752ab73f5bbf31a909892a0fac0f42c894430
2016-04-29 14:21:18 +02: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 12d497cb39 Bug 1268313: Part 6 - Replace NewRunnableMethod with NS_NewRunnableMethod. r=froydnj 2016-04-28 14:08:24 -07:00
Kyle Huey 72c9966484 Bug 1268313: Part 2 - Replace some NewRunnableMethods with NS_NewNonOwningRunnableMethod. r=froydnj 2016-04-28 14:08:24 -07:00
Kyle Huey 7579799b01 Bug 1266595: Replace Chromium Task with Runnable. r=froydnj 2016-04-27 17:06:05 -07:00
Jim Mathies 86d8f2f66f Bug 1263951 - Avoid trying to initialize new GMP instances once the browser enters shutdown. r=cpearce
MozReview-Commit-ID: G6ND2LyT0tp
2016-04-26 12:11:26 -05: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
Peter Chang b9897cc163 Bug 1263499 - unify the QuickExit function, r=bsmedberg
MozReview-Commit-ID: DGJbyXULHPe

--HG--
extra : rebase_source : 26ad1fdc609060a578a27f3d44168160ec026c09
2016-04-11 16:12:33 +08:00
Chris Pearce 753e89fc45 Bug 1245789 - Expose AsyncAddPluginDirectory on GMPServiceParent. r=gerald
Now that adding GMPs to the GMP service is async under the hood, for safety
the GeckoMediaPluginServiceParent needs to expose when adding a GMP
has finished so that things that depend on GMPs being present can be reliable.
For example, the call to GMPDecoderModule::UpdateUsableCodecs() that happens
at the end of AddPluginDirectory depends on the GMPs being up to date, so it
needs to happen after the add has finished.

MozReview-Commit-ID: Fn8b0GNILNg
2016-04-12 16:12:22 +12:00
Chris Pearce 1286c752d4 Bug 1245789 - Ensure GMP service has added all plugins before running GMP remove tests. r=gerald
MozReview-Commit-ID: 488sYVQbS4x
2016-04-12 16:12:22 +12:00
Chris Pearce 4038e1e9d9 Bug 1245789 - Ensure GMPs have finished loading from MOZ_GMP_PATH before GMPServiceParent::GetContentParentFrom returns. r=gerald
This means we wait for the GMP service to have finished detecting all available
GMPs from the environment before we start creating GMP actors. Without this, we
get gtest failures due to gtests trying to create GMP actors before the async
GMPServiceParent::LoadFromEnvironment() has completed, i.e. we fail to create
actors because we've not had a chance to setup the GMPParent capabilities yet.


MozReview-Commit-ID: Hl4o1c4QthJ
2016-04-12 16:12:22 +12:00
Chris Pearce c96ec15fb4 Bug 1245789 - Change GMPParent::InitPromise to instead use GenericPromise as defined in MozPromise.h. r=gerald
This makes it easier to chain promises returned by GMPParent::Init() with calls
to GMPServiceParent::LoadFromEnvironment() in the next patch.

MozReview-Commit-ID: KdGVvzAedJW
2016-04-12 16:12:22 +12:00
Chris Pearce 4eaf999528 Bug 1245789 - Make XPCOMThreadWrapper::GetCurrent() work. r=bholley
XPCOMThreadWrapper::GetCurrent() is failing because it's not keeping
AbstractThread::sCurrentThreadTLS up to date. This causes assertion failures
during startup of the GMP stack when dispatching via InvokeAsync to the GMP
thread, which is an XPCOM thread wrapped by the XPCOMThreadWrapper.

We can trivially initialize AbstractThread::sCurrentThreadTLS to be the
XPCOMThreadWrapper on the target thread, since it's thread-local-storage, and
the target thread won't change.

MozReview-Commit-ID: EIEFZppR2PS
2016-04-12 16:12:22 +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 da09cd13c1 Bug 1245789 - Ensure Widevine's nodeId are always unique and not permitted persistent storage. r=gerald
This ensures that we don't try to use one GMP instance to service multiple same-origin MediaKeys'
CDM access, as the Widevine CDM's Chromium interface is synchronous, so it doesn't handle running
multiple decoders well. Multiple same-origin GMPs can't safely use the same storage concurrently,
but thankfully Widevine doesn't require persistent storage, so we can just disallow that entirely
and avoid the problem.


MozReview-Commit-ID: 78I4IIGgHRA
2016-04-12 16:12:21 +12:00
Chris Pearce f744c99d0c Bug 1245789 - Send name of GMPAdapter over to GMP process in StartPlugin message. r=gerald
This lets the GMPChild know whether it needs to instantiate the WidevineAdapter.

MozReview-Commit-ID: 5X6IrRZPHdu
2016-04-12 16:12:21 +12:00
Chris Pearce c4ed00c030 Bug 1245789 - Parse Chrome CDM manifest in GMPService.addPluginDir. r=gerald
This has to happen on the main thread, as WebIDL parsing only happens there.
So it has to be async.

MozReview-Commit-ID: AfAoSkQAhl3
2016-04-12 16:12:21 +12:00
Chris Pearce 446a1fe1c6 Bug 1245789 - Store GMPCapabilities by value, rather than on the heap. r=gerald
MozReview-Commit-ID: 6B2IpUEqHlQ
2016-04-12 16:12:21 +12:00
Chris Pearce 694f3fc693 Bug 1245789 - Make GMPParent::Init() return a promise, so it can be async. r=gerald
This means that when initializing the Widevine CDM, we will be able to asynchronously
parse its manifest.json on the main thread, as the WebIDL JSON parser only runs there.

MozReview-Commit-ID: GI1sc4x4m16
2016-04-12 16:12:21 +12:00
Chris Pearce 67f4ed3368 Bug 1245789 - Add abstract thread wrapper for the GMP thread. r=gerald
I need to make GMPParent::Init() async, because the WebIDL JSON parsing
must happen on the main thread, and GMPParent::Init() is called on the
GMP thread, so I need GMPParent::Init() to be async so that in the
Chrome manifest case it can dispatch a task to the main thread to parse
the Chrome manifest before completing. So I'll make GMPParent::Init()
return a promise, and to do that, I need the GMP thread to have an
AbstractThread wrapper.

MozReview-Commit-ID: 44b4Z4jpar8
2016-04-12 16:12:20 +12:00
Chris Pearce 1a971257c4 Bug 1245789 - Add Widevine CDM -> GMP adapter. r=gerald
Add a GMPAdapter implementation that adapts the Widevine Chrome CDM to
the GeckoMediaPlugin API. We're still allocating memory for video frames
in non shmem buffers, and copying them over to a shmem before returning
them to Gecko, we can fix that at a later date. I hook this adapter up
in a later patch in the series.


MozReview-Commit-ID: 7iSFODVWPu3
2016-04-12 16:12:20 +12:00
Chris Pearce f706b0c753 Bug 1245789 - Add GMPAdapter which can be passed to GMPLoader to adapt non GMP library to GMP API. r=gerald
This means we can pass a non GMP library to GMPLoader::Load() and the adapter will make it usable.


MozReview-Commit-ID: GihjX2JRw3l
2016-04-12 16:12:20 +12:00
Chris Pearce 2a0d4dd3a3 Bug 1245789 - Handle unencrypted samples in encrypted media. r=gerald
Some encrypted MP4 files lack subsample info for some samples, so we need this check
to prevent us crashing on such files.

MozReview-Commit-ID: AXqOCAlb7IY
2016-04-12 16:12:20 +12:00
George Wright e75c590407 Revert "Bug 1114647 - Rename "plugin-container" to "firefox-webcontent" and create a new executable target for Win32 called "firefox-plugin-container" r=ted,jhamer" because of widespread breakage due to whitelisted executable names in third parties
This reverts commit a94b5f861bd0d25043a3bb7a0c3128acf8c0b93a.


--HG--
rename : ipc/contentproc/firefox-webcontent.cpp => ipc/contentproc/plugin-container.cpp
2016-04-08 13:34:40 -04:00
Nathan Froyd bb79683a51 Bug 1262473 - don't needlessly construct nsAutoCString temporaries when serializing GMPVideoCodec; r=cpearce
We have nsDependentCString to avoid needless memory traffic here.  We
need an explicit cast, however, because we don't have a ParamTraits
specialization for nsDependentCString, only for nsCString, and template
specialization doesn't take derived classes into account.
2016-03-31 15:19:38 -04:00
George Wright 5c454494ce Bug 1114647 - Rename "plugin-container" to "firefox-webcontent" and create a new executable target for Win32 called "firefox-plugin-container" r=ted,jhamer
--HG--
rename : ipc/app/module.ver => ipc/app/plugin-container/module.ver
rename : ipc/contentproc/plugin-container.cpp => ipc/contentproc/firefox-webcontent.cpp
2016-04-01 02:12:59 -04:00
Kyle Huey d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07:00
Kyle Huey 20daca1a98 Bug 1258905: Remove a bunch of dead IPC code. r=jld 2016-03-28 10:28:14 -07:00
Chris Pearce 921ff0472b Bug 1258220 - Disable Adobe GMP if SSE2 isn't supported. r=gerald 2016-03-25 07:56:47 +13:00
Jean-Yves Avenard 52fb6b83da Bug 1249275: Fix mac compilation when sandbox is disabled. r=gerald
MozReview-Commit-ID: D1Xc0Ujnm74
2016-02-28 01:36:02 +11:00
Chris Pearce d681b4c0f7 Bug 1250745 - Share GMP processes when doing unencrypted decoding. r=jwwang
But make sure that there's no way a GMP can track and report what a user watches using unencrypted decoding.


MozReview-Commit-ID: DljjYjcziRS

--HG--
extra : rebase_source : 1c4204ff69df0ed03015c069736831e5f8b35a29
2016-02-24 14:38:56 +13:00
Chris Pearce 173de1feeb Bug 1249424 - Remove use of nsAutoArrayPtr from librlz. r=gerald
MozReview-Commit-ID: 2eXvcgbSQM0

--HG--
extra : rebase_source : 0397373e89a73972512d6d8178105c5ce57100a6
2016-02-24 10:53:10 +13:00
Chris Pearce 1db0b39f51 Bug 1247763 - Remove info file parsing from GMP child process. r=gerald
The only reason we need to parse the info file in the GMP child process
is because we need to read the "Libs:" line so that the child process
can preload DLLs on Windows. We already parse the GMP info file in the
parent process, so we can remove the need to parse it again if we parse
the "Libs" field in the parent, and pass that through to the child.
2016-02-24 07:21:47 +13:00
Aidin Gharibnavaz 6863090c8a Bug 1235830 - Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEvent r=smaug
MozReview-Commit-ID: Hm8Owq17KXn

--HG--
extra : transplant_source : 2%82%D5%89%19%94%7C%E7%CA1%99%B5%24%1F5%E1%C0%1F%DE%07
2016-02-12 19:10:07 +03:30
Chris Pearce ba52b24d0b Bug 1247556 - Use GMPInfoFileParser in GMPParent::ReadGMPMetaData(). r=gerald 2016-02-12 10:59:51 +13:00
Chris Pearce c098d0e875 Bug 1246835 - Reduce #ifdefs pain in GMPChild.cpp. r=gerald 2016-02-10 15:48:45 +13:00
Bob Owen 61758e667a Bug 1236680 Part 3: Add #ifs to include to fix bustage. r=me 2016-02-09 15:35:44 +00:00