Commit Graph

61271 Commits

Author SHA1 Message Date
Chris Pearce
6d19fe826f Bug 1315850 - Port the work around from Bug 1343140 to the new CDM video decoder architecture. r=gerald
MozReview-Commit-ID: EV0bieXIxYM

--HG--
extra : rebase_source : 404709f1aee80465a953fce1a1e715d49ebfbe35
2017-03-14 17:17:05 +13:00
Chris Pearce
e156a08c17 Bug 1315850 - Rename DetailedPromise Status enum. r=gerald
X11.h #defines 'Status' and 'Failed' and 'Succeeded' which conflicts with
the enum in DetailedPromise. So rename the 'Status' enum in DetailedPromise
so that the build works on Linux.

Some of my changes here caused DetailedPromise to be included in more
places that it was before, which caused build failures on Linux.

MozReview-Commit-ID: KV5xKixXR3J

--HG--
extra : rebase_source : ef6cab901d74b78f613660f263f5e453d6044536
2017-03-13 10:42:36 +13:00
Chris Pearce
caac622c6d Bug 1315850 - Implement CDM persistent sessions. r=gerald
This is required for the browser clearing persistence tests to pass.

MozReview-Commit-ID: Ai9qc6Ds1IG

--HG--
extra : rebase_source : 80c2133e26742410fda983e3c18c35736fc013d0
2017-03-09 19:09:43 +13:00
Chris Pearce
cfe7c116ce Bug 1315850 - Hook up CDM storage. r=gerald
MozReview-Commit-ID: 9gHcMZvmMfg

--HG--
extra : rebase_source : 186f35455264aaa144fd7b1887b8ca2476ac03b2
2017-03-22 16:30:54 +13:00
Chris Pearce
bf0e67458a Bug 1315850 - Shutdown ChromiumCDMParent. r=gerald
MozReview-Commit-ID: E82ETFS90eH

--HG--
extra : rebase_source : 6f0d72f76e313b55f7c905d5878c63b8d7292b1b
2017-03-09 17:34:18 +13:00
Chris Pearce
4c421503a8 Bug 1315850 - Shutdown CDMVideoDecoder. r=jya
This severs the ChromiumCDMVideoDecoder's connection with the CDM. The CDM process
will shutdown when the MediaKeys also severs its connection.

MozReview-Commit-ID: Aqc4y5Nxjvc

--HG--
extra : rebase_source : 5a2f77ffe84f9b99b4668520c838b29a428578d3
2017-03-08 10:20:33 +13:00
Chris Pearce
dbc1c7bcdf Bug 1315850 - Implement CDM video decoder drain. r=jya
MozReview-Commit-ID: 5RbrWyLglRf

--HG--
extra : rebase_source : 3f9636503523f0c6effab15fa89cce25a961a0b4
2017-03-07 16:37:21 +13:00
Chris Pearce
abcd1aee62 Bug 1315850 - Implement CDM video decoder flush. r=jya
MozReview-Commit-ID: 3CzwfOCXGP

--HG--
extra : rebase_source : 8ee1ae28a36779484717c6b105ef7730dd1896b3
2017-02-14 22:42:26 +13:00
Chris Pearce
6f73601a0b Bug 1315850 - Implement video decoding through CDM. r=jya
At this stage, I store video frames in memory in nsTArrays rather than in
shmems just so we can get this working. Once this is working, I'll follow up
with patches to switch to storing all large buffer traffic between the CDM and
other processes in shmems.

I'm not planning on preffing this new CDM path on until that's in place.

MozReview-Commit-ID: LSTb42msWQS

--HG--
extra : rebase_source : b7f162515a1a32b2c344c11d0fa5c7004cec2e15
2017-03-09 11:32:15 +13:00
Chris Pearce
a181e5dc64 Bug 1315850 - Initialize video decoder. r=jya
MozReview-Commit-ID: 559SP0ECldq

--HG--
extra : rebase_source : b6d499cafef2d6a6558b0db703b60320dea67803
2017-03-09 18:17:50 +13:00
Chris Pearce
33d324d5b1 Bug 1315850 - Add threadsafe ChromiumCDMProxy::GetCDMParent. r=gerald
The MediaKeys accesses the ChromiumCDMProxy on the main thread. But the
ChromiumCDMVideoDecoder will need to access the ChromiumCDMProxy on the decode
task queue in order to get a reference to the ChromiumCDMParent so that it can
talk to the CDM (on the GMP thread).

Additionally we'll need to shutdown the ChromiumCDMProxy, and if we do that
on the main threrad while the ChromiumCDMVideoDecoder is trying to get the
ChromiumCDMParent reference, we could hit thread safety issues.

So we need to hold a lock while reading or writing from the ChromiumCDMProxy's
reference to the ChromiumCDMParent. So add a GetCDMParent() function to the
ChromiumCDMProxy which takes the lock while reading or writing the reference.

This means that the caller will always get a valid reference. There is no guarantee
that the ChromiumCDMParent isn't shutdown after the reference is taken; if that
happens, the ChromiumCDMParent returned will fail on all operations.

In a later patch in this series, the ChromiumCDMProxy will anull its reference
to the ChromiumCDMParent on shutdown, and cause GetCDMParent to return null.
So callers need to null check the return value of GetCDMParent.

MozReview-Commit-ID: 4xL41YbwkxL

--HG--
extra : rebase_source : aa854e9d88965d7da60231d6f6a3912bf6ad2eeb
2017-03-13 13:47:20 +13:00
Chris Pearce
42faf7c8fa Bug 1315850 - Create CDM video decoder in EMEDecoderModule. r=jya
MozReview-Commit-ID: 3xgFxg1WfmY

--HG--
extra : rebase_source : 018abf2b8e1b351a29ba62275a2681fe9ea4fc24
2017-03-08 16:20:09 +13:00
Chris Pearce
ffe9c27064 Bug 1315850 - Stub out ChromiumCDMVideoDecoder. r=jya
MozReview-Commit-ID: 6I9N1c1nNMF

--HG--
extra : rebase_source : 6c5a3706b37e122a67e5ec1670587f37e25a1bc6
2017-03-09 18:17:14 +13:00
Chris Pearce
c60d6c1294 Bug 1315850 - Add CDMProxy::AsChromiumCDMProxy(). r=gerald
This means the EME PDM implementation can safely tell when a CDMProxy is a
ChromiumCDMProxy, so we can create an appropriate MediaDataDecoder for it (in
the next patch).

MozReview-Commit-ID: CpL6QRa7SwJ

--HG--
extra : rebase_source : 3821c378c73067066f3cc67499680bdf546fb4f0
2016-12-15 11:32:03 +13:00
Chris Pearce
dd99f726b7 Bug 1315850 - Ensure GMPParent checks whether the adapter version is present. r=gerald
This ensures that when we're using the ChromiumAdapter that we actually ask it
whether it'll work, rather than asking the adapter we're not using.

MozReview-Commit-ID: 85nZPl9MdWa

--HG--
extra : rebase_source : 90de89bec9b004859c3c2c09ed8efbd255acc141
2017-02-20 11:48:32 +13:00
Chris Pearce
4961ac416a Bug 1315850 - Send decrypt operations to Chromium CDM. r=gerald
We still use the same EMEDecryptor MediaDataDecoder as is used by the existing
EME decrypting path.

MozReview-Commit-ID: 3pXPjChctLb

--HG--
extra : rebase_source : 67575a02290ddb871510dd88f59fdab77658b3ce
2017-03-09 11:31:07 +13:00
Chris Pearce
ed269500ea Bug 1315850 - Add more logging to Chromium CDM actors. r=gerald
MozReview-Commit-ID: 2DcprLAE1bg

--HG--
extra : rebase_source : b7de793c7676ace43d34a9556ef803e1bd3df239
2017-03-09 11:42:12 +13:00
Chris Pearce
a8a6db3db7 Bug 1315850 - Connect MediaKeys.createSession to Chromium CDM. r=gerald
MozReview-Commit-ID: AzvypvetoOL

--HG--
extra : rebase_source : cf303b0d792dfd86f1056529eb4c081d84fc2e82
2016-11-30 14:51:18 +13:00
Chris Pearce
0c935efca9 Bug 1315850 - Handle sending and receiving key session messages. r=gerald
MozReview-Commit-ID: 6hLPFLFRD5I

--HG--
extra : rebase_source : 0931d65116bf0c499933efc58cae97b275b0ba85
2017-03-08 16:41:06 +13:00
Chris Pearce
a987efe1ed Bug 1315850 - Implement ChromiumCDMProxy initialization. r=gerald
This means the MediaKeys is able to create a CDM.

MozReview-Commit-ID: 94Xc7sCLhH3

--HG--
extra : rebase_source : 914db1f04e0770776ae25c7b8bdc59e729fe78d0
2017-03-09 11:29:45 +13:00
Chris Pearce
1d0fde26c0 Bug 1315850 - Ensure we query for the correct string in HavePluginForKeySystem. r=gerald
Otherwise navigator.requestMediaKeySystemAccess() doesn't know whether we have
a CDM or not.

MozReview-Commit-ID: Hic6UneGA4u

--HG--
extra : rebase_source : 68ce766bede0f5c8e41de3a3f9e46b6ef88cab96
2017-02-22 13:06:58 +13:00
Chris Pearce
a619213252 Bug 1315850 - Create ChromiumCDMProxy in MediaKeys.cpp when preffed on. r=gerald
MozReview-Commit-ID: G37QlP74esb

--HG--
extra : rebase_source : 76937006b9e424f2588e7d06f8f7b0c3a68b5af2
2017-02-22 14:42:55 +13:00
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
238266c96a Bug 1315850 - Add media.eme.chromium-api.enabled to ContentPrefs.cpp. r=smaug
The pref cache added in the previous commit initializes at startup.

MozReview-Commit-ID: IvfBALLdcbe

--HG--
extra : rebase_source : b3c63c76f9eda144e6ae2c8801ac8637444f6c48
2017-02-22 16:12:47 +13:00
Chris Pearce
1170a36613 Bug 1315850 - Add pref to toggle on new CDM decoder backend. r=gerald
MozReview-Commit-ID: HegDqYBJCse

--HG--
extra : rebase_source : 3df4dd5bb8a89e75478b059a030193daaead1ed5
2017-02-22 14:40:30 +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
Iris Hsiao
106889c6f6 Backed out 9 changesets (bug 1333482) for stylo test failures and this should be landed to autoland
Backed out changeset d8828e22dbaa (bug 1333482)
Backed out changeset a39aaecd10f7 (bug 1333482)
Backed out changeset c957d8c0281e (bug 1333482)
Backed out changeset d569fc566e43 (bug 1333482)
Backed out changeset 7e8c03090d34 (bug 1333482)
Backed out changeset c4511a175f2f (bug 1333482)
Backed out changeset 5483a82f7ce9 (bug 1333482)
Backed out changeset 4e7e5efb1bd8 (bug 1333482)
Backed out changeset 51d1accaeddb (bug 1333482)
2017-03-24 10:21:30 +08:00
Wes Kocher
1d9dc01136 Merge m-c to inbound, a=merge
MozReview-Commit-ID: HwfVdTF9Np5
2017-03-23 16:55:48 -07:00
Wes Kocher
2ea6238e55 Merge inbound to central, a=merge
MozReview-Commit-ID: 6od53T3ozcm
2017-03-23 16:15:37 -07:00
Wes Kocher
1087616d0e Merge autoland to m-c a=merge
MozReview-Commit-ID: 2zUGojOEVNi
2017-03-23 16:05:15 -07:00
Andrea Marchesini
7524cbfde8 Bug 1349979 - Remove OptionalID from DOMTypes.ipdlh, r=qdot 2017-03-23 19:17:44 +01:00
Wes Kocher
cc9886af29 Merge graphics to m-c a=kats
MozReview-Commit-ID: 9kKfHoyG8kj
2017-03-23 10:36:55 -07:00
Jean-Yves Avenard
c48398abd9 eBug 1347101: P2. Don't rely on MF_E_TRANSFORM_STREAM_CHANGE result. r=mattwoodrow a=Tomcat
Under some circumstances, and seen on Windows 8, a decoded sample can be returned without the MFT returning MF_E_TRANSFORM_STREAM_CHANGE.

For historical reasons, we required that message to be returned at least once to set the output image size. This was required as the decoder used to be recycled with different video streams.

This is no longer the case, we can rely on the video info instead. It also greatly simplifies the code

MozReview-Commit-ID: H14KBiNWrjQ
2017-03-23 16:04:39 +01:00
Ehsan Akhgari
e67d3e5c18 Bug 1348453 - Make the second argument to ImageBitmap::ExtensionsEnabled() optional; r=baku 2017-03-23 10:27:41 -04:00
Kartikaya Gupta
0fee7584e7 Merge m-c to graphics
MozReview-Commit-ID: 1rTRVEHequ9
2017-03-23 10:01:31 -04:00
Carsten "Tomcat" Book
78ce0c822e Backed out changeset ad882b32f2d0 (bug 1347101) for merge bustage on a CLOSED TREE 2017-03-23 14:28:25 +01:00
Carsten "Tomcat" Book
492970c342 merge mozilla-inbound to mozilla-central a=merge 2017-03-23 13:44:09 +01:00
Carsten "Tomcat" Book
9b6d088496 merge autoland to mozilla-central a=merge
--HG--
rename : browser/components/preferences/in-content/tests/browser_advanced_siteData.js => browser/components/preferences/in-content-old/tests/browser_advanced_siteData.js
rename : dom/media/mediasink/DecodedAudioDataSink.cpp => dom/media/mediasink/AudioSink.cpp
2017-03-23 13:42:40 +01:00
Carsten "Tomcat" Book
5f3ac554bc Backed out changeset aa77848f51ee (bug 1349572) for test failures in test_fileReadSlice.xul and others 2017-03-23 08:50:13 +01:00
Carsten "Tomcat" Book
705c03f596 Backed out changeset 3ccb231829a9 (bug 1349690) 2017-03-23 08:45:41 +01:00
Boris Zbarsky
e392d6436e Bug 1349690. Improve dangling-exception logging in AutoJSAPI::InitInternal to deal better with exceptions from a different origin. r=bholley
MozReview-Commit-ID: IpvRcBC2d6k
2017-03-23 03:06:25 -04:00
Carsten "Tomcat" Book
db2653bbf7 Merge mozilla-central to mozilla-inbound on a CLOSED TREE 2017-03-23 14:48:21 +01:00
Carsten "Tomcat" Book
332688962a Merge mozilla-central to mozilla-inbound
--HG--
rename : testing/web-platform/tests/storage/interfaces.html => testing/web-platform/tests/storage/interfaces.https.html
2017-03-23 13:57:16 +01:00
Wes Kocher
b31e9e6a39 Merge inbound to central, a=merge
MozReview-Commit-ID: EQ7w1Gld1K2
2017-03-22 17:10:01 -07:00