Commit Graph

126 Commits

Author SHA1 Message Date
Chris Pearce
3bb7ad5953 Bug 1308076 - Rename CLEARKEY_KEY_LEN to CENC_KEY_LEN. r=jwwang
This better reflects that it's used for all CENC keys, not just ClearKey keys.

MozReview-Commit-ID: 9uCzDKVDLjc

--HG--
extra : source : 3307b3e0d411ceb9888f10afdbebc07ab9efce61
2016-10-07 11:14:04 +13:00
Chris Pearce
8b3c096a18 Bug 1308076 - Don't statically link mfplat.lib into gmp-clearkey. r=glandium
We're loading functions from that library dynamically in gmp-clearkey anyway,
we don't need to statically link this.


MozReview-Commit-ID: AKwP5aWLsK3

--HG--
extra : source : 857f21f44316ef8125fedf8db22b5d3191d9c7e9
2016-10-07 11:20:05 +13:00
Chris Pearce
35e13f726f Bug 1308076 - Move ClearKeyCencParser to PsshParser library. r=glandium
To validate the PSSH init data passed to EME, I'd like to reuse the same
PSSH parser that the ClearKey CDM shared library uses. So move the code
out of gmp-clearkey and into its own library, so we can link it statically
into code that needs to use it.



MozReview-Commit-ID: 7xSUSmCueJz

--HG--
rename : media/gmp-clearkey/0.1/ClearKeyCencParser.cpp => media/psshparser/PsshParser.cpp
rename : media/gmp-clearkey/0.1/ClearKeyCencParser.h => media/psshparser/PsshParser.h
extra : source : 78dcbc5d3c26547c63269eb14034a67863cf28de
2016-10-06 20:23:38 +13:00
Kilik Kuo
21f4832a64 Bug 1303662 - Avoid accessing uninitialized member while debugging. r=cpearce
MozReview-Commit-ID: IX4bI9HB8Ub

--HG--
extra : rebase_source : c3d33f757e228788546b234711f3f8e4f51424ce
2016-10-07 18:40:34 +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
Kilik Kuo
eafec00033 Bug 1289968 - [Part2] Provide max length limitation for KeyIds and Webm Initdata, then correct cooresponding web-platform-tests meta file. r=gerald
MozReview-Commit-ID: DbaF1wZXwav

--HG--
extra : transplant_source : %F4%FF%5E%E4%DBN%B8%15%23%2A%BD%E3%D4P%DF%A8%98n%F7%ED
2016-09-17 03:24:49 +08:00
Chris Pearce
ee9ca0dd5e Bug 1289968 - [Part1] Ensure ClearKey doesn't assume keyIds can only be 16 bytes. r=cpearce
MozReview-Commit-ID: Hf2IQsAHa4r

--HG--
extra : transplant_source : %D1%2C%B2j%1C%F5%A7%A9%D8%0B%EEE%92%B1%DC1%A5A%BC%8B
2016-08-01 16:28:10 +12:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Chris Pearce
a2a8662207 Bug 1289931 - Fire InvalidAccessError instead of AbortError when ClearKey's generateRequest is passed invalid initData. r=gerald
Google's Web Platform EME test expects this, and it makes sense.

MozReview-Commit-ID: CCuEHYintob

--HG--
extra : rebase_source : 7b2a9f38b5c22ecb0af8b9a2e270eaa7d0bf2da0
2016-07-28 11:08:27 +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
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
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
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
Chris Pearce
b6c7bf750a Bug 1287000 - Ensure ClearKey's CENC PSSH parser can handle PSSH boxes with a 0 size field. r=jwwang
Google's Web Platform EME tests contain a CENC PSSH box with a 0 size field.
Our existing PSSH parser in our ClearKey plugin doesn't handle this well, it
gets stuck in an infinite loop. We should really handle everything that Chrome
handles, so we should handle this input.

We also shouldn't really be using raw pointers in the PSSH parser.

So rewrite the PSSH parser to use a ByteReader, and handle an invalid 0 sized
common SystemID box.

Also add gtests for the parser, and skip over PSSH boxes with unknown SystemIDs
(if they have valid sizes that is).


MozReview-Commit-ID: CdVPpphAJV

--HG--
extra : rebase_source : e9a1b439f8b371653c2c97322a2db64cafef6dd8
2016-07-15 09:31:07 +12:00
Gerald Squelart
23c839e07f Bug 1274637 - Detect OOB copy attempts in clearkey decryptor - r=cpearce
MozReview-Commit-ID: LgXe8xrQvzs
2016-05-26 19:46:40 +02:00
Benoit Girard
89a2736994 Bug 1278036 - Rename Endian.h to BigEndian.h for case insensitive Linux builds. r=cpearce
MozReview-Commit-ID: CePIpZZEjD

--HG--
rename : media/gmp-clearkey/0.1/Endian.h => media/gmp-clearkey/0.1/BigEndian.h
extra : rebase_source : a05ccec4e75da7f0bc1eb1a38c2f7e84b82d31ce
2016-06-05 13:24:51 -04:00
Chris Peterson
8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07: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
Jacek Caban
01fffbb313 Bug 1257270 - Use std::nullptr_t instead of nullptr_t in WMFUtils.h. r=cpearce 2016-03-17 10:39:46 +01:00
Mike Shal
f33175df08 Bug 1254950 - Remove several media Makefile.ins; r=ted
MozReview-Commit-ID: 4dvngHQnH0b
2016-03-14 18:02:02 -04:00
Chris Pearce
966cf53003 Bug 1232527 - Call into WMF PDM to determine if WMF can decode instead of using GMPVideoDecoderTrialCreator. r=jwwang
Resurrect WMFDecoderModule::HasAAC() and HasH264(), and use those in
MediaKeySystemAccess.cpp to figure out whether we gmp-clearkey can decode,
rather than assuming Vista and later is always able to decode, as that's not
a valid assumption; Vista may not have the required Platfor Update installed,
or we may be on Windows N or KN without the Media Feature Pack.

--HG--
extra : commitid : 2QrVAGQ5OJa
extra : rebase_source : 8ad6e5c5f87cf2b2489f049543c021723927901a
2015-12-15 14:50:59 +13:00
Chris Pearce
9654972991 Bug 1230026 - Support 'webm' initDataType format for MP4 ClearKey initData. r=gerald 2015-12-04 07:24:11 +13:00
Chris Pearce
373cfa1365 Bug 1229508 - Support current and previous GMP_API_DECRYPTORs. r=gerald
To allow GMPs time to update to new GMPDecryptor versions, we support the
latest GMPDecryptor version, and the previous.

In order to support a consistent interface to Gecko, we adapt the previous
GMPDecryptor version to the latest in the GMP child process.  So Gecko always
thinks it's talking to the latest version.

We also make gmp-fake deliberately support the previous GMPDecryptor version,
to ensure this code path remains tested.
2015-12-02 15:37:09 +13:00
Chris Pearce
d6743b5aff Bug 1186406 - Copy input to ClearKey's decoder, so we can return its containing shmem earlier. r=gerald
We're failing in the "Very rough kill-switch" case in
GMPVideoDecoderParent::Decode() we find that too many shmems are in use when we
come to send a "Decode" message to the GMP, and that causes an error which
percolates up to cause the test failure.

This patch changes gmp-clearkey to copy the input encrypted and compressed
sample and immediately return the shmem to the parent process. We are
copying the data anyway when we decrypt, so we can rejigg things so that we
don't actually end up doing a second copy.
2015-12-01 18:13:58 +13:00
Chris Pearce
efc8956d13 Bug 1228461 - Implement keyids initData type for ClearKey. r=gerald 2015-11-27 17:13:40 +13:00
Chris Pearce
ad73151891 Bug 1228461 - Don't assert we must have keys for keyIds we've seen in ~ClearKeySession(). r=gerald 2015-11-27 17:13:35 +13:00
Mike Hommey
6a40d83fb7 Bug 1224452 - Straighten up a couple things in some moz.builds. r=gps
We're going to change how e.g. CFLAGS are printed out in backend.mk, and
to fit that model, the data in the corresponding moz.build variables
need to be straightened up.
2015-11-26 08:50:52 +09:00
Chris Pearce
f74bb6b010 Bug 1226430 - Remove alg from ClearKey license parser. r=gerald 2015-11-23 09:58:51 +13:00
Chris Pearce
efe66b4aca Bug 1214469 - Ensure gmp-clearkey accounts for mNumInputTasks when flushing. r=gerald 2015-10-14 19:42:24 +13:00
Chris Peterson
71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Edwin Flores
e12b94321f Bug 1185388 - Limit the number of cores used by WMF in ClearKey CDM - r=cpearce 2015-09-01 17:31:48 +12:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Jacek Caban
8f93a52f18 Bug 1197282 - Include <atomic> in VideoDecoder.h. r=cpearce 2015-08-25 12:40:20 +02:00
Edwin Flores
970d4a0c2b Bug 1195939 - Flush decode queue on Reset() in gmp-clearkey - r=cpearce 2015-08-19 15:06:36 -07:00
Ryan VanderMeulen
10835ff78b Backed out changeset 18f274867bcc (bug 1195939) for Windows EME test failures.
CLOSED TREE
2015-08-18 23:06:55 -04:00
Edwin Flores
1c281c3c56 Bug 1195939 - Flush decode queue on Reset() in gmp-clearkey - r=cpearce
--HG--
extra : rebase_source : 50f989518611a723342193837fac89a9c2d9e14f
2015-08-18 13:48:38 -07:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Gerald Squelart
0cf2393949 Bug 1182363 - Added missing 'else' to prevent wrong error logging. r=edwin 2015-07-09 18:22:00 +02:00
Chris Pearce
e811a7d2e6 Bug 1181436 - Use 'gmp-api/' prefix consistently in includes in gmp-clearkey. r=gerald 2015-07-08 17:12:47 +12:00
Gerald Squelart
f4ccd23df1 Bug 1173631 - [EME] Implement async shutdown in clearkey GMP. r=cpearce
--HG--
extra : rebase_source : d6e510b5e081d581524a38a684a9cc677a5bde34
2015-06-11 22:05:00 +02:00
Chris Pearce
461ef61358 Bug 1169129 - Test that an EME GMP can instantiate a plugin before report we support that keySystem. r=edwin 2015-06-05 21:55:51 +12:00
Botond Ballo
2e2a504271 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj
--HG--
extra : source : 7468f9a3aa03520a29e138d4df431f0b5d90967c
2015-05-26 14:33:55 -04:00
Phil Ringnalda
49dd872168 Back out 3 changesets (bug 1119980) for emulator-l bustage
CLOSED TREE

Backed out changeset 12ce98475c6e (bug 1119980)
Backed out changeset bdb8d05f8870 (bug 1119980)
Backed out changeset a68a18840492 (bug 1119980)
2015-05-25 18:48:51 -07:00
Botond Ballo
9934d127c1 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj
--HG--
extra : rebase_source : 4e915a12ba662ed45788238a5f0a45533888bd92
2015-05-25 20:45:17 -04:00