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

294 Коммитов

Автор SHA1 Сообщение Дата
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
Carsten "Tomcat" Book c72c544acd Backed out changeset c0b8f05a48d5 (bug 1246835) for bustage on a CLOSED TREE 2016-02-09 08:47:38 +01:00
Chris Pearce d5820bea46 Bug 1246835 - Reduce #ifdefs pain in GMPChild.cpp. r=gerald 2016-02-09 14:44:16 +13:00
Chris Pearce 66f7fa299a Bug 1246763 - Refactor GMP info file parsing into helper class. r=gerald 2016-02-09 14:37:22 +13:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Bill McCloskey c663839ade Bug 1240871 - Don't allow implicit "async" in IPDL (r=mccr8,billm) 2016-01-28 20:56:37 -08:00
Jean-Yves Avenard a9394d5946 Bug 1240411: P5. Clean up GMP headers. r=cpearce
Remove redundant virtual keywords
2016-01-19 19:47:32 +11:00
Chris Pearce 30838a05fa Bug 1230857 - Ensure GMPService has sufficient file permissions to delete GMPs. r=gerald
Without this, existing installs of the Adobe x64 Windows GMP from the zip file
where the GMP files are read-only will not be able to be installed.

--HG--
extra : rebase_source : 21ac7b0e4c55cc26e17f05563f61bdce65117507
2016-01-14 15:11:04 +13:00
Gerald Squelart 124e39b2ba Bug 1237842 - Unlock mMutex before calling CloseActive. r=cpearce
UnloadPlugins runs in the GMP thread. While it locks mMutex, any locking
attempt on the main thread would effectively block the main thread while we are
calling CloseActive on each plugin.
The problem is that CloseActive calls GeckoMediaServiceParent::GetSingleton(),
which dispatches a task to the main thread, which may be blocked because of
mMutex.

To solve this inter-locking issue, the list of plugins is first copied to a
local array, after which mMutex may be released, and we may now call
CloseActive without risking locking.
2016-01-12 21:22:00 +01:00
Nicholas Nethercote 524b34adf6 Bug 1237151 (part 1) - Remove ignored qualifiers in dom/media/gmp/. r=cpearce.
--HG--
extra : rebase_source : a4934ff402b3402731d6070d36dd713368d09a1f
2016-01-07 15:43:37 -08:00
Gerald Squelart 74d744c943 Bug 1236380 - GMPStorage::mShutdown=true until Init() succeeds - r=cpearce
Initialize GMPStorage::mShutdown to true, so that if Init() has not completed
yet or if it failed, other methods will not try and access a null mStorage.
2016-01-07 08:06:47 +11:00
Randell Jesup f955d91200 Bug 1226200: Don't assume a TCPSocket has only one managee (and rename LoneManagedOrNull) r=jdm 2015-12-22 10:14:23 -05:00
Chris Pearce f212540c95 Bug 1232527 - Remove GMPVideoDecoderTrialCreator and friends. r=jwwang
Remove GMPVideoDecoderTrialCreator, and the tests and IPC/IDL supporting it.

--HG--
extra : commitid : HlbJPl2gPAl
extra : rebase_source : fe1773014e5d09da264f85d464e408aca46a60c4
2015-12-15 15:17:22 +13:00
Gerald Squelart 840a670aa1 Bug 1183972 - No sync-dispatch of new GMPParent - r=cpearce
Thanks to bug 1121676, GMPParent does not need to be created and destroyed
on the main thread. Main-thread constraints have been removed.

Also, this means that GeckoMediaPluginServiceParent::ClonePlugin() and
AddOnGMPThread (running on the GMP thread) do not need to sync-dispatch the
creation on the main thread.
This should remove the deadlock that prevents
GeckoMediaPluginServiceParent::UnloadPlugins() from running on the GMP thread.
2015-12-13 14:26:00 +01:00