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

30 Коммитов

Автор SHA1 Сообщение Дата
James Cheng a18e6f1765 Bug 1406080 - Part1 - Make ChromiumCDMAdapter and ChromiumCDMChild compatible with CDM version 8 and 9. r=cpearce
MozReview-Commit-ID: HXT2hcCX2jT

--HG--
extra : rebase_source : 7300b1d571defaab18638e4a7e60075c19821f1c
2017-10-11 23:39:47 +08:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07: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 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
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 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 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 2c28e66665 Bug 1209385 - Backout 417dab86a413 and 6078e8b4878b. r=backout 2015-10-14 19:42:25 +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 a76b46867d Bug 1209385 - Crash GMPs that don't respond to GMPVideoDecoder::Reset(). r=jwwang 2015-09-30 06:56:07 +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 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
Ehsan Akhgari 4ebeb72f7b Bug 1155178 - Part 2: Rename GMPUnique to GMPUniquePtr; r=cpearce 2015-04-20 08:29:51 -04:00
Ehsan Akhgari 623b3ca075 Bug 1155178 - Part 1: Convert GMPUnique into a template alias; r=cpearce 2015-04-20 08:28:44 -04:00
Matthew Gregan 554ea67ff5 Bug 1131340 - Avoid template aliasing since GCC 4.6 lacks support. r=cpearce 2015-02-10 14:27:36 +13:00
Matthew Gregan f29aff15e4 Bug 1124021 - Fix dangerous UniquePtr usage pattern in GMP. r=cpearce 2015-01-20 18:39:00 +13:00