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

17505 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Matt Woodrow be050a0bb1 Bug 1653409 - Specify correct color space and YCbCr matrix on IOSurfaces, so that CoreAnimation converts them correctly. r=mstange
This overrides the colorspace of hardware decoded videos to specify the monitor's color space, to prevent CoreAnimation from doing conversion.
This probably isn't the right long term answer, but it matches our current rendering and readback code paths.

A note for the future: IOSurfaceSetValue/IOSurfaceCopyValue silently fail if the IOSurface is 'in use'.

Differential Revision: https://phabricator.services.mozilla.com/D85355
2020-08-04 01:18:31 +00:00
Matt Woodrow 553c2d162d Bug 1653409 - Upload software decoded video directly to IOSurface on OSX. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D85105
2020-08-04 01:18:14 +00:00
Matt Woodrow 87db131e32 Bug 1653048 - Add support for external images in the wr::Compositor API, and implement it for MacOS IOSurfaces. r=mstange,gw
Differential Revision: https://phabricator.services.mozilla.com/D84638
2020-08-04 01:19:59 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Andrew McCreight f6f2bd8f6e Bug 1655536, part 2 - Don't wait for memory reports from child processes that no longer exist. r=froydnj
This patch uses IPDL's return feature to ensure that the memory
reporter manager won't wait for a report from a child process
that has already exited.

This fixes a memory reporter hang that can happen if a child process
exits during a memory report, when the parent half of the actor is
being held alive. (If the parent half of the actor is not being held
alive, then mMemoryReportRequest will be naturally cleared when it
goes away.)

This was happening frequently on Windows Fission AWSY because that test
does a minimize memory right before it attempts to get a memory report,
and the preallocated content process exits when it sees a message to
minimize memory.

Differential Revision: https://phabricator.services.mozilla.com/D85499
2020-08-03 18:29:45 +00:00
Andrew McCreight 7157f25222 Bug 1655536, part 1 - Drop the return value from MemoryReportRequestClient::FinishCallback. r=froydnj
The next patch converts the memory reporting architecture to use the "returns"
feature of IPDL, and mozilla::ipc::RejectCallback does not have a return
type, so this patch removes the return value.

FinishReportingCallback::Callback() needs to remain an XPCOM method
that returns NS_OK because it is called from JS during testing.

Differential Revision: https://phabricator.services.mozilla.com/D85498
2020-08-03 18:29:02 +00:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Jean-Yves Avenard 749a1d0d03 Bug 1653638 - P3. Remove no longer necessary workaround. r=mjf,karlt
C++17 guarantees that "In a function-call expression, the expression that names the function is sequenced before every argument expression and every default argument."

The order of operations in the expression s now guaranteed, we can remove the comment and the workaround.

Differential Revision: https://phabricator.services.mozilla.com/D85676
2020-08-03 08:01:12 +00:00
Jean-Yves Avenard f181df10f9 Bug 1653638 - P2. Use a Controller TaskQueue for running webaudio tasks. r=mjf
We can't create a media decoder on a decoder taskqueue, as this could lead to deadlocks should a decoder attempt to dispatch a synchronous runnable.

Differential Revision: https://phabricator.services.mozilla.com/D85544
2020-08-03 08:01:09 +00:00
Jean-Yves Avenard c56eb8ef3c Bug 1653638 - P1. Rename thread type and remove unused one. r=mattwoodrow
Historically, the MediaThreadType::PLAYBACK was used just for that; the MediaDecoderReader and exclusively for playback content.

This is no longer the case ; it's used in multiple places, and not just with playback: webrtc, webaudio, benchmark etc.

The primary use of the "PLAYBACK" thread was to distinguish from the "PLATFORM_DECODER" one as they dispatch synchronous tasks from one to the other, and we must ensure they don't share the same threadpool.

CONTROLLER is more fitting here, as this is how it's typically used: a controller thread manage the decoder threads.

Additionally, we remove the MTG_CONTROL one as it's not used.

Differential Revision: https://phabricator.services.mozilla.com/D85543
2020-08-03 08:01:07 +00:00
Martin Stransky e177990894 Bug 1645671 [Linux/VA-API] Create DMABufSurfaceWrapper directly at nsTAttay and disable DMABufSurfaceWrapper class copy and assignment constructors, r=jya
When DMABufSurfaceWrapper is added to nsTArray, a temporary local DMABufSurfaceWrapper object is created. When the temporary
object is deleted after the adding, associated dmabuf data is released which leads to rendering artifact during VA-API video playback.

As a fix in this patch we create DMABufSurfaceWrapper 'in-place' at nsTAttay.
We also disable DMABufSurfaceWrapper class copy and assignment constructors to avoid similar potential issues.

Differential Revision: https://phabricator.services.mozilla.com/D85152
2020-08-03 09:08:26 +00:00
Sylvestre Ledru 843f943758 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85678
2020-08-02 15:29:15 +00:00
alwu c7563ad7c8 Bug 1654045 - part4 : add a test to ensure we would stop controlling media when it reaches to the end. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D85231
2020-07-31 17:26:46 +00:00
alwu 4f35b1bd20 Bug 1654045 - part2 : add 'onactivated/ondeactivated' event handlers and 'isActive' on the media control webidl interface. r=chunmin
Add an event handler `onactivated/ondeactivated` and a readonly attribute `isActive` on the media control webidl interface, and they can be used in testing and the future plan of supporting media hub.

Differential Revision: https://phabricator.services.mozilla.com/D85229
2020-07-31 17:26:38 +00:00
Nathan Froyd 4e75d26bd3 Bug 1656356 - don't require flat strings when calling ToInteger; r=mccr8
ToInteger is defined on substrings, so we don't require the buffer to be
null-terminated when calling it.

Differential Revision: https://phabricator.services.mozilla.com/D85472
2020-07-30 22:25:38 +00:00
Paul Adenot eae12679e7 Bug 1656063 - Only load function pointer in FFTBlock once. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D85389
2020-07-31 12:29:01 +00:00
Paul Adenot d76eb1b1ab Bug 1656067 - r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D85390
2020-07-31 12:24:32 +00:00
Jeff Walden e8f3f74ef6 Bug 1656411 - Move typed array, ArrayBuffer, and dataview-related functions out of jsfriendapi.h to two new headers. r=mgaudet,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D85524
2020-07-31 16:37:27 +00:00
Paul Adenot f9ba0d14a5 Bug 1614036 - Remove more error handling code that is now useless, on a CLOSED TREE.
Differential Revision: https://phabricator.services.mozilla.com/D85596
2020-07-31 14:52:57 +00:00
Coroiu Cristina f0445806f4 Backed out 2 changesets (bug 1614009) for build bustage at dom/media/webaudio/AudioBuffer.cpp on a CLOSED TREE
Backed out changeset 2bd694126445 (bug 1614009)
Backed out changeset 7c315d9e2030 (bug 1614009)
2020-07-31 17:15:14 +03:00
Andreas Farre 8d7d0ec85c Bug 1613431 - Part 2: Ignore synced setters return value. r=nika
Depends on D83645

Differential Revision: https://phabricator.services.mozilla.com/D83646
2020-07-31 13:37:00 +00:00
Corentin Arnould 906d086baa Bug 1614036 - Added mochitest. r=padenot
Added file that returns InvalidContent when decoded.

Differential Revision: https://phabricator.services.mozilla.com/D84490
2020-07-31 13:41:55 +00:00
Corentin Arnould 5b671914ae Bug 1614036 - Removed console logging and set unlocalized messages r=padenot
Changed error message to unlocalized in the callback and in the promise rejection in case an error occurs in audio decoding.

Also deleted localized strings and NoAudio bacause it is not used.

Differential Revision: https://phabricator.services.mozilla.com/D81337
2020-07-30 16:29:08 +00:00
Paul Adenot 8494449709 Bug 1655518 - Make two bool in ReverbConvolver atomic. r=karlt
The code structure is strange. This will be enough to make this safe without
fear of changing the behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D85149
2020-07-29 00:05:26 +00:00
Corentin Arnould a5f9f4b9ce Bug 1613833 - Updated mochitest. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D84666
2020-07-31 13:36:53 +00:00
Corentin Arnould 00a172df05 Bug 1613833 - Changed length condition to suit the spec. r=padenot
Throws are now centralized too.

Differential Revision: https://phabricator.services.mozilla.com/D84665
2020-07-30 16:01:40 +00:00
Corentin Arnould 8cd9d82f7e Bug 1614009 - Updated mochitest. r=padenot
Depends on D84321

Differential Revision: https://phabricator.services.mozilla.com/D84322
2020-07-28 11:45:02 +00:00
Corentin Arnould 23c463b2b7 Bug 1614009 - Removed non-spec exception throwing on CopyToChannel. r=padenot,webidl,smaug
Also removed those in CopyFromChannel and changed parameters' name to fit the spec.

Differential Revision: https://phabricator.services.mozilla.com/D84321
2020-07-30 23:27:36 +00:00
Corentin Arnould 31ab26890e Bug 1614019 - Added mochitest for negative sample rate. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D83925
2020-07-30 15:54:55 +00:00
Corentin Arnould 23717c88b4 Bug 1614019 - Removed negative value from the valid range r=padenot,webidl,smaug
The condition in the if is changed because the minus operation could overflow.
The declaration of sampleRate has been moved to its next use because its first value was never used.

Differential Revision: https://phabricator.services.mozilla.com/D81550
2020-07-30 23:28:34 +00:00
Matthew Gregan 8009935c48 Bug 1656137 - Spin-wait on completion event rather than blocking main thread. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D85357
2020-07-31 01:45:44 +00:00
Chun-Min Chang d97fe95469 Bug 1642729 - P4: Load URL without user-specific data r=ckerschb
The URL specifying the track image should be loaded without any
user-specific data like cookie headers, or HTTP Auth credentials.

Differential Revision: https://phabricator.services.mozilla.com/D83695
2020-07-29 15:59:54 +00:00
Chun-Min Chang 6a3cd37f74 Bug 1642729 - P3: Only fetch image from http(s) URL r=ckerschb
The URL specifying the track image is only valid if its scheme is http
or https.

Differential Revision: https://phabricator.services.mozilla.com/D83694
2020-07-29 15:59:46 +00:00
Chun-Min Chang bf7aa89c86 Bug 1642729 - P2: Move same utils in SMTC and MPRIS backend to MediaControlUtils.h r=alwu
The duplicated util helpers between WindowsSMTCProvider and
MPRISServiceHandler could be merged and moved to MediaControlUtils

Differential Revision: https://phabricator.services.mozilla.com/D82806
2020-07-29 15:59:44 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
alwu 9f4ebd9e69 Bug 1654277 - part3 : add a test for only resuming latest paused media. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D84879
2020-07-29 23:39:09 +00:00
alwu b495e4e49f Bug 1654277 - part2 : pause playing media but stop already paused media when receiving 'pause'. r=chunmin
We want to modify our current behavior from "resuming all media" to "resuming latest paused media" when pressing `play` media key.

The reason of doing that is because that give us better user experience, espeically on Facebook. Chrome has been taking this approach, so we want to follow this strategy. The test in D84879 can help to understand this scenario.

Differential Revision: https://phabricator.services.mozilla.com/D85118
2020-07-30 04:01:08 +00:00
alwu 63d040c2d7 Bug 1654277 - part1 : add assertion to ensure we don't get unsupported key for default handler. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D85117
2020-07-29 23:39:06 +00:00
alwu 41531f2b0c Bug 1655204 - part2 : add a testcase to ensure 'stop' would stop controlling media. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D84876
2020-07-29 22:15:52 +00:00
alwu 1ba14f3e89 Bug 1655204 - part1 : stop being controlled by media control keys when media element receives `Stop`. r=chunmin
Currently, we treat `pause` and `stop` equally, but `stop` is actully implying more meaning, which should stop controlling media entirely. Therefore, we would pause media and stop controlling it when receiving `stop`.

In addition, removing pause state checking, because it wouldn't happen anything to call `play()` and `pause()` if media is already playing or paused.

Differential Revision: https://phabricator.services.mozilla.com/D84875
2020-07-29 22:15:50 +00:00
Nico Grunbaum c116dd0bdb Bug 1655137 - add rtcp-rsize parsing to SIPCC parser;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D84857
2020-07-29 01:30:34 +00:00
Coroiu Cristina 315787989d Backed out changeset 7e2fb6f29963 (bug 1654430) for mda failures at dom/media/tests/mochitest/test_peerConnection_addAudioTrackToExistingVideoStream.html on a CLOSED TREE 2020-07-28 19:55:35 +03:00
Jan-Ivar Bruaroey 2ad2a4acec Bug 1654430 - Replace 200ms mainthread sleep on inserting/removing USB/bluetooth cam/mic/speaker with WaitFor() promise. r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D84458
2020-07-28 15:18:53 +00:00
Karl Tomlinson 31c90d555d Bug 1653667 don't attempt to promote GraphRunner thread on Linux r=padenot
This usually fails due to sandbox policy.

When the sandbox is disabled, the realtime promotion can result in SIGKILL
if/when script runs too long.  This can be re-introduced when thread demotion
is moved to a thread that is not blocked on script, which may be part of
the solution to https://bugzilla.mozilla.org/show_bug.cgi?id=1628198.

Depends on D84941

Differential Revision: https://phabricator.services.mozilla.com/D84942
2020-07-27 14:47:51 +00:00
Karl Tomlinson f12d2fad45 Bug 1653667 move realtime limit initialization from RecvSetProcessSandbox() to CubebUtils r=padenot
so that this happens even when the content sandbox is not enabled.

CubebUtils::InitLibrary() is called during ContentProcess::Init(), before the
event loop is run in XRE_InitChildProcess().

Differential Revision: https://phabricator.services.mozilla.com/D84941
2020-07-27 14:48:32 +00:00
Narcis Beleuzu 144a4d61d6 Backed out changeset 9cec7707e84d (bug 1654383) for bustages on GMPTypes.h . CLOSED TREE 2020-07-28 00:21:05 +03:00
Bryce Seager van Dyk 10fa07b2e3 Bug 1654383 - Replace GMPEncryptionType with cdm::EncryptionScheme. r=alwu,dminor
This removes the need to do some conversions and simplifies the code a little.

Drive by remove an assert which is already covered by a switch statement
containing a MOZ_ASSERT_UNREACHABLE in ChromiumCDMParent.

Differential Revision: https://phabricator.services.mozilla.com/D84432
2020-07-22 17:13:23 +00:00