Commit Graph

379 Commits

Author SHA1 Message Date
Ryan VanderMeulen
520acfd195 Merge inbound to m-c. a=merge 2016-08-25 08:10:52 -04:00
JW Wang
d13f41c2a0 Bug 1294616 - Somewhat improve the string performance by defining string literals whose length is known at compile time. r=cpearce
MozReview-Commit-ID: LAlqMDtGQN7

--HG--
extra : rebase_source : 4f2cdc9cb9ee7e4dd024d47dad329304f6ba70ae
extra : source : 6db22a524b1452fc50bf56535e7c619a8441dcfe
2016-08-15 15:41:53 +08:00
James Cheng
c6899c4863 Bug 1290830 - [Part2] Remove the GMP types using genral types instead. r=cpearce
MozReview-Commit-ID: 3EKwTNPddI1

--HG--
extra : rebase_source : 00f7267a76ad299b52d02b16425bb266ee58985b
2016-08-02 15:05:21 +08:00
James Cheng
b74f50bca9 Bug 1290830 - [Part1] Detach the GMPDecryptorProxyCallback interface to DecryptorProxyCallback. r=cpearce
MozReview-Commit-ID: EPGf0ITakPO

--HG--
extra : rebase_source : 1186be0680789c1f9e66366e549fd5ec5b418a38
2016-08-01 17:37:18 +08:00
Ryan VanderMeulen
69113163cf Merge m-c to inbound. a=merge 2016-08-24 09:09:05 -04:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
James Cheng
0593e89ea0 Bug 1293194 - Building with --disable-eme fails with GMPDecoderModule.cpp:15:30: fatal error: mozilla/EMEUtils.h: No such file or directory. r=cpearce
MozReview-Commit-ID: VUGdiaLqkV

--HG--
extra : rebase_source : 3439ba2f7a81ad80f9db514f21c6091cc3e5711a
2016-08-09 12:13:30 +08:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Bryce Van Dyk
e06afda01b Bug 1279077 - Update GMP/EME path to support webm. r=cpearce
Update handling of VP8, VP9 to enable decryption and decoding via widevine.
Update handling with further validation to make sure that invalid video types
are rejected when trying to create widevine decryptor session or init widevine
decoders.

MozReview-Commit-ID: 8FOvUJfxr6L

--HG--
extra : rebase_source : 0f6aed8256d7f106a598b09e6f11efe80f0e4bb2
2016-07-29 15:53:22 +12:00
James Cheng
240e465d99 Bug 1288320 - Define each keysystem string as specific identifier instead of placing some.keysystem everywhere. r=cpearce
MozReview-Commit-ID: 1bwPRhMOawu

--HG--
extra : amend_source : 7550352f178c0082484acdd342db05ed0dc02e23
extra : transplant_source : %96%C1%B9%8B%28%B0%96f%8AM%AA%13T%1E%3Bg%98%96%92%C1
2016-07-27 16:07:46 +08:00
Chris Pearce
e3566aa24b Bug 1266938 - Add explicit to ctors for helper classes in WidevineVideoDecoder. r=bustage 2016-07-27 11:27:08 +12:00
Bryce Van Dyk
306b3774aa Bug 1266938 - Prevent WidevineVideoDecoder emitting out of order frames. r=cpearce
It was possible for WidevineVideoDeocder when allocating shmems for frames to
become reentrant. If a further frame was allocated during this reentrancy it
would be returned before the first frame being allocated. As frames are fed into
the decoder in order, altering this order for returned frames would result in an
out of order display.

This is addressed by keeping a deque of frames and allocating them in order.

There are changes to guard again reentracy issues with draining also. Previously
it was possible to drain a decoder, but still have a frame allocation be
pending, resulting in a drain being completed, and a frame being returned follow
that. This has been addressed by not draining during reentrancy.

MozReview-Commit-ID: LcIsmyabqAv

--HG--
extra : transplant_source : %DB%F7%E3%DC%2AkZ%9D%11Xc%06a%A0%21%EB%05%0E%BDp
2016-07-26 11:23:10 +12:00
Carsten "Tomcat" Book
b9a6c687fa merge mozilla-inbound to mozilla-central a=merge 2016-07-25 15:50:41 +02:00
Chris Pearce
d183d8433b Bug 1288976 - Use gmp-changed rather than gmp-path-added to retry MediaKeys requests. r=gerald
We're already routing the "gmp-changed" observer service notification over from
the chrome process to the content process, and it fires at pretty much the same
time as the "gmp-path-added" notification (and a few more) so we can just switch
to have the MediaKeySystemAccessManager listen on that notification instead, and
we'll be e10s compatible.




MozReview-Commit-ID: EowFDfdWgAJ

--HG--
extra : rebase_source : ad01990278cf9005f6676ef0b7fa0acbf69249eb
2016-07-25 10:18:34 +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
e2b41d3d04 Bug 1278198 - Add Widevine FileIO. r=gerald
MozReview-Commit-ID: IXgSobtF24L

--HG--
extra : rebase_source : e1df08666b0713fa4c10fc020d6482a802d2fb52
2016-07-07 17:28:14 +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
4eba68c8bf Backed out changeset 1894b74b8931 (bug 1278198) 2016-07-22 12:06:09 +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
b6e1300359 Bug 1278198 - Add Widevine FileIO. r=gerald
MozReview-Commit-ID: IXgSobtF24L

--HG--
extra : rebase_source : 528d9c344aa2a2c1c4b0eb321ff239397d4c0d29
2016-07-07 17:28:14 +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
Bob Owen
94305927f7 Bug 1288021: When we have a network GMP path fix the format for the sandbox rule. r=cpearce
MozReview-Commit-ID: BYMvKvwdFOK

--HG--
extra : rebase_source : 3c4ab54fbb87387c4816c96e3b998b460804cf49
2016-07-20 09:20:30 +01:00
James Cheng
0cb95c8c46 Bug 1284192 - get rid of GMPErr from CDMProxy base class. r=cpearce
MozReview-Commit-ID: 43WduOtIfZH
2016-07-18 22:12:00 +02:00
James Cheng
02c5726f49 Bug 1284192 - Make CDMProxy be a base class and move the logic into subclass. r=cpearce
MozReview-Commit-ID: 4Lr3uqVexFD

--HG--
rename : dom/media/eme/CDMProxy.cpp => dom/media/gmp/GMPCDMProxy.cpp
rename : dom/media/eme/CDMProxy.h => dom/media/gmp/GMPCDMProxy.h
2016-07-18 22:13:00 +02:00
James Cheng
96e45dba10 Bug 1284809 - Rename CDMCallbackProxy to GMPCDMCallbackProxy to make it GMP specific use. r=jwwang
MozReview-Commit-ID: Ceq6vpGPNdA

--HG--
rename : dom/media/eme/CDMCallbackProxy.cpp => dom/media/gmp/GMPCDMCallbackProxy.cpp
rename : dom/media/eme/CDMCallbackProxy.h => dom/media/gmp/GMPCDMCallbackProxy.h
extra : transplant_source : %E1g%E9yJ%A8%7B%FFYw%FF%D3%B3%A4%D3%8F%93%DE%1B%7C
2016-07-11 12:52:07 +08:00
Chris Pearce
48d570573b Bug 1282577 - Guard against multiple intr messages causes us to multi-delete GMP actors. r=jesup.
This is a regression from bug 1162358.

We must be hitting the #ifndef SHMEM_ALLOC_IN_CHILD block in
GMPVideoDecoderChild::Alloc() with multiple allocs doing intr calls at once.
If this happens when a DecodingComplete() comes in, we'll end up sending one
task to re-call RecvDecodingComplete for every Alloc() blocked on an intr
response.  This would result in us ending up trying to Send__delete__() in
RecvDecodingComplete() twice.  Which causes the runtime abort we're seeing
here.

I think that could happen in the WidevineVideoDecoder if a Decode message comes
in, and goes into a ReturnOutput(), tries to alloc a frame and has to spin on
an intr message response, and another Decode message comes in and does the
same, so GMPVideoDecoderChild::mNeedShmemIntrCount will be 2, and then a
DecodingComplete comes in, and when two tasks on the stack in
GMPVideoDecoderChild::Alloc() finish they both end up dispatching a task to
re-call GMPVideoDecoderChild::RecvDecodingComplete(). So we end up trying to
Send__delete__() in RecvDecodingComplete() twice.

I expect the same problem exists in the GMPVideoEncoder too.

intr, or spinning event loops in general for that matter, is evil.


MozReview-Commit-ID: AKsvP62G3Cx

--HG--
extra : rebase_source : 53ca12dbbbf3ab071788e2322b7c926ec7c0325f
2016-07-11 21:52:31 +12:00
Gerald Squelart
6fab8ba294 Bug 1285231 - Use Swap to move&empty plugins list before unloading - r=jwwang
MozReview-Commit-ID: LMkuOA0lBKD

--HG--
extra : rebase_source : 948fa73d618ef1ff1cf83ddfd8af3228b49226b5
2016-07-07 23:57:46 +10:00
David Anderson
e6a98dc91b Clean up Transport memory management in IPDL. (bug 1283744, r=billm) 2016-07-06 18:51:20 -07:00
Chris Pearce
4b3a0f0d42 Bug 1267918 - Remove obsolete GMP crash handling code. r=gerald
MozReview-Commit-ID: EqzJagCHk7n

--HG--
extra : rebase_source : e66aa2a4b5939ae8bcf833a5d1a59ef508a679b3
2016-06-29 11:42:14 +12:00
Chris Pearce
8b965f3eac Bug 1267918 - Add GMPCrashHelperHolder to automatically disconnect crash helpers on actor destory. r=gerald
Disconnecting the GMPCrashHelpers at the right time is hard, because in the
crashing case we're all shutdown before the GMPCrashHelpers can be invoked to
help handle the crash report. So add a class to help the helpers;
GMPCrashHelperHolder. This composes into the GMP content protocol actors, to
help them disconnect the crash helpers at the right time. See the comment in
GMPCrashHelperHolder for the details.


MozReview-Commit-ID: E5rE6e5Jues

--HG--
extra : rebase_source : f688bf727f23f773eb995611cec6412ebf021029
2016-06-29 11:42:00 +12:00
Chris Pearce
dcfb0a0d17 Bug 1267918 - Ensure GMPCrashHelper instances are destroyed on the main thread. r=karlt
MozReview-Commit-ID: 7GFx6uoyAi9

--HG--
extra : rebase_source : ceb32673c2ee64b89d090b02cdf48cc615ad1057
2016-06-30 14:19:08 +12:00
Chris Pearce
e0a9078a6f Bug 1267918 - Add GMPCrashHelper to GMPService::GetGMP* functions. r=gerald
This enables callers to specify a way to determine the correct window to
dispatch the PluginCrashed event to should the GMP actor crash.

We need a way to determine the correct window at crash time, as the GMP's
window can change at runtime. For example, if the GMP is being used for
unencrypted decoding, the <video> element can be moved to a new browser window
at runtime.

Note: I don't handle disconnecting the GMPCrashHandlers in this patch; we do
delete the GMPCrashHandlers in this patch when their associated GMP crashes, and
in the next patch we handle disconnecting GMPCrashHandlers in the case where
we don't crash.

MozReview-Commit-ID: DrwcZAB6Ys0

--HG--
extra : rebase_source : 8da188b68456914773e6adae8cbccd6bf6a6e7a7
2016-06-29 11:41:56 +12:00
Chris Pearce
fed9c17730 Bug 1267918 - Split LoadGMP message into select and load messages. r=gerald
This will allow us to attach a crash handler to a GMP process after deciding
which GMP to load but before actually loading it.


MozReview-Commit-ID: HwBZU2Q4TX6

--HG--
extra : rebase_source : a68b9cbc31c0b886ba491f8f15f02e4d0e32cae7
2016-06-29 11:41:52 +12:00
Bill McCloskey
cb8a9c03a3 Bug 1277705 - Remove waitable_event_watcher (r=dvander) 2016-06-24 13:15:41 -07:00
Mats Palmgren
a25ec1d6dc Bug 1280743 - Put Widevine stuff under #ifdef MOZ_EME to make this file compile under --disable-eme. r=cpearce 2016-06-21 13:23:29 +02:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Chris Pearce
191e25eeb7 Bug 1276132 - Make more Widevine class constructors explicit to keep gcc happy. r=jwwang
Fixes compile errors on Linux when Widevine is compiled.

MozReview-Commit-ID: 19qQw02CqdQ

--HG--
extra : rebase_source : 335124655869da1f899986f7dcd0d7ec1e441f6a
2016-05-31 12:05:24 +12:00
Chris Pearce
91ab2bc0c4 Bug 1276132 - Remove use of #ifdef MOZ_{KEYSYSTEM}_EME in dom/media code. r=jwwang
Instead of controlling visibility of EME keysystems by build config, do it by
preference. This means keysystems can be turned on easier.


MozReview-Commit-ID: Ky1zrHPubOJ

--HG--
extra : rebase_source : 35d9c26436a86683b902225e7b0d6645b02d8ff9
2016-05-31 11:00:55 +12:00
Phil Ringnalda
7270ed519a Back out 4 changesets (bug 1276132) for browser_gmpProvider.js failures
CLOSED TREE

Backed out changeset 511a2389ca48 (bug 1276132)
Backed out changeset 91b3cdd0640a (bug 1276132)
Backed out changeset 09b9972e36f9 (bug 1276132)
Backed out changeset 69052d4e3dbb (bug 1276132)
2016-06-08 20:36:22 -07:00
Chris Pearce
57fa470692 Bug 1276132 - Make more Widevine class constructors explicit to keep gcc happy. r=jwwang
Fixes compile errors on Linux when Widevine is compiled.

MozReview-Commit-ID: 19qQw02CqdQ

--HG--
extra : rebase_source : ebb98b25738e0438d873834f07c72be1f4eb71db
2016-05-31 12:05:24 +12:00
Chris Pearce
64f7e2a1c9 Bug 1276132 - Remove use of #ifdef MOZ_{KEYSYSTEM}_EME in dom/media code. r=jwwang
Instead of controlling visibility of EME keysystems by build config, do it by
preference. This means keysystems can be turned on easier.


MozReview-Commit-ID: Ky1zrHPubOJ

--HG--
extra : rebase_source : 7d68ad8389afdac8fcfffd2c505f8467107c05a5
2016-05-31 11:00:55 +12:00
Chris Peterson
11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
Bill McCloskey
291c555f34 Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Chris Pearce
a7ee9fee8a Bug 1271169 - Move all device binding code into librlz and remove static runtime requirement. r=glandium
I want the EME device binding/nodeId code to be callable from gtests, as well
as in plugin-container. I need this because I want to add a gtest that ensures
that we don't regress the EME/GMP device binding code. I want to call the GMP
device binding code in the gtest and in the GMP process, and compare the
result.

So we need to make it possible to link the device binding code into the gtests
as well as plugin-container. So move all code that device binding calls into
librlz, to make it easier to link against all the code required.

Note: the device binding code needs to be statically linked into
plugin-container so that it's covered by the Adobe CDM's voucher tool.


MozReview-Commit-ID: AvBAe1dh49Z

--HG--
rename : ipc/app/sha256.c => dom/media/gmp/rlz/sha256.c
rename : ipc/app/sha256.h => dom/media/gmp/rlz/sha256.h
extra : rebase_source : f60f1e68649fa90cbe1f2fe09f5f69948444b1df
2016-05-20 16:11:29 +12:00