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

633 Коммитов

Автор SHA1 Сообщение Дата
JW Wang 302d82c85a Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
MozReview-Commit-ID: 4bVeqIuWO2O

--HG--
extra : rebase_source : d504ac15a6dc59ad42f3ab80faf23f629d74315f
extra : intermediate-source : 6e52995b6c8146451d98dffc62f6907755dc856e
extra : source : 82d2649cdafb5a6389f6858c23578811933580c9
2017-04-14 17:13:36 +08:00
Gerald Squelart 9231dfc6ed Bug 1356516 - Close channel before destroying GMPServiceChild - r=billm
mServiceChild is a UniquePtr, so nulling it will destroy the GMPServiceChild,
which will destroy the associated message channel. So we need to close the
channel first before it gets destroyed. (Just as it was correctly done in
Observe() above.)

MozReview-Commit-ID: INuHN2Is7bC

--HG--
extra : rebase_source : 2a927bb06dd8fb4f1114dc0b64025cbdddc7c133
2017-04-19 15:48:32 +12:00
JW Wang 6359124d70 Bug 1355756. P3 - let CreateAndCopyData() and its friends take TimeUnit for duration. r=gerald
MozReview-Commit-ID: ES0on9VCuu3

--HG--
extra : rebase_source : 8d3e80ec2e1923587b5865516a16bfff9009397d
extra : intermediate-source : 3e59c61b1ccef78e3e8fe52791d7104aade7930c
extra : source : 46fd639ea6a2219bbed70f6555a2acf03ec01a7a
2017-04-12 17:46:09 +08:00
JW Wang 464497b945 Bug 1355756. P1 - change the type of MediaData::mDuration to TimeUnit. r=gerald
MozReview-Commit-ID: 3d4bUYtSuMI

--HG--
extra : rebase_source : 94c821b6d381421035e6a12cbe038436055c5822
extra : intermediate-source : 9a06beffc736486f47b9cf05e7f482e726d53068
extra : source : fdbdcd5c1474f04dc1dbde66fcf3a9ecec953053
2017-04-12 17:27:34 +08: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 37ae2a9f5a Bug 1351953 - Make DecryptJob::PostResult take a mozilla::Span instead of nsTArray. r=gerald
This means we can pass anything that converts implicitly to a Span to
PostResult, including an nsTArray<uint8_t>. We can also pass a Span
that contains the contents of a Shmem's buffer.

MozReview-Commit-ID: 8AAcRmVCEVy

--HG--
extra : rebase_source : 44dfbc465db14bb689a653e6c0b3cbc626c0a0d1
2017-04-05 10:32:19 +12:00
Chris Pearce fb5a8a3e0d Bug 1351953 - Send Data to CDM for decrypt and or decode in shmems. r=gerald
MozReview-Commit-ID: 2UdGimoOLKr

--HG--
extra : rebase_source : 04879d8c1639bf6f14cebc6031d8cc23e05e567a
2017-03-27 13:19:38 +13:00
Chris Pearce 2903d2ab28 Bug 1352924 - Disconnect GMP service in child from parent once all GMPs are shutdown. r=gerald
This ensures that the IPC connection from the content process to the main
process is shut down as soon as possible. Once all the IPC connections are
closed, the main process removes its async shutdown blocker, and Firefox
can shutdown.

MozReview-Commit-ID: 8rqa384ayd9

--HG--
extra : rebase_source : b9cbbb9f4c22016284a8d49cddaea0d96666acf9
2017-04-03 11:10:04 +12:00
Chris Pearce f41e5c06d9 Bug 1352924 - Block creation of new GMPs once parent process begins shutdown. r=gerald
This ensures that when we've started shutdown we don't try to start up new
GMPs. Doing so would create more connections from the content process to the
main process, and the main process can't shutdown until all such connections
are shut down.

MozReview-Commit-ID: KE8nCoLXjdd

--HG--
extra : rebase_source : 674f3c4ddcb5bb93dd775a861b425d25510871e9
2017-04-03 11:08:06 +12:00
Chris Pearce f1b6111764 Bug 1352924 - Keep list of GMPServiceParents in GeckoMediaPluginServiceParent. r=gerald
This will allow us to broadcast a notification to the GMPServices running in
the content processes when they need to shutdown.

MozReview-Commit-ID: FviFDgNMnUV

--HG--
extra : rebase_source : f4ad3c6df0e14c88db1199fbe6281d67f98590ae
2017-03-31 11:43:27 +13:00
Chris Pearce 69a1fc1b03 Bug 1351874 - Dispatch shutdown runnable to CDMParent rather than null. r=gerald
MozReview-Commit-ID: BE5OgrgbvAT

--HG--
extra : rebase_source : 68c2538e2de42caa0b3e98b03c47bbd01539049b
2017-03-30 11:03:50 +13:00
Chris Pearce d885daf774 Bug 1351132 - Fix keystatus and decode logging in ChromiumCDMChild. r=gerald
MozReview-Commit-ID: xwfJ4WwbmN

--HG--
extra : rebase_source : ee459eb16df41055ce6ade360ff1149f3b894caa
2017-03-28 11:05:48 +13:00
Chris Pearce 0901ad8256 Bug 1315850 - Ask the GMPService for the GMP thread in GMPParent::ChildTerminated. r=gerald
When we shutdown the browser while the GMPService is active we can end up
leaking a GMPParent, GeckoMediaPluginServiceParent, and a Runnable. I tracked
this down to the runnable dispatched to the GMP thread in
GMPParent::ChildTerminated(). The dispatch of this runnable is failing as we
are dispatching the runnable to a reference of the GMP thread which we have
previously acquired, but that thread is now shutdown. So the dispatch fails,
and if you look in nsThread::DispatchInternal() you'll see that we deliberately
leak the runnable if dispatch fails! The runnable leaking means that the
references it holds to the GMPParent and the GMP service parent leak.

The solution in this patch is to not cache a reference to the GMP thread on the
GMPParent; instead we re-request the GMP thread from the GMPService when we
want it. This means that in the case where the browser is shutting down,
GMPParent::GMPThread() will return null, and we'll not leak the runnable. We'll
then follow the (hacky) shutdown path added in bug 1163239.

We also need to change GMPParent::GMPThread() and GMPContentParent::GMPThread()
to return a reference to the GMP thread with a refcount held on it, in order
to ensure we don't race with the GMP service shutting down the GMP thread
while we're trying to dispatch to in on shutdown.

MozReview-Commit-ID: CXv9VZqTRzY

--HG--
extra : rebase_source : e507e48ee633cad8911287fb7296bbb1679a7bcb
2017-03-24 13:38:00 +13:00
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 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 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 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 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
Chris Pearce ecbbbfda10 Bug 1339748 - Convert samples to AnnexB before passing to CDMs, rather than inside CDMs. r=jya
MozReview-Commit-ID: 6i3uXC8ily9

--HG--
extra : rebase_source : 119b6bb657e2ddb36844f2a60cb80dd5ff9b1769
2017-02-15 16:03:09 +13:00
Wes Kocher 5b67cbcee7 Backed out 2 changesets (bug 1339755) for build bustage a=backout
Backed out changeset f3629503d405 (bug 1339755)
Backed out changeset 85641936e471 (bug 1339755)

MozReview-Commit-ID: LiZfM9OcO5s
2017-02-15 11:57:38 -08:00
Chris Pearce 8499c27da0 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 : 7ee0e48ab7638d1f713ee6dd852ab4b5f91119e8
extra : source : 9b18193d0c1ccdedec25f7395fe124a86660b9d5
2016-12-01 11:23:27 +13:00
Chris Pearce ef8e49b7e5 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 : c4c99063f7423b8cbbd49865d2d45eca32c254ce
extra : source : c7f66edac83a6662d99f59a48f70c539f8ccecc8
2016-12-01 10:57:58 +13:00
Chris Pearce d29f094da0 Bug 1339733 - Move GMPCrashHelperHolder implementation into its own .cpp file. r=jwwang
This means we don't need to include GMPService.h in GMPCrashHelperHolder.h,
in order to use the GMPService inside GMPCrashHelperHolder.

This which prevents an inclusion cycle between GMPService.h and GMPCrashHelperHolder.h
in another patch I'm working on.


MozReview-Commit-ID: AbcXvv4UMyl

--HG--
extra : rebase_source : bdae6e1fbbbe8ce4100f51d2339f69c23f12859f
2016-11-23 15:53:42 +13:00
David Anderson 64b9b4aa19 Replace GMP use of PCrashReporter with shmem-based annotations. (bug 1337518, r=billm) 2017-02-12 11:39:44 -08:00
Jean-Yves Avenard 16bf821b42 Bug 1325707: P3. Fix coding style. r=gerald
Fixed coding style of files encountered in P1 and P2.

MozReview-Commit-ID: LApVu9K2oto

--HG--
extra : rebase_source : e3bb296baaec9df2011ff312fec2eda19dd125e6
2017-02-07 09:15:59 +01:00
Jean-Yves Avenard ec59353902 Bug 1325707: P2. Handle OOM conditions when creating MediaRawData object. r=gerald
MozReview-Commit-ID: HtkhrT36Kf4

--HG--
extra : rebase_source : febe0c4114d8d888b152db3f7b5331c0fb32f442
2017-02-07 09:03:36 +01:00
Carsten "Tomcat" Book 092e5dc5f1 merge mozilla-inbound to mozilla-central a=merge 2017-02-07 14:08:46 +01:00
Brad Lassey a5e07b93bf bug 1303096 - Stop sending sync messages soon after content process start-up r=billm 2017-02-05 00:52:38 -05:00
Chris Pearce 4757b59a5b Bug 1337159 - Use MOZ_LOG for WidevineAdapter logging. r=gerald
This works, at least on Windows, if the NSPR_LOG_FILE is set at a file
in the OS temp dir. This means we can turn on CDM logging in release
builds, in the sandboxed child process, without needing to recompile
to #define on logging.

This will make debugging issues with the CDM easier.

MozReview-Commit-ID: 6cAxMy4lv3T

--HG--
extra : rebase_source : eb75bba8e0dc38d1a0137cef28b7589ded43351a
2017-02-07 10:12:06 +13:00
Sebastian Hengst 122ebc553b Backed out changeset e9d8a75a0dcc (bug 1303096) for failing various tests on Android 4.3 debug (e.g. test_saveHeapSnapshot_e10s_01.html). r=backout 2017-02-05 10:26:28 +01:00
Brad Lassey ecdf363246 bug 1303096 - Stop sending sync messages soon after content process start-up r=billm 2017-02-05 00:52:38 -05:00
Jay Harris 4b018f109d Bug 1316650 - Changes the NS_WARNING to an EME_LOG r=cpearce
MozReview-Commit-ID: 2dDipFVr2Ip

--HG--
extra : rebase_source : 3807dc7697a59908f889dff110770c08b51b7f0c
2017-02-01 10:42:37 +13:00
Chris Pearce 302ca1dbee Bug 1332530 - Remove GMP enum storage names. r=gerald
Note: Only the Adobe GMP used enum storage, so not that it's unused we may
as well remove this.

MozReview-Commit-ID: JtmQ69eJzaI

--HG--
extra : rebase_source : 29929e680dc1692b957b34ce274c4944743768e8
2017-01-20 15:06:00 +13:00
Chris Pearce 67b9555200 Bug 1332530 - Remove code to pass nodeId to GMP process. r=gerald
MozReview-Commit-ID: Kw4Bx7zzkN1

--HG--
extra : rebase_source : 8b57219ff8856dfa33476c57449a55c9e12a5d37
2017-01-19 15:14:45 +13:00
Chris Pearce 21ca915169 Bug 1332530 - Don't require a SandboxStarter if MOZ_GMP_SANDBOX is not defined. r=jld
GMP gtests fail on ASAN builds now since the GMPLoader requires a sandbox
starter, and ASAN doesn't run with a GMP sandbox. So only enforce that we
need a sandbox starter if we've built with sandboxing enabled.

MozReview-Commit-ID: GptxIZ7TFIy

--HG--
extra : rebase_source : 6265f91a9c80555b63f71ac5da116450d4728df1
2017-01-25 10:30:37 +13:00
Chris Pearce a4fe4d518f Bug 1332530 - Flatten GMPLoader and GMPLoaderImpl. r=gerald
MozReview-Commit-ID: GZ8feXmLuCb

--HG--
extra : rebase_source : e869cf9b25bdf3b5a6e6cbdcbd8c521987f826cb
2017-01-19 15:44:54 +13:00
Chris Pearce 701e1daf19 Bug 1332530 - Move GMPLoader code out of plugin-container and back into XUL. r=gerald
The GMPLoader code was in plugin-container so that it was covered by
Adobe's voucher of plugin-container, but that's no longer necessary.

MozReview-Commit-ID: 3VRBAohRI9I

--HG--
extra : rebase_source : 58a30855ade14af4c4b1420edabd3abb398f232e
2017-01-19 15:39:03 +13:00