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

26 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
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
Chris Pearce 5fe1464d84 Bug 1357133 - Recover from incorrectly guessing the CDM's shmem sizes. r=gerald
We are pre-allocating shmems in the content process for use by the CDM in the
GMP process. We guess the size of shmem required. However if we guess wrong,
currently we always end up taking the non-shmem path for video frames to
return to the content process, which results in us sending another shmem
(of the wrong size) to the CDM, and this continues until we hit the limit
on the number of shmems that we tolerate the CDM asking for.

So in this patch, I change our behaviour to detect when we're allocating
shmems that are too small, whereupon we purge the existing shmems and switch
to allocating them at the size being requested by the CDM.

This means we recover from incorrectly guessing the size of shmems required
by the CDM. The overhead of an incorrect guess should be one video frame
transferred via the nsTArray path.


MozReview-Commit-ID: 8o1s7FI2UBd

--HG--
extra : rebase_source : 0612d199686278612e8c58dc97e96a9304ea3ee9
2017-04-28 08:55:28 +12:00
Chris Pearce 967567edb5 Bug 1351953 - Pre-allocate shmems for the CDM process to use for storing decrypted and audio samples. r=gerald
Makes transfer of samples between the content and CDM processes use shmems.

The Chromium CDM API requires us to implement a synchronous interface to supply
buffers to the CDM for it to write decrypted samples into. We want our buffers
to be backed by shmems, in order to reduce the overhead of transferring decoded
frames. However due to sandboxing restrictions, the CDM process cannot allocate
shmems itself.  We don't want to be doing synchronous IPC to request shmems
from the content process, nor do we want to have to do intr IPC or make async
IPC conform to the sync allocation interface. So instead we have the content
process pre-allocate a set of shmems and give them to the CDM process in
advance of them being needed.

When the CDM needs to allocate a buffer for storing a decrypted sample, the CDM
host gives it one of these shmems' buffers. When this is sent back to the
content process, we copy the result out (uploading to a GPU surface for video
frames), and send the shmem back to the CDM process so it can reuse it.

We predict the size of buffer the CDM will allocate, and prepopulate the CDM's
list of shmems with shmems of at least that size, plus a bit of padding for
safety. We pad frames out to be the next multiple of 16, as we've seen some
decoders do that.

Normally the CDM won't allocate more than one buffer at once, but we've seen
cases where it allocates two buffers, returns one and holds onto the other. So
the minimum number of shmems we give to the CDM must be at least two, and the
default is three for safety.


MozReview-Commit-ID: 5FaWAst3aeh

--HG--
extra : rebase_source : a0cb126e72bfb2905bcdf02e864dc654e8340410
2017-03-28 18:59:11 +13:00
Chris Pearce dd0f308205 Bug 1315850 - Add GetGMPAbstractThread() to GMPUtils.h. r=gerald
MozReview-Commit-ID: G4sq6pa7jmS

--HG--
extra : rebase_source : 94dacb5107e7f098c7dde88e6d246edb9deb6a35
2017-02-23 14:04:25 +13:00
Chris Pearce d927f25dc6 Bug 1341138 - Move LogToConsole from GMPCDMProxy to GMPUtils. r=gerald
This means we can reuse LogToConsole inside the new CDM decoder backend.

This change also makes GMPUtils.cpp build in non-unified build mode.

MozReview-Commit-ID: AFkdHIos4X2

--HG--
extra : rebase_source : d31e794ce94fa724a90b1cfa842a86d119a4e2d1
extra : source : 6cad0b06a556795f6d6de123bb5a153ff06062f5
2017-02-21 13:44:58 +13:00
Chris Pearce fe31d4bd44 Bug 1332149 - Don't expose plugin-container or sandbox vouchers to GMPs. r=gerald
MozReview-Commit-ID: JZBoEptskf0

--HG--
extra : rebase_source : c2de46c71eced8fc9ad00f9fbb95f9dc9f5ee6ba
2017-01-19 14:57:30 +13:00
Chris Pearce 80a5e71248 Bug 1325185 - Fix operator precedence in GMPUtils' ToHexString(). r=gerald
MozReview-Commit-ID: 41KoItfOYts

--HG--
extra : rebase_source : b42a325a00f5939ee3c4945c1a5cee826f89c385
2016-12-22 09:20:17 +13:00
Chris Pearce 55e0da876c Bug 1324926 - Convert other EME/GMP byte logging from Base64 to Hex. r=gerald
This is marginly more readable.

MozReview-Commit-ID: DWJNFXxI7Vd

--HG--
extra : rebase_source : cb29271f3942db63da2b815e81977f98ec955968
2016-12-21 10:37:09 +13:00
Chris Pearce 9a69924b0c Bug 1324926 - Log keyId as hex when decoding video via GMP. r=gerald
MozReview-Commit-ID: DIiErrwjONo

--HG--
extra : rebase_source : 05a7b667c65ee11a80244c8c832c134cd6b05485
2016-12-21 09:54:20 +13:00
Wes Kocher 5401734deb Backed out 4 changesets (bug 1324926) for windows build bustage a=backout
Backed out changeset e57acea9a4ab (bug 1324926)
Backed out changeset 3a5fc19f492b (bug 1324926)
Backed out changeset 1694d0248f1a (bug 1324926)
Backed out changeset b0a59896aa01 (bug 1324926)
2016-12-20 16:53:41 -08:00
Chris Pearce d71275d786 Bug 1324926 - Convert other EME/GMP byte logging from Base64 to Hex. r=gerald
This is marginly more readable.

MozReview-Commit-ID: DWJNFXxI7Vd

--HG--
extra : rebase_source : bfc694c51a8f1de28a6a11155f0c3e6b723ff153
2016-12-21 10:37:09 +13:00
Chris Pearce e0308ca287 Bug 1324926 - Log keyId as hex when decoding video via GMP. r=gerald
MozReview-Commit-ID: DIiErrwjONo

--HG--
extra : rebase_source : dbc7c23a53cce7e997fdc03a9df5691ab05f7c94
2016-12-21 09:54:20 +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 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 ba52b24d0b Bug 1247556 - Use GMPInfoFileParser in GMPParent::ReadGMPMetaData(). r=gerald 2016-02-12 10:59:51 +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
Chris Pearce 8ed9d0fcbd Bug 1228215 - Add helper to do dir enumeration in GMPServiceParent. r=jwwang 2015-11-27 10:53:17 +13:00
Chris Pearce 544e62ef89 Bug 121442 - Add platform to GMP storage base dir. r=gerald 2015-10-14 12:18:06 +13:00
Chris Pearce 2ad25b6368 Bug 1194576 - Add more NSPR logging around GMP*Parent actors. r=gerald 2015-08-14 19:18:19 +12:00
Chris Pearce 8ded1472c3 Bug 1190252 - Remove use of mozilla\/Tokenizer from GMPChild so bug 1190252 can be uplift to 41. r=gerald 2015-08-11 10:27:41 +12:00
Chris Pearce c32f098f77 Bug 1190252. Backed out changeset d697030f7d59. r=backout 2015-08-10 13:38:03 +12:00
Chris Pearce 751d662f3d Bug 1190252 - Remove use of mozilla\/Tokenizer from GMPChild so bug 1190252 can be uplift to 41. r=gerald 2015-08-10 13:27:04 +12:00
Chris Pearce f877417e6a Bug 1168053 - Unified build fix in dom/media/gmp. r=jwwang 2015-05-29 14:07:22 +12:00
Chris Pearce 256c472d27 Bug 1159495 - Change Windows to Unix line endings in GMPUtils.cpp. r=whitespace 2015-05-08 13:36:37 +12:00
Chris Pearce 9f7e269f5d Bug 1159495 - Only report that Adobe EME is available if we have a plugin-container voucher. r=edwin 2015-04-30 21:52:14 +12:00