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

66 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Chris Pearce b69a154521 Bug 1433309 - Annotate createMediaKeys promise reject with whether failure occurred due to pending shutdown. r=gerald
Around every Firefox update, Netflix see a spike in
MediaKeySystemAccess.createMediaKeys() promise rejects. I am wondering whether
this is caused by the browser restarting to apply a Firefox update while
Netflix's player is loading.  So add more detail to the promise reject as to
the state of the system, to try to validate that theory.

MozReview-Commit-ID: 4IDPsFwKCtq

--HG--
extra : rebase_source : 0a53acb623f895e598845c281edc73b926c74c28
2018-01-26 12:20:35 +13:00
James Cheng 9774850bfe Bug 1415401 - Part3 - Add an out parameter to LaunchGMP interface in ipdl to better know the error detail when failure. r=cpearce
MozReview-Commit-ID: BmiTYeQGIrm

--HG--
extra : rebase_source : 11070597467394a8764d8be4369226844b50c637
2017-11-10 11:28:45 +08:00
James Cheng 416a6083b2 Bug 1415401 - Part2 - Make GetServiceChildPromise rejection function accept MediaResult and propagate the error result to GetContentParent rejection function. r=cpearce
MozReview-Commit-ID: 4IjV9KGcsvd

--HG--
extra : rebase_source : 4177b93bc2af2908e701ecbf6ea1d439d24ea095
2017-11-09 18:01:01 +08:00
Chris Peterson 45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Chris Pearce 50bc88ccf9 Bug 1395021 - Fix up includes to account for StreamTracks.h not being indirectly included in so many places. r=jwwang
With MediaInfo.h no longer including StreamTracks.h, some things that include
MediaInfo.h now use things that are no longer included. This patch adds the
includes back in, so the build works again.

MozReview-Commit-ID: INpH3vnBAmk

--HG--
extra : rebase_source : 8b91a999c71242c1eb5030f86c2a1f1c85d5fb27
2017-08-30 15:38:56 +12: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
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
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07: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
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
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 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
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 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
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
Andrew McCreight 556961ac46 Bug 1321871, part 2 - Remove PContent opens of PGMPService. r=peterv
--HG--
extra : rebase_source : 8db0331e7f1296f96f171cbd573ff40848967c49
2017-01-05 12:55:57 -08:00
Andrew McCreight 1951ea01ff Bug 1321871, part 1 - Replace use of opens and bridges in GMP protocols with endpoints. r=peterv
This removes the open of PGMPContent from PGMP, the bridge of
PGMPService and PGMP from PGMPContent, and the spawn of PGMP from
PGMPService. I did these changes all at once because the way the
bridges works it was hard to split it up.

--HG--
extra : rebase_source : d9311e3047b9855ad422838f5a8b6bfdc382d225
2017-01-05 12:55:27 -08:00
James Cheng 4f0ada8315 Bug 1323566 - Fix incorrect index usage in MediaKeySystemAccessManager::Observe(). r=cpearce
MozReview-Commit-ID: 1D6Yes6ofdj

--HG--
extra : rebase_source : aada68f7aab16fb51c3a5025993e52a01dd5ed07
2016-12-15 11:53:54 +08:00
Andrea Marchesini f7f5990527 Bug 1317927 - Media caching needs to use origin attributes, r=cpearce, r=jesup 2016-12-07 07:07:09 -10:00
Chris Pearce 27f8f13960 Bug 1316215 - Merge SelectGMP and LaunchGMP into one synchronous IPC operation. r=gerald
We were seeing almost permaorange failures in the WebRTC H.264/GMP tests
due to the GMP being shutdown in the parent process in between the
content process performing an OOP select operation and then performing
an OOP launch operation.

That is, in GeckoMediaPluginServiceChild::GetContentParent() in between
the SendSelectGMP completing and the SendLaunchGMP completing, the GMP
would shutdown and so when the launch operation ran in the main process
it would fail.

The select and launch are seperate operations so that the crash handler
can be reported to the content process and an association can be made
in the content process between the plugin ID and the crash helper before
we try to launch the GMP. This is so that if the GMP crashes on startup,
we're ready to handle the crash.

However it turns out that if the GMP crashes on startup, the crash report
message comes in after another round of the event/IPC message loop. So we
actually do have time in the content process to connect the crash helper
after the launch fails.

So in order to fix the problem of the GMP shutting down in between select
and launch, we can partially revert the changes I made in Bug 1267918 to
merge selecting and launching GMPs back into a single operation.


MozReview-Commit-ID: 5n4T1Gqlvr3

--HG--
extra : rebase_source : 6e6892a5e32a485b5bfc2f93bddb2d2fe5a422bd
2016-11-22 14:17:59 +13:00
Chris Pearce 4fa2a5c829 Bug 1316215 - Block GMPContentParent close while a GMPService::GetContentParent is being processed. r=gerald
When GMPService::GetContentParent returns a MozPromise, we end up failing in
test_peerConnection_scaleResolution.html with e10s enabled because we Close()
the GMPContentParent twice. The test causes two GMPVideoEncoderParents to
be created. When the number of IPDL actors on the GMPContentParent reach 0,
we close the IPC connection. With GetContentParent() returning a MozPromise,
it's more async, and so we can end up requesting the content parent in order
to create the second GMPVideoEncoderParent, but while we're waiting for
the promise to resolve the previous GMPVideoEncoderParent is destroyed and
the GMPContentParent closes its IPC connection. Then the GetContentParent
promise resolves, and that fails to operate correctly since it's closed its
IPC connection.

My solution here is to add a "blocker" that prevents the GMPContentParent from
being shutdown while we're waiting for the GetContentParent promise to resolve.

MozReview-Commit-ID: HxBkFkmv0tV

--HG--
extra : rebase_source : 59aa7bcfe8b8f44274d136d6147a946542a64fff
extra : source : 59ab10349b58b0fbe13dca9312ec82332f7c3dbe
2016-11-16 10:59:08 +13:00
Chris Pearce c93e08bf59 Bug 1316215 - Promisify GMPService GetGMPContentParent and GetServiceChild. r=gerald
MozReview-Commit-ID: 5ydGmZWGzWG

--HG--
extra : rebase_source : bc61628e97243db55b68d1efc93e7b55f32628e5
extra : intermediate-source : 7ca4bd360797b8207d26e46192400307cf046593
extra : source : eda96f88317dbf0c696aeaab8993bf2f030517c0
2016-11-09 15:52:22 +13:00
Chris Pearce d6045d04f6 Bug 1314858 - Make content process cache of GMP capabilities thread safe. r=gerald
MozReview-Commit-ID: 5zTFlfReBne

--HG--
extra : rebase_source : 90e6018b6574c0d2f5a51ad56ab87ef5b535f124
2016-11-02 09:47:00 +13:00
Chris Pearce c28985ad89 Bug 1314445 - Remove GMPService::GetPluginVersionForAPI. r=gerald
MozReview-Commit-ID: ybq6ZZlA9P

--HG--
extra : rebase_source : 1a8356740cbb9d73f7d851cb82f8b71c0ca364c4
2016-11-02 11:57:14 +13:00
Chris Pearce ca6cc0c8f4 Bug 1314797 - Dispatch 'gmp-changed' notification after updating GMP capabilities. r=gerald
This ensures that when requests for keysystem access in the content process
retry, they do so on an up-to-date set of capabilities.

MozReview-Commit-ID: JxmlZnFhKYs

--HG--
extra : rebase_source : 6e02777be6a0692c7e157d3ab0a1952c3017c208
2016-11-03 11:18:29 +13:00
Chris Pearce 43a9f990fb Bug 1312540 - Use GMP caps cached in content process for GetPluginVersion. r=gerald
MozReview-Commit-ID: 1nDHsW527Tu

--HG--
extra : rebase_source : b3c7d8ec04b2ebb78f03b3620b2cd2498b35a1e6
2016-11-01 16:55:08 +13:00
Chris Pearce 0a480d38f2 Bug 1312540 - Maintain a cache of GMPs capabilities in content processes. r=billm,gerald
In order to avoid doing a synchronous call from content process to chrome
process in order to determine what GMPs are usable, maintain a cache of GMP
capabilities in the content processes.

We must seed the cache when content processes are created, as the GMP service
is started up and GMPs are added to it before the first (or any subsequent)
content process is created.


MozReview-Commit-ID: Eb4Pu81XHmn

--HG--
extra : rebase_source : ef5de4dd17ee337ca378569691e55d4cfb7939ef
2016-11-01 16:25:19 +13: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
David Anderson e6a98dc91b Clean up Transport memory management in IPDL. (bug 1283744, r=billm) 2016-07-06 18:51:20 -07: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
Kyle Huey c8143d07d7 Bug 1272415: Don't include task.h everywhere. r=froydnj 2016-05-12 15:15:43 -07:00
Jim Mathies fa8be62cee Bug 1268714 - Check for failure result or a failed nsresult from SendLoadGMP. r=mccr8
MozReview-Commit-ID: 9bE9hfXiBI5
2016-04-29 13:24:30 -05:00
Kyle Huey 7579799b01 Bug 1266595: Replace Chromium Task with Runnable. r=froydnj 2016-04-27 17:06:05 -07:00
Jim Mathies 86d8f2f66f Bug 1263951 - Avoid trying to initialize new GMP instances once the browser enters shutdown. r=cpearce
MozReview-Commit-ID: G6ND2LyT0tp
2016-04-26 12:11:26 -05:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Jean-Yves Avenard a9394d5946 Bug 1240411: P5. Clean up GMP headers. r=cpearce
Remove redundant virtual keywords
2016-01-19 19:47:32 +11:00
Chris Pearce f212540c95 Bug 1232527 - Remove GMPVideoDecoderTrialCreator and friends. r=jwwang
Remove GMPVideoDecoderTrialCreator, and the tests and IPC/IDL supporting it.

--HG--
extra : commitid : HlbJPl2gPAl
extra : rebase_source : fe1773014e5d09da264f85d464e408aca46a60c4
2015-12-15 15:17:22 +13:00
Chris Pearce 6818d3ec67 Bug 1228215 - Add a 'gmpName' parameter to GMPService::GetNodeId(), so each GMP can see a different nodeId for the same origin. r=jwwang 2015-11-27 10:53:31 +13:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Chris Pearce 2c28e66665 Bug 1209385 - Backout 417dab86a413 and 6078e8b4878b. r=backout 2015-10-14 19:42:25 +13:00
Sotaro Ikeda 739eddd54e Bug 1186813 - Replace nsBaseHashtable::EnumerateRead() calls in dom/media/ with iterators r=cpearce 2015-09-30 06:40:54 -07:00
Chris Pearce a76b46867d Bug 1209385 - Crash GMPs that don't respond to GMPVideoDecoder::Reset(). r=jwwang 2015-09-30 06:56:07 +13:00
Sotaro Ikeda 34a6dca7cc Bug 1205351 - Replace nsBaseHashtable::Enumerate() calls in dom/media/ with iterators r=cpearce 2015-09-24 18:48:25 -07:00