Commit Graph

122 Commits

Author SHA1 Message Date
James Cheng
59439b26b7 Bug 1401114 - Replace 'if (NS_FAILED(' with 'if (NS_WARN_IF(NS_FAILED(' under dom/media/gmp. r=gerald
MozReview-Commit-ID: 8ThoMrmlHNx

--HG--
extra : rebase_source : ae5095a7f756576cd9f7951651f060c67bc5e2a3
2017-09-19 16:14:49 +08:00
James Cheng
daea8f027c Bug 1395468 - [Part3] Remove WidevineAdapter and its related classes. r=cpearce
We now only use the Chromium CDM interface, so there is no need to check isWidevine.
We don't use WidevineAdapter anymore so remove the related check and unused classes.

MozReview-Commit-ID: 3y1lH3OMhwL

--HG--
extra : rebase_source : 955395f3bbbd523236e9ac2480ef21093a281084
2017-08-29 17:42:25 +08:00
James Cheng
9d0d797c01 Bug 1395468 - [Part1] Remove media.eme.chromium-api.enabled preference and its related code. r=cpearce
1. Delete MediaPrefs::EMEChromiumAPIEnabled() and related logic.
2. We now only use the Chromium CDM interface so delete the opposite side check of MediaPrefs::EMEChromiumAPIEnabled().

MozReview-Commit-ID: GDFrrf4WlWf

--HG--
extra : rebase_source : 987667dd47757afd58e7da10b60c0e1e1ec89d39
2017-08-29 16:13:15 +08:00
Bob Owen
459f9f007d Bug 1383611: Pre-load psapi.dll for widevine CDM as it needs it for GetMappedFileNameW. r=cpearce 2017-07-24 20:01:06 +01:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book
8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey
6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey
4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bill McCloskey
d6affd5261 Bug 1365098 - Convert NS_GetCurrentThread uses in dom/media (r=cpearce)
MozReview-Commit-ID: DUPt6xj49zz
2017-06-12 20:20:08 -07:00
JW Wang
316a8afe47 Bug 1361942 - Store ActualArgTypes instead of ArgTypes for we are sending data of ActualArgTypes types to another thread. r=gerald
This allows more use of the implicit version of InvokeAsync() without specifying the storage types explicitly.

MozReview-Commit-ID: 40WisaVX8Jy

--HG--
extra : rebase_source : ba34515788f0bc8264fac9a6897e234966d8b762
extra : source : b651963fe562755c0b2998ae6a95ffad400060ad
2017-05-03 12:34:50 +08:00
Chris Pearce
0901ad8256 Bug 1315850 - Ask the GMPService for the GMP thread in GMPParent::ChildTerminated. r=gerald
When we shutdown the browser while the GMPService is active we can end up
leaking a GMPParent, GeckoMediaPluginServiceParent, and a Runnable. I tracked
this down to the runnable dispatched to the GMP thread in
GMPParent::ChildTerminated(). The dispatch of this runnable is failing as we
are dispatching the runnable to a reference of the GMP thread which we have
previously acquired, but that thread is now shutdown. So the dispatch fails,
and if you look in nsThread::DispatchInternal() you'll see that we deliberately
leak the runnable if dispatch fails! The runnable leaking means that the
references it holds to the GMPParent and the GMP service parent leak.

The solution in this patch is to not cache a reference to the GMP thread on the
GMPParent; instead we re-request the GMP thread from the GMPService when we
want it. This means that in the case where the browser is shutting down,
GMPParent::GMPThread() will return null, and we'll not leak the runnable. We'll
then follow the (hacky) shutdown path added in bug 1163239.

We also need to change GMPParent::GMPThread() and GMPContentParent::GMPThread()
to return a reference to the GMP thread with a refcount held on it, in order
to ensure we don't race with the GMP service shutting down the GMP thread
while we're trying to dispatch to in on shutdown.

MozReview-Commit-ID: CXv9VZqTRzY

--HG--
extra : rebase_source : e507e48ee633cad8911287fb7296bbb1679a7bcb
2017-03-24 13:38:00 +13:00
Chris Pearce
dd99f726b7 Bug 1315850 - Ensure GMPParent checks whether the adapter version is present. r=gerald
This ensures that when we're using the ChromiumAdapter that we actually ask it
whether it'll work, rather than asking the adapter we're not using.

MozReview-Commit-ID: 85nZPl9MdWa

--HG--
extra : rebase_source : 90de89bec9b004859c3c2c09ed8efbd255acc141
2017-02-20 11:48:32 +13:00
Chris Pearce
3904ad1466 Bug 1315850 - Add GMPService::GetCDM. r=gerald
Infrastructure necessary to create an instance of the CDM process.

MozReview-Commit-ID: 7oQ86x6BNWj

--HG--
extra : rebase_source : c725a958c507b7f93ce9cfccc475f259ae9ccbc2
2017-02-22 09:26:47 +13:00
JW Wang
017020976f Bug 1346678 - Label runnables in dom/media/gmp/GMPParent.cpp and its friends. r=cpearce
MozReview-Commit-ID: DWYx30T7gCJ

--HG--
extra : rebase_source : 68caf369926ea08cd7a56846c1de1cf75a6c54e6
extra : intermediate-source : b57189c8fa07cc066cf430358401c471b0927063
extra : source : b014f243626f5361a496edacb639a663abea2964
2017-03-09 15:31:11 +08:00
David Anderson
0c95d36053 Allow finalizing external crash reports from CrashReportHost. (bug 1338281 part 4, r=billm) 2017-02-15 14:44:30 -08:00
David Anderson
da43dac799 Store the child process thread id in CrashReporterHost. (bug 1338281 part 2, r=billm) 2017-02-15 14:44:29 -08:00
David Anderson
a1f1be7f91 Store extra annotations directly on CrashReporterHost. (bug 1338281 part 1, r=billm) 2017-02-15 14:44:29 -08:00
David Anderson
64b9b4aa19 Replace GMP use of PCrashReporter with shmem-based annotations. (bug 1337518, r=billm) 2017-02-12 11:39:44 -08:00
Chris Pearce
67b9555200 Bug 1332530 - Remove code to pass nodeId to GMP process. r=gerald
MozReview-Commit-ID: Kw4Bx7zzkN1

--HG--
extra : rebase_source : 8b57219ff8856dfa33476c57449a55c9e12a5d37
2017-01-19 15:14:45 +13:00
Andrew McCreight
1951ea01ff Bug 1321871, part 1 - Replace use of opens and bridges in GMP protocols with endpoints. r=peterv
This removes the open of PGMPContent from PGMP, the bridge of
PGMPService and PGMP from PGMPContent, and the spawn of PGMP from
PGMPService. I did these changes all at once because the way the
bridges works it was hard to split it up.

--HG--
extra : rebase_source : d9311e3047b9855ad422838f5a8b6bfdc382d225
2017-01-05 12:55:27 -08:00
Chris Pearce
04b9e257a7 Bug 1332951 - On Linux check whether Widevine CDM can be sandboxed before advertising we support it. r=jld
We already do this in GMPParent::ReadGMPInfoFile(), and I neglected to check
this in the Chromium/Widevine manifest parsing code. This means we won't add
the GMPParent to our list of GMPParents, and so
navigator.requestMediaKeySystemAccess won't advertise that we support Widevine.


MozReview-Commit-ID: 7x7pbO5vC5e

--HG--
extra : rebase_source : 6d220066d01921d67f0ccf917cb94da887ea01a8
2017-01-23 11:38:15 +13:00
Bevis Tseng
f2bdbd8fd1 Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
MozReview-Commit-ID: 9yJi3iDtVZG

--HG--
extra : rebase_source : 39c720ccc576ed9247b5e8abb70d99d7873b3ad6
2016-11-29 13:03:36 +08:00
Chris Pearce
abf5ab3771 Bug 1331829 - Remove async shutdown GMP API. r=gerald
Now that we're not supporting Adobe EME anymore, we don't need to
provide a mechanism for GMPs to block browser shutdown.

MozReview-Commit-ID: KUC94IBQiod

--HG--
extra : rebase_source : ed521f28e272de11b2d0c4546b98baf6bd7c6e72
2017-01-18 15:01:56 +13:00
Ryan VanderMeulen
3aad788019 Merge m-c to inbound. a=merge 2017-01-18 09:54:06 -05:00
Chris Pearce
22f4a343b5 Bug 1329543 - Remove obsolete GMPDecryptor7 interface that was only used by Primetime. r=gerald
This basically rolls back aec9905b06fe from bug 1278198.

MozReview-Commit-ID: Drho21X6npW

--HG--
extra : rebase_source : 372bc7f4771ec0268535e3df2a745bc9fae8bd3b
2017-01-16 15:12:15 +13:00
Chris Pearce
95c18b7326 Bug 1329543 - Remove kEMEKeySystemPrimetime. r=gerald
MozReview-Commit-ID: FNvnpZVPMMt

--HG--
extra : rebase_source : c65d007a9894830bd3b85638dcc8c37b5f36fed5
2017-01-14 11:26:37 +08:00
Wes Kocher
813009d982 Backed out 2 changesets (bug 1319159) for frequent media test failures a=backout
Backed out changeset afb84605c3c4 (bug 1319159)
Backed out changeset a14cade8b962 (bug 1319159)

MozReview-Commit-ID: 1ZWV6BPE8ne

--HG--
extra : source : 68c824ad72b817189143af771bb34408c72ad495
2017-01-13 13:23:56 -08:00
Jay Harris
6f7214ca07 Bug 1319159 - Updates how 'ParseChromiumManifest' works so that it doesn't assume Widevine (now it assumes Widevine or Clearkey..). r=cpearce
MozReview-Commit-ID: 8m6hPIiUPT

--HG--
extra : rebase_source : 1e8de4d233e15cda3f08f1ca556ea4f82eb6cebe
extra : amend_source : 50a7e80ff09bd6cb1f4033425c136b4552cbda41
2016-12-22 11:28:40 +13:00
Jay Harris
f4929b46d1 Bug 1319159 - Updates how 'ParseChromiumManifest' works so that it doesn't assume Widevine (now it assumes Widevine or Clearkey..). r=cpearce
MozReview-Commit-ID: 8m6hPIiUPT

--HG--
extra : rebase_source : 457da21982f35b66eac1ff32316ceee243139652
extra : histedit_source : 4ebc011309b9013952435bf0ff32206a73de0854
2016-12-22 11:28:40 +13:00
Gerald Squelart
926a1eab6b Bug 1313497 - Use InvokeAsync with Storages in GMPParent - r=jya
MozReview-Commit-ID: EQQFDzvAs8O

--HG--
extra : rebase_source : d5985a84058c3cab55e8896a8e74c36e62ddf150
2016-11-13 16:53:05 +11:00
Carsten "Tomcat" Book
61849e269d merge mozilla-inbound to mozilla-central a=merge 2016-11-24 16:41:59 +01:00
Jay Harris
7a7b0325f0 Bug 1319197 - Remove audio decoding from gmp-clearkey. r=cpearce
MozReview-Commit-ID: EA0AAoDjWUh

--HG--
extra : transplant_source : 1D%21%1C%21%15%F7A%CD%EF-%C9%8FS%ECl%A8%9A%DC%B5
2016-11-22 14:32:26 +13:00
Chris Pearce
4fa2a5c829 Bug 1316215 - Block GMPContentParent close while a GMPService::GetContentParent is being processed. r=gerald
When GMPService::GetContentParent returns a MozPromise, we end up failing in
test_peerConnection_scaleResolution.html with e10s enabled because we Close()
the GMPContentParent twice. The test causes two GMPVideoEncoderParents to
be created. When the number of IPDL actors on the GMPContentParent reach 0,
we close the IPC connection. With GetContentParent() returning a MozPromise,
it's more async, and so we can end up requesting the content parent in order
to create the second GMPVideoEncoderParent, but while we're waiting for
the promise to resolve the previous GMPVideoEncoderParent is destroyed and
the GMPContentParent closes its IPC connection. Then the GetContentParent
promise resolves, and that fails to operate correctly since it's closed its
IPC connection.

My solution here is to add a "blocker" that prevents the GMPContentParent from
being shutdown while we're waiting for the GetContentParent promise to resolve.

MozReview-Commit-ID: HxBkFkmv0tV

--HG--
extra : rebase_source : 59aa7bcfe8b8f44274d136d6147a946542a64fff
extra : source : 59ab10349b58b0fbe13dca9312ec82332f7c3dbe
2016-11-16 10:59:08 +13:00
Chris Pearce
c93e08bf59 Bug 1316215 - Promisify GMPService GetGMPContentParent and GetServiceChild. r=gerald
MozReview-Commit-ID: 5ydGmZWGzWG

--HG--
extra : rebase_source : bc61628e97243db55b68d1efc93e7b55f32628e5
extra : intermediate-source : 7ca4bd360797b8207d26e46192400307cf046593
extra : source : eda96f88317dbf0c696aeaab8993bf2f030517c0
2016-11-09 15:52:22 +13:00
Kan-Ru Chen
f8100451db Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
Chris Pearce
43a9f990fb Bug 1312540 - Use GMP caps cached in content process for GetPluginVersion. r=gerald
MozReview-Commit-ID: 1nDHsW527Tu

--HG--
extra : rebase_source : b3c7d8ec04b2ebb78f03b3620b2cd2498b35a1e6
2016-11-01 16:55:08 +13:00
James Cheng
48efb9caad Bug 1300654 Part1-Remove MOZ_EME from code base. r=cpearce,smaug
MozReview-Commit-ID: JboGO0w4tcE

--HG--
extra : rebase_source : abfe53f30081f74fc39c900cab48d08c7574bfec
2016-09-08 18:06:20 +08:00
Ryan VanderMeulen
520acfd195 Merge inbound to m-c. a=merge 2016-08-25 08:10:52 -04: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
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +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
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10: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
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
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
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