Commit Graph

552 Commits

Author SHA1 Message Date
Chris Pearce
57b480eb64 Bug 1315850 - Stub out ChromiumCDMProxy. r=gerald
This will eventually replace GMPCDMProxy. Methods will be implemented in later
patches.

MozReview-Commit-ID: 86pwo81tFZv

--HG--
extra : rebase_source : df41a20a0fefaf26a63ed18f1ccdf7fa5a3a1e89
2017-02-22 14:42:32 +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
cc97ebecaf Bug 1315850 - Implement trivial cdm::Host functions. r=gerald
MozReview-Commit-ID: 5OsopZbflf1

--HG--
extra : rebase_source : dd262cc875ece0d82b4af002341ee0566125a401
2017-03-13 13:26:13 +13:00
Chris Pearce
a6d74267e5 Bug 1315850 - Add ChromiumAdapter which we can use instead of WidevineAdapter. r=gerald
We currently use an adapter object to adapt plugins that don't conform to the
GMP interface to the GMP interface.

We use the WidevineAdapter to talk to the CDM from the two GMP IPDL protocols.
We will be using a single protocol to talk to the Chromium CDM, so we need a
new adapter which handles that.

MozReview-Commit-ID: F7hnZ9oo9mJ

--HG--
rename : dom/media/gmp/widevine-adapter/WidevineAdapter.cpp => dom/media/gmp/ChromiumCDMAdapter.cpp
rename : dom/media/gmp/widevine-adapter/WidevineAdapter.h => dom/media/gmp/ChromiumCDMAdapter.h
extra : rebase_source : 7c08edea3c11d41eb3ecfa9c7a8ef65cf3b8ddb0
2017-03-13 16:59:34 +13:00
Chris Pearce
92a1e35192 Bug 1315850 - Add GMP_LOG macro. r=gerald
To make adding more logging easier.

MozReview-Commit-ID: IB7tAeiNX85

--HG--
extra : rebase_source : c76f1f5f88f53abc4929d21abf6fabf1e47e6056
2017-02-22 09:45:54 +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
ae66452fa5 Bug 1315850 - Add GMPService::GetContentChild() with unresolved NodeId. r=gerald
We currently do two sync IPCs to launch a GMP; one from content to main process
to get the nodeId and a second to get a GMPContentParent for that nodeId.

We use the nodeIds to ensure that the GMPVideoDecoder and GMPDecryptor actors
correspond to the same CDM instance/process. However once we switch to having
one protocol that encompasses both decryption and decoding, we don't need to
worry about making sure our decoder and decryptor actors match up, as we only
have one underlying connection to the CDM instance.

So we can merge the get nodeId and get GMPContentParent operations into a
single operation that does both. To do this, we just need to pass the
parameters used to calculate the nodeId in the LaunchGMP message.

Once we've switched EME over to using the CDM via a single actor, we can remove
the nodeId nsCString from our media code and from GMPVideoDecoder and
GMPVideoEncoder.


MozReview-Commit-ID: 7GXlJ37fOTZ

--HG--
extra : rebase_source : cf20a165048f777f34dab01fce984018ad641b85
2016-11-25 10:30:38 +13:00
Chris Pearce
e140103fca Bug 1315850 - Add PChromiumCDM.ipdl for Widevine CDM. r=gerald
The implementations of this protocol will be stubbed out in later patches.

MozReview-Commit-ID: 622CB1BOoR9

--HG--
extra : rebase_source : b796bfb4c0d0d2872787043e3b9fc83a0e6b09ea
2017-02-23 11:51:00 +13:00
Chris Pearce
5d1431a1c2 Bug 1349008 - Include SystemGroup.h in GMPVideoEncoderParent to fix unified build bustage caused by bug 1346681. r=jwwang
MozReview-Commit-ID: DncNbBYbNn8

--HG--
extra : rebase_source : f726807ecb87fd814a1933f292ab52e00ba8166f
2017-03-21 11:35:10 +13:00
JW Wang
37496c6b4a Bug 1345761 - Remove the unused do_GetMainThread() call. r=gerald
MozReview-Commit-ID: CFWh4tCKbF5

--HG--
extra : rebase_source : ccf526edc0719c4a31a90d7b8ef135dba3d8114e
2017-03-09 15:15:42 +08:00
JW Wang
7ca0324d6d Bug 1346679 - Label runnables in dom/media/gmp/GMPCDMCallbackProxy.cpp. r=cpearce
MozReview-Commit-ID: 1h2SaxHf0F

--HG--
extra : rebase_source : f73e9954d593124ad50bbcd3c15fdf5c2e053320
extra : source : 41faede1bc233157bf29130df6eced2d925395dc
2017-03-10 16:07:04 +08: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
JW Wang
40cebfcf14 Bug 1346681 - Label runnables in dom/media/gmp/GMPVideoEncoderParent.cpp. r=jesup
MozReview-Commit-ID: GZqomJdBKxB

--HG--
extra : rebase_source : 352873047782018373349e42621847dcbfb71b79
extra : source : 29322d55a49e3555a1ab02f34cbb68cd3afb279e
2017-03-10 16:44:41 +08:00
JW Wang
3be61ebd8d Bug 1345753 - Pass the event target to the CDMProxy constructor. r=cpearce
MozReview-Commit-ID: 94QzJ5FnGDo

--HG--
extra : rebase_source : b863f95c7906327f00eb8e08dd5b7f37a3b3cc6c
extra : source : 6e6242c50af23128b23d3b955a081481cec0b6e2
2017-03-09 14:58:18 +08:00
JW Wang
2df35d6eb8 Bug 1345324 - Label runnables for CDMProxy sub-classes. r=cpearce
MozReview-Commit-ID: Fpf29Kctmxs

--HG--
extra : rebase_source : 24612112d4b474812e5fdcd2e14cd3679715c098
extra : source : f5d085c3221ec54785f9c98a5fd0eda78d446641
2017-03-07 15:32:10 +08:00
Chris Pearce
af3f34b472 Bug 1345341 - Ensure Widevine expiration time of 0 means 'never expire'. r=jwwang
MozReview-Commit-ID: DtJnwDo7KZq

--HG--
extra : rebase_source : de55240a54c28046eda20530f610248ba2a02161
2017-03-08 17:00:07 +13:00
Carsten "Tomcat" Book
087da3f0d9 merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
Chris Pearce
0310952278 Bug 1343140 - Output a black frame if Widevine CDM refuses to decode due to losing a key. r=gerald
MozReview-Commit-ID: JQon5f87FSF
2017-03-03 14:10:28 +13:00
Sebastian Hengst
945e8d94fc Backed out changeset bb2103358f84 (bug 1343140) for build bustage. r=backout on a CLOSED TREE 2017-03-06 19:34:25 +01:00
Chris Pearce
d28c90112d Bug 1343140 - Output a black frame if Widevine CDM refuses to decode due to losing a key. r=gerald
MozReview-Commit-ID: JQon5f87FSF

--HG--
extra : rebase_source : be26f24968cee69ded5f7ceb8f1a99e25032afe5
2017-03-03 14:10:28 +13:00
Chris Pearce
076bd77329 Bug 1344614 - Improve GMP clock precision to match Chromium's CDM clock. r=jwwang
The clock that GMP currently exposes to CDMs has second precision. Whereas the
clock that Chromium exposes to CDMs has microsecond precision. We should use
the same clock as Chromium does (since we have its code in our tree already) so
that our CDM harness is as compatible to Chromium as possible.

MozReview-Commit-ID: FssZZFg4vhn

--HG--
extra : rebase_source : 8fab078ba0ecf351a9a8147d3f7434d40a2e0a25
2017-02-27 10:42:59 +13:00
Chris Pearce
756932ea4e Bug 1341894 - Correct encryption subsamples in AVCC -> AnnexB conversion. r=jya
This menas we can have GMPVideoDecoder's AVCC -> AnnexB conversion done by the H264Converter, and
simplify the code in WidevineVideoDecoder.

MozReview-Commit-ID: 3HT5VXth6LL

--HG--
extra : rebase_source : b840489edafa5dc981ba44f722d92083a40e34cd
2017-02-23 11:00:28 +13:00
Chris Pearce
2a8e086d7d Bug 1337778 - Use counter for decryptor ID instead of IPDL actor Id. r=gerald
The work I did in bug 1306314 seems to have either regressed or never worked
properly for multiple CDM same origin processes. I'd guess the decryptor IPDL
protocol actor ID must not be as unique as I thought. So if we just use a
counter managed by the GMPDecrytorChild, we'll get a per CDM unique ID, which
is sufficient.

MozReview-Commit-ID: KSh72ptX5fn

--HG--
extra : rebase_source : 9dd558aa9b2e9154e70fc328009b79e1daa884b2
2017-03-01 17:19:08 +13:00
Chris Pearce
6425456721 Bug 1342822 - Backed out changeset 70bc7d4e8512 (bug 1338924). r=gerald
MozReview-Commit-ID: DXGgfMMghOD

--HG--
extra : rebase_source : e5d329122754dfab6750ff2aedadc1f65a52f0f8
2017-02-27 13:58:27 +13:00
Chris Pearce
892e18f12e Bug 1342822 - Backed out changeset a379d64f8496 (Bug 1338924 patch 3). r=gerald
MozReview-Commit-ID: 4aFx52mwpQ6

--HG--
extra : rebase_source : 45cfb3aba27e93d49c5ebf64510d0143f1c57654
2017-02-27 13:57:39 +13:00
Carsten "Tomcat" Book
e6b82618f4 merge mozilla-inbound to mozilla-central a=merge 2017-02-23 14:59:37 +01:00
Jeff Walden
d73ce21741 Bug 1287006 - Adjust media/ code to not pass Maybe (or any class containing a Maybe member) by value, only by reference or pointer. r=jw_wang, r=rjesup
--HG--
extra : rebase_source : 176a2afde5772bbdf43f0f6dc8082201acadcf4f
2017-02-13 09:07:40 -08:00
Carsten "Tomcat" Book
a7cadef96e Merge mozilla-central to mozilla-inbound 2017-02-22 14:40:19 +01:00
Jean-Yves Avenard
5de1d8e882 Bug 1322739: P1. Fix style and headers. r=gerald
MozReview-Commit-ID: L24Q7fX06Z0
2017-02-22 13:02:58 +01:00
Chris Pearce
83077824b8 Bug 1341497 - Move WidevineBuffer and WidevineDecryptedBlock into WidevineUtils. r=gerald
This makes it easier to reuse in the ChromiumCDM code.

Also add an ExtractBuffer() method, which allows us to Move() the contained nsTArray
out without needing to copy the data.

MozReview-Commit-ID: 9suJSfXTVYy

--HG--
extra : rebase_source : 6eec99eb5329f3b8c3bb14d22459fee3bd95caf5
2017-02-22 15:55:38 +13:00
Iris Hsiao
97fb7c952a Backed out changeset 5ec123aec8aa (bug 1341497) for bustage 2017-02-22 11:49:25 +08:00
Chris Pearce
994e1136fd Bug 1341497 - Move WidevineBuffer and WidevineDecryptedBlock into WidevineUtils. r=gerald
This makes it easier to reuse in the ChromiumCDM code.

Also add an ExtractBuffer() method, which allows us to Move() the contained nsTArray
out without needing to copy the data.

MozReview-Commit-ID: 9suJSfXTVYy

--HG--
extra : rebase_source : 89540b254249833cf8bb09792bb33cc402977d5a
2017-02-22 15:55:38 +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
7e95ac21ed Bug 1341135 - Rename CDM log macro from Log to CDM_LOG. r=gerald
This prevents the Log macro from colliding with the Log function on
IPC ParamTraits definitions.

MozReview-Commit-ID: Hd2v6ilbmGc

--HG--
extra : rebase_source : d26d495878706fe5a2009dd33d226cc71193be13
2017-02-21 13:07:10 +13:00
Wes Kocher
72ecfb5fd6 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 7gVISUXnm2Q
2017-02-22 15:07:12 -08:00
Chris Pearce
2bca71e81c Bug 1341441 - Include nsPrintfCString in GMPVideoDecoderParent.cpp. r=gerald
Sometimes the build breaks because this file uses nsPrintfCString but
doesn't include its header.

MozReview-Commit-ID: CcawXkMucdA

--HG--
extra : rebase_source : 3b36138053c1ffa557fd59af37cf1cfa4166493a
2017-02-22 10:45:22 +13:00
Tom Tromey
5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Jean-Yves Avenard
52e09e4b68 Bug 1340129: P1. Allow empty raw frames. r=gerald
MozReview-Commit-ID: AU0QrahHtYe

--HG--
extra : rebase_source : 34604298e01db1b7b481fc55c25cb5f23e806fa2
2017-02-16 23:41:44 +01:00
Carsten "Tomcat" Book
b218b4c6ae merge mozilla-inbound to mozilla-central a=merge 2017-02-16 13:15:55 +01:00
Wes Kocher
3797956aa6 Merge m-c to inbound a=merge
MozReview-Commit-ID: BemR756HJnR
2017-02-15 16:33:03 -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
Sebastian Hengst
ba05030db7 Backed out changeset 5cc18343abdd (bug 1339748) for failing test_eme_canvas_blocked.html on Linux x64 asan. r=backout 2017-02-16 00:57:07 +01:00
Chris Pearce
c5863900ee Bug 1338924 - Throttle decrypts to 2s of content per 1s of wall time. r=gerald
This ensures we don't trigger any of the CDMs in-built throuput
limiting protections.

MozReview-Commit-ID: EgNn8WpUZZg
2017-02-10 22:20:43 +13:00
Chris Pearce
c6244a170d Bug 1338924 - Add GMPTask that takes/runs a lambda and a simple mechanism to set a timer on a lambda task. r=gerald
I'll use this for timers in a later patch.

MozReview-Commit-ID: J9QsMmrAWoI
2017-02-14 11:09:38 +13:00
Chris Pearce
4c05a6c492 Bug 1338924 - Pass duration of sample being decrypted to CDM. r=gerald
MozReview-Commit-ID: 3UujuYPpfJi
2017-02-14 11:29:32 +13:00
Sylvestre Ledru
0866d209a2 Bug 1338086 - Remove useless else blocks in order to reduce complexity in dom/media/gmp* r=cpearce
MozReview-Commit-ID: FaKW6Sb721i

--HG--
extra : rebase_source : f05a20bceeca69cb129067037e67f7bb57f5f450
2017-02-09 10:31:55 +01:00
Chris Pearce
9ee30b68ff Bug 1339755 - Move DecryptJob id calculation into its constructor. r=jwwang
The job id is just a counter, so rather than have other users of DecryptJob
reimplement their own counter, we can push the id/counter code into DecryptJob
itself.

MozReview-Commit-ID: 3RB8ctplWkK

--HG--
extra : rebase_source : f6cd7fddb2bf208419cf314cd7b01c508d68b49e
extra : source : 9b18193d0c1ccdedec25f7395fe124a86660b9d5
2016-12-01 11:23:27 +13:00
Chris Pearce
cb48e7686c Bug 1339755 - Move GMPCDMProxy::DecryptJob out of GMPCDMProxy. r=jwwang
This means it can be used in other CDMProxies, specifically the
upcoming Chromium CDM code in bug 1315850.

MozReview-Commit-ID: G26xclqhtSw

--HG--
extra : rebase_source : 041c2cb41ba444e0dea8de3ddcc6a119d480f4f7
extra : source : c7f66edac83a6662d99f59a48f70c539f8ccecc8
2016-12-01 10:57:58 +13:00