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

531 Коммитов

Автор SHA1 Сообщение Дата
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 27f8f13960 Bug 1316215 - Merge SelectGMP and LaunchGMP into one synchronous IPC operation. r=gerald
We were seeing almost permaorange failures in the WebRTC H.264/GMP tests
due to the GMP being shutdown in the parent process in between the
content process performing an OOP select operation and then performing
an OOP launch operation.

That is, in GeckoMediaPluginServiceChild::GetContentParent() in between
the SendSelectGMP completing and the SendLaunchGMP completing, the GMP
would shutdown and so when the launch operation ran in the main process
it would fail.

The select and launch are seperate operations so that the crash handler
can be reported to the content process and an association can be made
in the content process between the plugin ID and the crash helper before
we try to launch the GMP. This is so that if the GMP crashes on startup,
we're ready to handle the crash.

However it turns out that if the GMP crashes on startup, the crash report
message comes in after another round of the event/IPC message loop. So we
actually do have time in the content process to connect the crash helper
after the launch fails.

So in order to fix the problem of the GMP shutting down in between select
and launch, we can partially revert the changes I made in Bug 1267918 to
merge selecting and launching GMPs back into a single operation.


MozReview-Commit-ID: 5n4T1Gqlvr3

--HG--
extra : rebase_source : 6e6892a5e32a485b5bfc2f93bddb2d2fe5a422bd
2016-11-22 14:17:59 +13:00
Chris Pearce 39f5dc88d5 Bug 1316215 - Make GMPParent::IsUsed() take into account whether there are pending GetContentParent calls. r=gerald
In a similar vein to the previous patch, while we're waiting on a
GetContentParent promise to resolve, we don't want the GMPParent
to shutdown. So make IsUsed() check whether we're waiting on a
GetContentParent promise to resolve, so we don't pull the rug out
from under any code waiting to get a content parent to bridge a
GMP.

MozReview-Commit-ID: 8cTCuXLXMsK

--HG--
extra : rebase_source : 8cc04d57ea1ef4e48c7ff088dbb12eabe4b3b223
extra : source : f79a51d9bd193024f7359ba6ff75076b15d15faf
2016-11-18 12:37:14 +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
Jed Davis 8f3f056572 Bug 1313808 - Part 1: Move LinuxSandboxStarter back into libxul. r=cpearce,glandium,tedd
MozReview-Commit-ID: FAReOZX7Rvn

--HG--
extra : rebase_source : 01d0d1970822b5af6a37ff450ac01408f871237a
2016-11-08 14:23:47 -07:00
Gerald Squelart c22dcadd40 Bug 1318228 - Replace nsAutoPtr with UniquePtr in GMPCDMProxy - r=cpearce
MozReview-Commit-ID: Hy4rag5UbsZ

--HG--
extra : rebase_source : d3802b3e0e22cb1ef982eecc4c1a5b016f0ff6aa
2016-11-17 18:40:28 +11:00
Sylvestre Ledru caf1487b6c Bug 1317430 - Avoid a unnecessary copy by passing a const & in dom/media/ r=jya,pehrsons
MozReview-Commit-ID: 9MDVY9mgui0

--HG--
extra : rebase_source : d077c3f4d39e9914c591a0ef671a7db99679c608
2016-11-14 23:15:53 +01:00
Chris Pearce 0a0e9d8f06 Bug 1317822 - Move GMPCrashHelper into its own file. r=gerald
MozReview-Commit-ID: 7CinZ2Y2Fmz

--HG--
extra : rebase_source : 3b176cbfadebf6463384105c261ff208bc58b1c2
2016-11-16 11:35:36 +13:00
Chris Pearce eac0e11773 Bug 1317473 - Make GMPService accept paths with mixed dir separators. r=jesup
The mochitest harness on Windows sets MOZ_GMP_PATH to paths with a mixture of
Windows and UNIX dir separators, and the NS_NewLocalFile() call in
GMPServiceParent::AddOnGMPThread() fails on this input.

We've had this problem before, and if we fixed the test harness to give us
input with platform specific line endings somebody would likely just break this
again someday and have this issue again, so just make the GMP service normalize
the paths it's given to have consistent dir separators.

This makes test_peerConnection_basicH264Video.html pass when run
locally on my Windows machine.


MozReview-Commit-ID: 88hSvTdZuWg

--HG--
extra : rebase_source : 2cf63ccd1155e59f9745163cf4a28d3bdb7012ba
2016-11-15 10:56:43 +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
Andi-Bogdan Postelnicu 65ae72060c Bug 1317241 - Use C++11's override and remove virtual where applicable in dom/ r=baku
MozReview-Commit-ID: 8jUAehd1odv

--HG--
extra : rebase_source : 13375a14447ce344214fa30babf540de0a394c6a
2016-11-15 13:09:07 +02:00
Andi-Bogdan Postelnicu aaf2063029 Bug 1317241 - Replace default bodies of special member functions with = default in dom/. r=baku
MozReview-Commit-ID: 12AHOhrpaNO

--HG--
extra : rebase_source : 7881277a13fe7389b95635ee9b94f1686f56d142
2016-11-14 11:40:37 +02:00
Andi-Bogdan Postelnicu 4df235170d Bug 1317241 - Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in dom/. r=baku
MozReview-Commit-ID: CST7fV4h20h

--HG--
extra : rebase_source : 663d24e9c15d7b42023f1557b75fb8dabfc9b6a9
2016-11-14 11:35:58 +02:00
Chris Pearce 6f8b365df3 Bug 1306314 - Allow Widevine CDM process to contain multiple CDM instances and to have persistent storage. r=gerald
This change ensures that we don't create a new random node Id for every
MediaKeys object using Widevine - which has the effect of ensuring
Widevine CDMs that are same origin get created in the same process, and
that persistent storage can be used and retrieved.

MozReview-Commit-ID: K55rkcu9jWo

--HG--
extra : rebase_source : ebca24d2eeb4acd5fb14e0063cf2065c419853b1
2016-11-14 11:43:45 +13:00
Chris Pearce d60faf6fad Bug 1306314 - Use decryptor ID in WidevineAdapter to link decryptors with decoders. r=gerald
Store a mapping of decryptor ID to the CDM instance that the corresponding
WidevineDecryptor is using. This allows us to link GMPDecryptor instances
with the corresponding GMPVideoDecoder.

The CDM is stored inside the CDMWrapper, so that we destroy the CDM instance
when the last reference to the CDM is dropped.

MozReview-Commit-ID: FQYzh77yjoC

--HG--
extra : rebase_source : 772d4bead18a9b88e7f9ee30b0f169a192322e24
2016-11-11 15:39:10 +13:00
Chris Pearce 451c0b5421 Bug 1306314 - Pipe decryptor ID through to WidevineAdapter. r=gerald
MozReview-Commit-ID: HqRoImDhuFl

--HG--
extra : rebase_source : b153d8f7557c0bbf78ed04c01dd11b2400c324a7
2016-11-11 14:55:56 +13:00
Chris Pearce 1b21fde486 Bug 1306314 - Pass decryptor ID to GMPVideoDecoder constructor. r=gerald
Retrieve the ID of the GMPDecryptor from the GMPCDMProxy, and pass that
through to the GMPVideoDecoder's constructor.

MozReview-Commit-ID: IuNsSroZ9Zu

--HG--
extra : rebase_source : d678628dec67a059aec06918f07ea93ecc54a5f9
2016-11-14 11:07:02 +13:00
Chris Pearce b430a8a481 Bug 1306314 - Add an ID to GMPDecryptor instances, reflect that on CDMProxy. r=gerald
This enables us to identify GMPDecryptor instances in the child process, so that
in a later patch when we create a GMPVideoDecoder instance, we can associate it
with a GMPDecryptor. Then the cdm::ContentDecryptionModule8 instance that these
two actors are adapted to can know whom it's supposed to respond to.

We use the IPDL PGMPDecryptorChild actor ID as the GMPDecryptor's ID. This is unique
per GMP process, which is sufficient.

MozReview-Commit-ID: 7NKND9VjPUW

--HG--
extra : rebase_source : da14d9a8a7313a609e30649af1a23e79b3e401fe
2016-11-11 12:10:43 +13:00
Iris Hsiao d9a1a0a083 Backed out changeset 9e9727bdc484 (bug 1306314) 2016-11-14 11:07:39 +08:00
Iris Hsiao 891306a89a Backed out changeset 9343cb73c218 (bug 1306314) 2016-11-14 11:07:28 +08:00
Iris Hsiao 8be72fb1e5 Backed out changeset e2a5702d96b0 (bug 1306314) 2016-11-14 11:07:23 +08:00
Iris Hsiao 85b8be1656 Backed out changeset d37e28309560 (bug 1306314) 2016-11-14 11:07:19 +08:00
Iris Hsiao cd600c5ab4 Backed out changeset 5c5600e1f30f (bug 1306314) for bustage 2016-11-14 11:07:13 +08:00
Chris Pearce 21137c728b Bug 1306314 - Allow Widevine CDM process to contain multiple CDM instances and to have persistent storage. r=gerald
This change ensures that we don't create a new random node Id for every
MediaKeys object using Widevine - which has the effect of ensuring
Widevine CDMs that are same origin get created in the same process, and
that persistent storage can be used and retrieved.

MozReview-Commit-ID: K55rkcu9jWo

--HG--
extra : rebase_source : 9bd789d05d1f5ed0a00eeb9870668e6335e899e6
2016-11-14 11:43:45 +13:00
Chris Pearce 14a0cc34ed Bug 1306314 - Use decryptor ID in WidevineAdapter to link decryptors with decoders. r=gerald
Store a mapping of decryptor ID to the CDM instance that the corresponding
WidevineDecryptor is using. This allows us to link GMPDecryptor instances
with the corresponding GMPVideoDecoder.

The CDM is stored inside the CDMWrapper, so that we destroy the CDM instance
when the last reference to the CDM is dropped.

MozReview-Commit-ID: FQYzh77yjoC

--HG--
extra : rebase_source : 7e8c264200e904a4f5a1311f11cd317d98df9791
2016-11-11 15:39:10 +13:00
Chris Pearce 7af167a212 Bug 1306314 - Pipe decryptor ID through to WidevineAdapter. r=gerald
MozReview-Commit-ID: HqRoImDhuFl

--HG--
extra : rebase_source : 7c8459af145e948a15eade34a842df92184353d4
2016-11-11 14:55:56 +13:00
Chris Pearce 5926bef365 Bug 1306314 - Pass decryptor ID to GMPVideoDecoder constructor. r=gerald
Retrieve the ID of the GMPDecryptor from the GMPCDMProxy, and pass that
through to the GMPVideoDecoder's constructor.

MozReview-Commit-ID: IuNsSroZ9Zu

--HG--
extra : rebase_source : 6f1db4a019deaedac07fa15c1958270268dcb941
2016-11-14 11:07:02 +13:00
Chris Pearce ec543ad267 Bug 1306314 - Add an ID to GMPDecryptor instances, reflect that on CDMProxy. r=gerald
This enables us to identify GMPDecryptor instances in the child process, so that
in a later patch when we create a GMPVideoDecoder instance, we can associate it
with a GMPDecryptor. Then the cdm::ContentDecryptionModule8 instance that these
two actors are adapted to can know whom it's supposed to respond to.

We use the IPDL PGMPDecryptorChild actor ID as the GMPDecryptor's ID. This is unique
per GMP process, which is sufficient.

MozReview-Commit-ID: 7NKND9VjPUW

--HG--
extra : rebase_source : 6ea7dfa358f8d13f7d36db5a581fc075268038b7
2016-11-11 12:10:43 +13:00
Chris Pearce 5cba5b5a25 Bug 1314858 - Refactor multiple callers of HasPluginForAPI into a helper. r=gerald
I've repeated myself a few times, so make a helper to make determining which
GMPs are available easier.

MozReview-Commit-ID: 2fFLeaA5o8u

--HG--
extra : rebase_source : 74ea0b429d339273535610df3bbd7fec7beae469
2016-11-03 14:33:31 +13:00
Chris Pearce 7250493ddc Bug 1314858 - Remove GMPDecoderModule::UpdateUsableCodecs. r=gerald
MozReview-Commit-ID: 7678JImLL9T

--HG--
extra : rebase_source : 77cd678431669cc3932cfaabc7034e546b92166c
2016-11-02 15:31:21 +13:00
Chris Pearce d6045d04f6 Bug 1314858 - Make content process cache of GMP capabilities thread safe. r=gerald
MozReview-Commit-ID: 5zTFlfReBne

--HG--
extra : rebase_source : 90e6018b6574c0d2f5a51ad56ab87ef5b535f124
2016-11-02 09:47:00 +13:00
Chris Pearce c28985ad89 Bug 1314445 - Remove GMPService::GetPluginVersionForAPI. r=gerald
MozReview-Commit-ID: ybq6ZZlA9P

--HG--
extra : rebase_source : 1a8356740cbb9d73f7d851cb82f8b71c0ca364c4
2016-11-02 11:57:14 +13:00
Chris Pearce ca6cc0c8f4 Bug 1314797 - Dispatch 'gmp-changed' notification after updating GMP capabilities. r=gerald
This ensures that when requests for keysystem access in the content process
retry, they do so on an up-to-date set of capabilities.

MozReview-Commit-ID: JxmlZnFhKYs

--HG--
extra : rebase_source : 6e02777be6a0692c7e157d3ab0a1952c3017c208
2016-11-03 11:18:29 +13:00
Chris Pearce 70807a8f54 Bug 1312540 - Remove GetGMPPluginVersionForAPI IPC. r=mconley
MozReview-Commit-ID: EKtFKd1dgjJ

--HG--
extra : rebase_source : 5ebac34f9346fc76e56e070e32d948e46169c085
2016-11-01 18:48:18 +13: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
Chris Pearce f7f660aaf4 Bug 1312540 - Simplify behaviour of GMP::GetPluginVersionForAPI. r=gerald
We only have one version of a GMP installed at once anyway. This version code
is to support Adobe Primetime, and that's disabled.

Making the behaviour of this code simpler will make it easier to have the
same behaviour of the GetGMPVersion code in e10s and non-e10s mode.

I will be removing this code soon, but I will do that in a later patch, so as
to not complicate the uplift.

MozReview-Commit-ID: 3cn7GhihWzm

--HG--
extra : rebase_source : f4e3470794a2a3dd1d97b8e78fe21df887854dc0
2016-11-01 16:36:00 +13:00
Chris Pearce 0a480d38f2 Bug 1312540 - Maintain a cache of GMPs capabilities in content processes. r=billm,gerald
In order to avoid doing a synchronous call from content process to chrome
process in order to determine what GMPs are usable, maintain a cache of GMP
capabilities in the content processes.

We must seed the cache when content processes are created, as the GMP service
is started up and GMPs are added to it before the first (or any subsequent)
content process is created.


MozReview-Commit-ID: Eb4Pu81XHmn

--HG--
extra : rebase_source : ef5de4dd17ee337ca378569691e55d4cfb7939ef
2016-11-01 16:25:19 +13:00
James Cheng 472ba25796 Bug 1313878 - Use lambda to create runnable for dispatching to main thread in GMPCDMCallbackProxy.cpp r=cpearce
MozReview-Commit-ID: 2X1oWsL29n9

--HG--
extra : rebase_source : 0f652a7449f5af13641144811dc8e1d5457242db
2016-10-30 03:48:26 +08:00
Chris Pearce f98c7aa8b5 Bug 1313202 - Convert InvalidAccessErrors coming out of the Widevine CDM to TypeErrors like Chrome does. r=gerald
MozReview-Commit-ID: FEY08LZheTf

--HG--
extra : rebase_source : e6ddc8a5f7740a5e09822ea1b16ca58b05dee919
2016-10-27 14:04:10 +13:00
Kilik Kuo 55bf555b74 Bug 1303922 - Part 2: Remove KeyStatusChanged/ForgetKeyStatus IPDL messages. r=cpearce
MozReview-Commit-ID: Flx2SQI7lM0

--HG--
extra : transplant_source : %40p%5C%C3%06%D0m%0C/%7B%0C%5B%A2%93o%F6%A1%1B%00%7D
2016-10-04 17:19:53 +08:00
Kilik Kuo 4d162fcd4a Bug 1303922 - Part 1: Make EME keystatuschanged information notified in batch. r=cpearce
MozReview-Commit-ID: IeExaQ62qTF

--HG--
extra : transplant_source : t%D4%AFxu%D6%40%F8hU%D2%94%D4q8q%EDy%08-
2016-10-04 17:18:46 +08: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
James Cheng 2e79d305fc Bug 1302881 - Undefined behavior in GeckoMediaPluginServiceParent::RemoveOnGMPThread(). r=cpearce
MozReview-Commit-ID: KgMYm936lbL

--HG--
extra : rebase_source : 0d1a533ef0d9aacb27f2e3ae830d61fd59e8d67f
2016-09-23 07:24:21 +08:00
Cervantes Yu a703779628 Bug 1279612 - Block xpcom-will-shutdown before GMPServiceParent instances are shut down. r=gerald
MozReview-Commit-ID: HdF1RDxVXv1

--HG--
extra : rebase_source : f532fd60bd07ab91c6e089822258a0e3d7102a7b
2016-09-08 11:08:27 +08:00
Phil Ringnalda fa1e0afddb Backed out changeset b82fa1825412 (bug 1279612) for static analysis bustage
CLOSED TREE
2016-09-21 20:46:01 -07:00
Cervantes Yu 4cbbce3d03 Bug 1279612 - Block xpcom-will-shutdown before GMPServiceParent instances are shut down. r=gerald
MozReview-Commit-ID: HdF1RDxVXv1

--HG--
extra : rebase_source : caf2279eb5aa57a74a035c45d81fcb4ee29ef42f
2016-09-08 11:08:27 +08:00
Michael Layzell c47fca1cd7 Bug 1018486 - Part 1: Changes in dom/, r=baku
MozReview-Commit-ID: 4tCUM4KRe81
2016-09-07 10:50:35 -04:00
Tim Huang 52370e14ba Bug 1278037 - Part 4: Modify the mozIGeckoMediaPluginChromeService.forgetThisSite() to take the originAttributes pattern as an argument. r=cpearce
--HG--
extra : rebase_source : c480a89fabd99a6ead348c172e68f524dbb2b458
extra : histedit_source : 145d639edff67799e33dd2c4592b4f5902b872e5
2016-07-28 11:46:06 +08:00
Andi-Bogdan Postelnicu 038e7bc3cc Bug 1299749 - removed unused variable from SessionMessageTask. r=baku
MozReview-Commit-ID: 6QfkkCfQ60

--HG--
extra : rebase_source : 8dd222b4218f4b461e547713c5e0f45998a3569c
2016-09-01 11:55:49 +03: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
James Cheng c6899c4863 Bug 1290830 - [Part2] Remove the GMP types using genral types instead. r=cpearce
MozReview-Commit-ID: 3EKwTNPddI1

--HG--
extra : rebase_source : 00f7267a76ad299b52d02b16425bb266ee58985b
2016-08-02 15:05:21 +08:00
James Cheng b74f50bca9 Bug 1290830 - [Part1] Detach the GMPDecryptorProxyCallback interface to DecryptorProxyCallback. r=cpearce
MozReview-Commit-ID: EPGf0ITakPO

--HG--
extra : rebase_source : 1186be0680789c1f9e66366e549fd5ec5b418a38
2016-08-01 17:37:18 +08:00
Ryan VanderMeulen 69113163cf Merge m-c to inbound. a=merge 2016-08-24 09:09:05 -04: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
Chris Pearce e3566aa24b Bug 1266938 - Add explicit to ctors for helper classes in WidevineVideoDecoder. r=bustage 2016-07-27 11:27:08 +12:00
Bryce Van Dyk 306b3774aa Bug 1266938 - Prevent WidevineVideoDecoder emitting out of order frames. r=cpearce
It was possible for WidevineVideoDeocder when allocating shmems for frames to
become reentrant. If a further frame was allocated during this reentrancy it
would be returned before the first frame being allocated. As frames are fed into
the decoder in order, altering this order for returned frames would result in an
out of order display.

This is addressed by keeping a deque of frames and allocating them in order.

There are changes to guard again reentracy issues with draining also. Previously
it was possible to drain a decoder, but still have a frame allocation be
pending, resulting in a drain being completed, and a frame being returned follow
that. This has been addressed by not draining during reentrancy.

MozReview-Commit-ID: LcIsmyabqAv

--HG--
extra : transplant_source : %DB%F7%E3%DC%2AkZ%9D%11Xc%06a%A0%21%EB%05%0E%BDp
2016-07-26 11:23:10 +12:00
Carsten "Tomcat" Book b9a6c687fa merge mozilla-inbound to mozilla-central a=merge 2016-07-25 15:50:41 +02:00
Chris Pearce d183d8433b Bug 1288976 - Use gmp-changed rather than gmp-path-added to retry MediaKeys requests. r=gerald
We're already routing the "gmp-changed" observer service notification over from
the chrome process to the content process, and it fires at pretty much the same
time as the "gmp-path-added" notification (and a few more) so we can just switch
to have the MediaKeySystemAccessManager listen on that notification instead, and
we'll be e10s compatible.




MozReview-Commit-ID: EowFDfdWgAJ

--HG--
extra : rebase_source : ad01990278cf9005f6676ef0b7fa0acbf69249eb
2016-07-25 10:18:34 +12:00
Chris Pearce 30716f1d57 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 : b9aa1b66ad23e9f7ddbe60b71c94c161ad974818
2016-07-14 13:33:48 +12:00
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
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