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

633 Коммитов

Автор SHA1 Сообщение Дата
Jan Beich 5c4a94b509 Bug 1385115 - Unbreak build on Tier3 after bug 1382883. r=cpearce
MozReview-Commit-ID: ISTOw1qfxiy

--HG--
extra : rebase_source : 4444849c190f7128d67c53483866ac59c73b2eb9
2017-07-28 11:48:56 +00:00
Chris Pearce 0637427899 Bug 1382883 - Pass paths and open file handles to CDM host binaries on CDM startup. r=gerald
MozReview-Commit-ID: 9IhRqlFrNJf

--HG--
extra : source : de04ea0a90ae935bbc1d0f730332b034b5514f17
extra : intermediate-source : b18daff94ad3d832fcbd601d219c6db2eae46f90
2017-07-27 12:50:46 +12:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Wes Kocher fd09155f06 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 418vKEKrk3n
2017-07-24 18:10:56 -07:00
Carsten "Tomcat" Book b3e81e29a0 Merge mozilla-central to autoland 2017-07-24 15:00:31 +02:00
Bob Owen 459f9f007d Bug 1383611: Pre-load psapi.dll for widevine CDM as it needs it for GetMappedFileNameW. r=cpearce 2017-07-24 20:01:06 +01:00
Nicholas Nethercote 90eaa02ea0 Bug 1382099 - Remove MOZ_WIDGET_GONK from dom/media/. r=gerald.
As well as the obvious #ifdefs, this allows DOMHwMediaStream to be
removed, and also the "phone-state-changed" observer.

--HG--
extra : rebase_source : 373280183e228bd4b9bd9d866959409f2444c77e
2017-07-24 10:08:55 +10:00
Chris Pearce 9b79f3e2c6 Bug 1381720 - Add content_decryption_module_ext.h. r=gerald
Updates to Chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.

Adds Verified Media Pipeline function definitions.

MozReview-Commit-ID: 2H8mMNacQqR

--HG--
extra : rebase_source : d544d6a0c6854ccc29da6ddcc11b4efc8f621036
2017-05-29 17:14:52 +12:00
Chris Pearce c4af620223 Bug 1381720 - Update content_decryption_module.h. r=gerald
Update to chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.

Includes cdm::ContentDecryptionModule_9 and cdm::Host_9 definitions,
HDCP definitions, and 10 and 12 bit image format definitions.

MozReview-Commit-ID: bYH3OBSzuT

--HG--
extra : rebase_source : cfc291b3452c2154ecd1ca16a2ece0a5a42f0b5e
2017-05-29 17:14:26 +12:00
Wes Kocher b1c83de1b7 Backed out 2 changesets (bug 1381720) for linux build failures in content_decryption_module.h a=backout
Backed out changeset e4d9cb334352 (bug 1381720)
Backed out changeset 69f177823866 (bug 1381720)

MozReview-Commit-ID: DctOanJkHh7
2017-07-17 23:21:49 -07:00
Chris Pearce 97c974f065 Bug 1381720 - Add content_decryption_module_ext.h. r=gerald
Updates to Chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.

Adds Verified Media Pipeline function definitions.

MozReview-Commit-ID: 2H8mMNacQqR

--HG--
extra : rebase_source : dc91151c5ffe94f59346b9f4cbab587e6c0701a3
2017-05-29 17:14:52 +12:00
Chris Pearce 9901d75b55 Bug 1381720 - Update content_decryption_module.h. r=gerald
Update to chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.

Includes cdm::ContentDecryptionModule_9 and cdm::Host_9 definitions,
HDCP definitions, and 10 and 12 bit image format definitions.

MozReview-Commit-ID: bYH3OBSzuT

--HG--
extra : rebase_source : d062d233c9a2b59aa5ae5c6e0584ed13b7c83e6e
2017-05-29 17:14:26 +12:00
Chris Pearce 0f1f90f2c1 Bug 1383580 - Pad estimated CDM frame sizes. r=gerald
The new video decoder in CDM version 1.4.8.970 seems to calculate its frame size
as about 1.5X of the optimal size. So increase our estimate of CDM video frame
buffer sizes by more than that so that our pre-allocated buffers should be big
enough to accomodate the allocations that the CDM requests.

This means we should be more likely to avoid the slow fallback path where we
have to transfer frames from the CDM to the content process using the non-shmem
path.

MozReview-Commit-ID: 6PT8XVCAL3E

--HG--
extra : rebase_source : a27793b033c4f50f6e15d874558dc50e1410c8be
2017-07-24 16:56:24 +12:00
Chris Pearce ab9e4db6d1 Bug 1383580 - Add an explicit message to increase CDM-Firefox shmem pool. r=gerald
The strategy we were using to expand the pool of shmems we use to shuffle video
frames between the CDM and content processses is to increase the size of the
pool if the content process receives a video frame in a non-shmem. However the
CDM process will send a frame in a non-shmem if none of the shmems in the pool
are big enough to fit the frame the CDM produces. This happens if we
underestimate the size required for video frames. This causes the
ChromiumCDMParent to increase the number of shmems in the pool every time we
rate switch, until we eventually hit the limit of 50, whereupon playback fails.

So we need to disambiguate between these two cases; the first being we have a
pool of shmems, but they're the wrong size, the second being our shmems are the
right size, but we've run out and we need to expand the shmem pool. The only
place where we know this is in the CDM process. So this commit adds a new
message to PChromiumCDM through which the ChromiumCDMChild can report to the
parent that it needs more shmems in the pool.

The new Widevine CDM has a new video decoder which allocates video frames less
optimally than the previous, which causes us to hit this more often in Nightly.
Our telemetry also indicates we hit this rarely in Beta with the old CDM.

MozReview-Commit-ID: LoSvVhxHQxn

--HG--
extra : rebase_source : 6c7201a74dbf202d0ef8c2269292a80a7ad95dff
extra : source : 57cf5455fd14ef0b68b61f914146ff942b5ca4a0
2017-07-24 12:57:40 +12:00
Wes Kocher b4fca1d196 Backed out 4 changesets (bug 1365309) for frequent xpcshell timeouts after 5400 seconds a=backout CLOSED TREE
Backed out changeset 9fc4c6aabd8e (bug 1365309)
Backed out changeset 56850220bd77 (bug 1365309)
Backed out changeset 48f5e0597242 (bug 1365309)
Backed out changeset 39ed96d7b263 (bug 1365309)

MozReview-Commit-ID: 3V0eTL8qeYb
2017-07-12 16:35:14 -07:00
Michael Layzell a7a732298b Bug 1365309 - Part 4: Disable the BackgroundHangMonitor in GMP processes, r=froydnj
This involved a change to BackgroundHangMonitor, as it initialized sDisabled
incorrectly to false, instead of true, We need sDisabled initialized to true, as
we cannot assume that it is enabled until BackgroundHangMonitor::Startup() is
called.

MozReview-Commit-ID: 94slLTkNk3C
2017-07-12 13:13:07 -04:00
Mats Palmgren 977a9e5f89 Bug 1376498 part 4 - Make all nsClassHashtable::RemoveAndForget() consumers use Remove() instead. r=froydnj
MozReview-Commit-ID: G64YQLlgm6r
2017-07-05 02:01:45 +02:00
Michael Layzell 2eb92d98f1 Backout Bug 1365309 for test failures on a CLOSED TREE
MozReview-Commit-ID: 143ac9l7Goq
2017-07-04 17:31:13 -04:00
Michael Layzell a318e760bd Bug 1365309 - Part 4: Disable the BackgroundHangMonitor in GMP processes, r=froydnj
This involved a change to BackgroundHangMonitor, as it initialized sDisabled
incorrectly to false, instead of true, We need sDisabled initialized to true, as
we cannot assume that it is enabled until BackgroundHangMonitor::Startup() is
called.

MozReview-Commit-ID: 94slLTkNk3C
2017-07-04 13:19:26 -04:00
Chris Pearce d4a2f03ae3 Bug 1376957 - Call rand_s() before starting GMP sandbox on Windows. r=bobowen
The loading of Widevine CDM 970 is being blocked on Windows 7 by our sandbox
when the CDM calls RtlGenRandom(). Chrome is calling s_rand() before enabling
the sandbox [1] in order to load the appropriate DLLs so that the call
succeeds, so we should do the same.

[1] https://cs.chromium.org/chromium/src/content/ppapi_plugin/ppapi_thread.cc?l=424&rcl=d0d190c09619cb359296999438551b66f0e1cdb1

MozReview-Commit-ID: IvmlQY0ohHc

--HG--
extra : rebase_source : d84780fda8181d2afaf4526ea37526522e90431c
2017-06-28 15:19:30 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Jean-Yves Avenard 0ac3f1c5b4 Bug 1374774: P1. Move H264 methods into H264 code. r=gerald
HasSPS, ExtractExtraData and CompareExtraData have nothing to do with the handling of annex B format. They are raw H264 related methods.

It will also prevent in the following change to have cycling references between two headers.

MozReview-Commit-ID: FCs5aU4GcTU

--HG--
extra : rebase_source : a96fe0c70416d38690b0c2f1dee567b0b025e947
2017-06-22 14:36:11 +02:00
Sebastian Hengst 261b25bf86 Backed out changeset 0d953ca28add (bug 1374774) for bustage at media/libstagefright/binding/H264.cpp(205). 'ptr' not declared. r=backout on a CLOSED TREE 2017-06-24 00:49:18 +02:00
Jean-Yves Avenard abaade7f70 Bug 1374774: P1. Move H264 methods into H264 code. r=gerald
HasSPS, ExtractExtraData and CompareExtraData have nothing to do with the handling of annex B format. They are raw H264 related methods.

It will also prevent in the following change to have cycling references between two headers.

MozReview-Commit-ID: FCs5aU4GcTU

--HG--
extra : rebase_source : b204723cdbb599d4f0a227871ed28f5da39e9cff
2017-06-22 14:36:11 +02:00
Chris Pearce 5734680cc7 Bug 1375708 - Use base::Time() instead of time(0) in WidevineDecryptor::GetCurrentWallTime(). r=gerald
On Linux some implementations of time(0) appear to be suffering from integer
overflow and giving us the wrong dates. This causes the time we expose to the
CDM to be wrong, and so licenses passed to the CDM are failing to authenticate,
and Netflix is thus broken on some Linux systems.

This is only happening in Firefox 54 and earlier, as in those versions we use
the WidevineDecryptor to talk to the CDM. In 55 (in beta) and later we use the
PChromiumCDM protocol to talk to the CDM. This doesn't use time(0) to get a
time for the CDM, so it's immune to the problem here.

So this patch makes the GetCurrentWallTime() implementation in
WidevineDecryptor match the code currently being used on Nightly and Beta in
the ChromiumCDMChild::GetCurrentWallTime() function.

Since we use the PChromiumCDM protocol to talk to the CDM on Nightly and Beta
by default, the WidevineDecryptor isn't actually being used on Nightly and
Beta. So this patch will only cause a behaviour change in Release, which still
uses the old backend. However it will make Release run the same code that we're
running in Nightly and Beta, so it should be safe to uplift to Release.

MozReview-Commit-ID: J58iDyinyQG

--HG--
extra : rebase_source : dcdf4a846f7b007526aa626db24598942f13f01d
2017-06-23 16:02:14 +12:00
Randell Jesup 450c4d90a1 Bug 1341285: rollup of changes for webrtc after applying webrtc.org v57 update r=ng,jesup,pehrsons,drno,dminor,cpearce,jya,glandium,dmajor
Includes re-importing gyp files removed from upstream in v56, and then
updating them to match the BUILD.gn file changes.

--HG--
rename : media/webrtc/trunk/webrtc/call/audio_send_stream.cc => media/webrtc/trunk/webrtc/call/audio_send_stream_call.cc
2017-06-13 01:54:13 -04:00
Bill McCloskey d6affd5261 Bug 1365098 - Convert NS_GetCurrentThread uses in dom/media (r=cpearce)
MozReview-Commit-ID: DUPt6xj49zz
2017-06-12 20:20:08 -07:00
Chris Pearce abac85f1d9 Bug 1372080 - Reorder frames decoded by Widevine CDM. r=jya
The next version of the Widevine CDM (970) has a new H.264 decoder and it does
not appear to be outputing frames it decodes in presentation order, so we need
to reorder the frames output by the CDM.


MozReview-Commit-ID: HMsQVN3NCIU

--HG--
extra : rebase_source : 68ef406556087434fa12b72ae5ed5c2e1bce2b64
2017-06-12 17:47:05 +12:00
Chris Pearce f6c7ea61dd Bug 1346620 - Resolve symlinks and junction points in path to GMP dir when loading GMP process. r=bobowen
The sandbox blocks loading of GMPs when the GMP resides in a directory stored
in a path which contains a symlink or junction point. So resolve GMP paths
fully before instantiating the GMP process.

MozReview-Commit-ID: EvPCpNIDNwg

--HG--
extra : rebase_source : 7df8236c9988a674ae128faf63b949fd711ab4e0
2017-06-09 15:29:46 +12:00
Randell Jesup ae21d19935 Bug 1353030: document use of WrapRunnable(this) r=cpearce
MozReview-Commit-ID: Fb3KjsI9tE3
2017-06-02 16:36:34 -04:00
Chris Pearce e5bb59cbdf Bug 1366639 - Add telemetry to track max number of PChromiumCDM video frame shmems. r=francois,gerald
This will enable us to pre-allocate the correct number of shared memory buffers
that we pre-allocate for sending video frames between the CDM and Gecko. That
means we won't need to take the slow path to recover from underestimating how
many shmems we need.



MozReview-Commit-ID: Q4mX2rYMz3

--HG--
extra : rebase_source : f9573cfbf4e65013803b46c0909be2c68566e512
2017-05-22 15:03:00 +12:00
Nathan Froyd c1d1748428 Bug 1359490 - add an event loop spinning abstraction function; r=gerald
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
2017-05-15 09:34:19 -04:00
Kris Maglione b588cdc5bb Bug 1361900: Part 1 - Make CDMProxy.h compatible with mozilla::Result. r=JamesCheng
MozReview-Commit-ID: DiO7IPFYKbE

--HG--
extra : rebase_source : 500e32854c50e2381fd9de3a3533611be1426329
extra : source : 9e3064aec4bb16542f9cc93a89f7a257b6716a98
2017-05-12 12:08:43 -07:00
Sebastian Hengst 7b52c82b67 Backed out changeset 9e3064aec4bb (bug 1361900) for crashing Marionette's test_timeouts.py TestTimeouts.test_reset_timeout on Linux debug with e10s. r=backout 2017-05-13 18:56:06 +02:00
Kris Maglione 49ed37ac3d Bug 1361900: Part 1 - Make CDMProxy.h compatible with mozilla::Result. r=JamesCheng
MozReview-Commit-ID: DiO7IPFYKbE

--HG--
extra : rebase_source : defeef269706ba81ee35272818e468e3ae0b2b19
2017-05-12 12:08:43 -07:00
JW Wang 20f3ad9f2f Bug 1362912. P2 - fix the callers. r=gerald
MozReview-Commit-ID: LdYcIWAFDUn

--HG--
extra : rebase_source : eb943f7e5b7674c3397fce3ad0e8193b4c0ddc01
extra : source : fdfd468b6edbabf3830eb78fc705f6d6682b7126
2017-05-09 23:31:32 +08:00
JW Wang 316a8afe47 Bug 1361942 - Store ActualArgTypes instead of ArgTypes for we are sending data of ActualArgTypes types to another thread. r=gerald
This allows more use of the implicit version of InvokeAsync() without specifying the storage types explicitly.

MozReview-Commit-ID: 40WisaVX8Jy

--HG--
extra : rebase_source : ba34515788f0bc8264fac9a6897e234966d8b762
extra : source : b651963fe562755c0b2998ae6a95ffad400060ad
2017-05-03 12:34:50 +08:00
Gerald Squelart b7520a7dec Bug 1349595 - Check GMP i420 frame size computations. r=cpearce
MozReview-Commit-ID: 9HdCbOKah28
2017-03-31 12:21:22 +11:00
Gerald Squelart 848c8517bc Bug 1349604 - Check CDM black-frame size computations. r=cpearce
MozReview-Commit-ID: BnnQn5PZPaB
2017-03-31 10:20:32 +11:00
Chris Pearce 784ad22feb Bug 1360959 - Only assert our buffer is shmem backed if we have a buffer in ChromiumCDMChild. r=gerald
MozReview-Commit-ID: CapowbADccy

--HG--
extra : rebase_source : 63261b8288dce9e3ccd01196b308db907cb0ce8e
2017-05-01 11:09:21 +12:00
Chris Pearce 873955b81f Bug 1360389 - Have ChromiumCDMParent inform CDMProxy of shutdown. r=gerald
The ChromiumCDMParent is informed of the shutdown of its plugin, so we can
use that to inform the CDMProxy that its connection to the CDM has been
severed. This means we shutdown cleanly if the browser closes while playing.

MozReview-Commit-ID: HphQ2exu1gj

--HG--
extra : rebase_source : ff9ee3699915e8b7527570e839eb3bb0a0ab46bc
2017-04-28 12:02:14 +12:00
Chris Pearce 5fe1464d84 Bug 1357133 - Recover from incorrectly guessing the CDM's shmem sizes. r=gerald
We are pre-allocating shmems in the content process for use by the CDM in the
GMP process. We guess the size of shmem required. However if we guess wrong,
currently we always end up taking the non-shmem path for video frames to
return to the content process, which results in us sending another shmem
(of the wrong size) to the CDM, and this continues until we hit the limit
on the number of shmems that we tolerate the CDM asking for.

So in this patch, I change our behaviour to detect when we're allocating
shmems that are too small, whereupon we purge the existing shmems and switch
to allocating them at the size being requested by the CDM.

This means we recover from incorrectly guessing the size of shmems required
by the CDM. The overhead of an incorrect guess should be one video frame
transferred via the nsTArray path.


MozReview-Commit-ID: 8o1s7FI2UBd

--HG--
extra : rebase_source : 0612d199686278612e8c58dc97e96a9304ea3ee9
2017-04-28 08:55:28 +12:00
Carsten "Tomcat" Book e1e203f1f5 Merge mozilla-central to autoland 2017-04-27 16:36:41 +02:00
Chris Pearce ce7bb69227 Bug 1358373 - Handle underestimating how many shmems the CDM needs to return decoded video frames to Gecko. r=gerald
The CDM process can't allocate shmems itself because it's sandboxed, so we
pre-allocate shmems in the content process and send them to the GMP process for
the CDM to use. Some sites seem to have encoded their content in such a way as
to cause the CDM to allocate and hang onto more frames than we pre-allocate; so
we run out of shmems in the GMP process, and the CDM can't allocate further
buffers to return output, and we fail.

So change the ChromiumCDMChild to allocate non-shmem-backed buffers if it runs
out of shmems, and return the result to the content process as an nsTArray.
Upon receiving that, the parent will send an extra shmem to the child, to
hopefully avoid the slow path again.

Also increase media.eme.chromium-api.video-shmems to 4, so that we're less
likely to hit this slow path in the wild. I've seen that Lightbox.co.nz and
Microsoft's EME test-drive require 4 shmems.

MozReview-Commit-ID: ISQYDkTj5uY

--HG--
extra : rebase_source : 92870f1adc7ae68e58b15443e4223012bdf0e39a
2017-04-26 15:46:09 +12:00
Iris Hsiao c43c229375 Backed out changeset 0b8bf5cb743f (bug 1358373) for build bustage. a=backout
CLOSED TREE

--HG--
extra : amend_source : f6fd0c93b8b1ff9cc111cc4bc7776dd8e2a383d0
2017-04-27 10:10:47 +08:00
Chris Pearce ecfe3c34c4 Bug 1358373 - Handle underestimating how many shmems the CDM needs to return decoded video frames to Gecko. r=gerald
The CDM process can't allocate shmems itself because it's sandboxed, so we
pre-allocate shmems in the content process and send them to the GMP process for
the CDM to use. Some sites seem to have encoded their content in such a way as
to cause the CDM to allocate and hang onto more frames than we pre-allocate; so
we run out of shmems in the GMP process, and the CDM can't allocate further
buffers to return output, and we fail.

So change the ChromiumCDMChild to allocate non-shmem-backed buffers if it runs
out of shmems, and return the result to the content process as an nsTArray.
Upon receiving that, the parent will send an extra shmem to the child, to
hopefully avoid the slow path again.

Also increase media.eme.chromium-api.video-shmems to 4, so that we're less
likely to hit this slow path in the wild. I've seen that Lightbox.co.nz and
Microsoft's EME test-drive require 4 shmems.

MozReview-Commit-ID: ISQYDkTj5uY

--HG--
extra : rebase_source : 4beba0212411a0f5867feb506bbf732f5a934fa9
2017-04-26 15:46:09 +12:00
JW Wang 80c9f230f3 Bug 1359715 - let functions in MediaData.h take TimeUnit instead of int64_t. r=kaku
We want to replace the use of int64_t for microseconds by TimeUnit
whenever possible since int64_t is ambiguous which could be microseconds
or milliseconds.

MozReview-Commit-ID: LRz9d4yKBYJ

--HG--
extra : rebase_source : 1f73f1f338142b3183491d04726821a881ccabbe
extra : intermediate-source : 88e167b7b06303d10d92cd5317502f405d1c553e
extra : source : 98deb30ec93d395f9951f5fc488170ae35e29675
2017-04-24 17:33:05 +08:00
Gerald Squelart 5d664e32ad Bug 1355506 - Ensure the ChromiumCDMProxy stays alive until the parent has completed its Shutdown(). r=cpearce
MozReview-Commit-ID: 4D0kw0U55JO

--HG--
extra : rebase_source : 42f8b4e4fec2e652987c0d3dc68c83d061de3981
2017-04-20 17:05:03 +12:00