Commit Graph

310 Commits

Author SHA1 Message Date
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
Bob Owen
fdc9ac4e02 Bug 1236680 Part 2: Resolve GMP path for moved Users folder. r=cpearce 2016-02-09 15:22:43 +00:00