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

18211 Коммитов

Автор SHA1 Сообщение Дата
alwu 87a5ca1c3a Bug 1346880 - part2 : consider output volume for engine when it determines the audible state. r=padenot
Currently we didn't consider the engine's output volume when we determine the audible state for the destination node, doing that would help us to more correctly deide the actual audible state for users.

Differential Revision: https://phabricator.services.mozilla.com/D94182
2020-10-22 12:26:51 +00:00
Paul Adenot 9f13a42a9f Bug 1346880 - part1 : keep AudioChannelAgent alive all the time for not offline context. r=padenot
The main purposes of this patch is to
- changes the way the destination node holding the audio channel agent (holding the agent all the time)

That would help us
- earlier mute the destination node in order to prevent sound leaking
- request wakelock based on the actual audible state (considering more factors)
- improve the readability of handling audible state (the old way contains some weird workaround, eg. setting the node as audible in the beginning)

Differential Revision: https://phabricator.services.mozilla.com/D94181
2020-10-22 16:58:19 +00:00
Jean-Yves Avenard 37624a583e Bug 1672558 - Only initialize usable PDMs for their respective process. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D94408
2020-10-22 09:29:45 +00:00
Frédéric Wang 70d15af587 Bug 1220810 - Hardcode localhost to loopback, r=ckerschb,necko-reviewers,dragana
This patch make localhost addresses resolve to a loopback address,
thereby ensuring that we can safely treat http://localhost/ and
http://*.localhost/ as "Potentially Trustworthy". This addresses
various bug reports from developers and aligns with specifications.

See https://groups.google.com/g/mozilla.dev.platform/c/sZdEYTiEBdE

Differential Revision: https://phabricator.services.mozilla.com/D92716
2020-10-22 07:36:15 +00:00
Lee Salzman 5b66b078c2 Bug 1671071 - support HDR formats in SWGL. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D94304
2020-10-22 03:59:17 +00:00
Jean-Yves Avenard b11c79c581 Bug 1672553 - Don't use AudioTrimmer if audio decoder creation failed. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D94400
2020-10-22 01:16:05 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
alwu 20103880cf Bug 1669434 - part2 : add a test case for updating default metadata when page title changes. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D93671
2020-10-21 18:04:50 +00:00
alwu 6ea535704b Bug 1669434 - part1 : update default metadata if needed when page title changes. r=chunmin,nika
When a page doesn't have a non-empty media session metadata, we would use its title as a default metadata, which would display as an artist name on the virtual control interface.

Therefore, when a page changes its title, we should also notify media controller (if it's been created) in order to update the default metadata as well.

Differential Revision: https://phabricator.services.mozilla.com/D93670
2020-10-21 17:25:34 +00:00
Matthew Gregan 5c30deb871 Bug 1670917 - Update cubeb_ops layout in MockCubeb. r=cubeb-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D94202
2020-10-21 09:24:20 +00:00
Paul Adenot 0ddc112415 Bug 1670917 - Add a pref to allow using raw WASAPI streams. Make it default to input-only raw streams. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D93363
2020-10-20 20:03:26 +00:00
Paul Adenot f667ac98ae Bug 1670917 - Upstream build system and other bits from freebsd-ports. r=cubeb-reviewers,chunmin
This is the first two chunks in ed3dd55916/www/firefox/files/patch-cubeb-oss, from From: jbeich <jbeich@FreeBSD.org>. The rest of this patch file is now upstream.

This allows OSS users to drop a patch downstream.

Differential Revision: https://phabricator.services.mozilla.com/D93362
2020-10-20 20:03:29 +00:00
smolnar b70b9de731 Backed out changeset a5a35a205a44 (bug 1220810) for causing test_dns_offline and fontface-override-descriptor-getter-setter failures. CLOSED TREE 2020-10-21 13:00:01 +03:00
Frédéric Wang 4e6e6c7714 Bug 1220810 - Hardcode localhost to loopback, r=ckerschb,necko-reviewers,dragana
This patch make localhost addresses resolve to a loopback address,
thereby ensuring that we can safely treat `http://localhost/` and
`http://*.localhost/` as "Potentially Trustworthy". This addresses
various bug reports from developers and aligns with specifications.

See https://groups.google.com/g/mozilla.dev.platform/c/sZdEYTiEBdE

Differential Revision: https://phabricator.services.mozilla.com/D92716
2020-10-21 07:42:23 +00:00
Andreas Pehrson c11959ec0e Bug 1597451 - Remove IterateWindowListeners altogether. r=jib,geckoview-reviewers,agi
GeckoView is seemingly the last user depending on MediaManager iterating over
a all iframes of a window when queried for its capture state.

It is fine however, since GeckoViewMedia already iterates over all windows in
MediaManagerService.activeMediaCaptureWindows, which includes all subframes that
are actively captured.

This patch removes IterateWindowListeners altogether, and the last callsite is
simplified.

Differential Revision: https://phabricator.services.mozilla.com/D93079
2020-10-19 09:56:56 +00:00
Andreas Pehrson 86ef11ab0d Bug 1597451 - Remove unnecessary IterateWindowListeners. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D93078
2020-10-19 09:52:50 +00:00
Nils Ohlmeier [:drno] eae60ad94e Bug 1670856: Don't switch gathering to complete state with no streams. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D93310
2020-10-20 16:22:55 +00:00
Jean-Yves Avenard 6307ec0451 Bug 1595994 - P26. Simplify and rename RecvLaunchRDDProcess. r=mattwoodrow,nika,ipc-reviewers
And we remove unnecessary checks, BackgroundParent only run in the parent process and if e10s is on. Also RecvLauchRDDProcess will only ever be called if the rdd pref is on already.

By streamlining the call we also reduce the number of sync dispatch to 1.

Depends on D93317

Differential Revision: https://phabricator.services.mozilla.com/D93476
2020-10-20 23:32:57 +00:00
Jean-Yves Avenard d06384295b Bug 1595994 - P25. Have launch rdd be signalled over the PBackground channel. r=mattwoodrow,nika,ipc-reviewers
This remove the need for a sync dispatch to the main thread, that lead to deadlocks.

Depends on D93316

Differential Revision: https://phabricator.services.mozilla.com/D93317
2020-10-20 23:32:54 +00:00
Jean-Yves Avenard 1be0cb8c2c Bug 1595994 - P24. Always initialize Remote Decoder Manager thread early. r=mattwoodrow
Some cleanup on how we create the RemoteDecoderChild object, simplifying and clarifying.

Depends on D92362

Differential Revision: https://phabricator.services.mozilla.com/D93316
2020-10-20 23:31:11 +00:00
Jean-Yves Avenard 462245b388 Bug 1595994 - P23. Allow libvpx with alpha plane decoding in RDD process. r=mattwoodrow
Depends on D92863

Differential Revision: https://phabricator.services.mozilla.com/D92362
2020-10-20 23:30:58 +00:00
Jean-Yves Avenard 30f42deea0 Bug 1595994 - P22. Show in which process decoding occurs in media devtools. r=mattwoodrow
Depends on D92745

Differential Revision: https://phabricator.services.mozilla.com/D92863
2020-10-20 23:30:50 +00:00
Jean-Yves Avenard f86cc19337 Bug 1595994 - P20. Skip empty audio packet. r=padenot
Following bug 1566389, an AudioBuffer can be created only to be then truncated if we need to trim it back to a size of 0.

When the resulting AudioBuffer is transferred over IPC it will be rebuilt, and be null then making EnsureAudioBuffer fail.

Depends on D92345

Differential Revision: https://phabricator.services.mozilla.com/D92714
2020-10-20 23:30:34 +00:00
Jean-Yves Avenard 37ed37a0fe Bug 1595994 - P1F. Additional checks to ensure we always abort decode if shutdown. r=mattwoodrow
Depends on D92342

Differential Revision: https://phabricator.services.mozilla.com/D92345
2020-10-20 23:30:26 +00:00
Jean-Yves Avenard c6409b6fa1 Bug 1595994 - P1E. Don't use libvpx in the RDD process if video contains an alpha plane. r=mattwoodrow
Until bug 1668840 is fixed, we can't allocate a SharedRGBImage without a PImageBridge

Depends on D92233

Differential Revision: https://phabricator.services.mozilla.com/D92342
2020-10-20 23:30:18 +00:00
Jean-Yves Avenard 5de404e405 Bug 1595994 - P1D. Properly serialize display size when sending image over IPC. r=mattwoodrow
The code always assumed that the size of the image with the Y plane dimensions, which, while often the case, isn't correct.
We remove the assertions that the display offset was always (0,0) and properly carry the actual data over IPC.

Remoting the theora decoder and enabling fast video copy exposed several other related issues in the various D3D11 image types.
Various WPT uses theora YUV44 images (because we do not support YUV444 H264 ones). Those images are made of 32 pixels planes with a display size set to 20 pixels. Prior P1D the backend image was a ShareYCbCrPlanar image which correctly handled the size settings.

Like the image serializer, the various D3D11 images always assumed that the Y plane size was the image size.

This however expose existing issues where the offset position of the display is completely ignored for some image type. See bug 1669054

All those problems explain why sometimes we displayed more pixels than we should have.

Depends on D91914

Differential Revision: https://phabricator.services.mozilla.com/D92233
2020-10-20 23:30:04 +00:00
Jean-Yves Avenard 117c322adb Bug 1595994 - P1C. Make libvpx and theora decoder work in the RDD process. r=mattwoodrow
We unfortunately must skip the fastpath tests on mac and linux as they will succeed on M-gli platform (WebGL in GPU) and we can't filter those out.

Depends on D91700

Differential Revision: https://phabricator.services.mozilla.com/D91914
2020-10-20 23:29:30 +00:00
Jean-Yves Avenard 25887bb634 Bug 1595994 - P1B. Make WMF DXVA decoding work in the RDD process. r=mattwoodrow
Depends on D91698

Differential Revision: https://phabricator.services.mozilla.com/D91700
2020-10-20 23:29:23 +00:00
Jean-Yves Avenard 38bf12582e Bug 1595994 - P1A. Don't assume the RDD process launch always succeeded. r=mattwoodrow
Depends on D91696

Differential Revision: https://phabricator.services.mozilla.com/D91698
2020-10-20 23:29:09 +00:00
Jean-Yves Avenard fc4363b20b Bug 1595994 - P17. Only initialize PDM if enabled. r=mattwoodrow
Attempting to initialize a PDM can cause the process to be killed due to sandbox violations.
For now, only FFVPX decoders is working and enabled in the RDD process.

One downside is that changing the ffvpx/ffmpeg rdd pref now requires a restart.

Will be able to remove such issue once all sandbox issues have been resolved.

Depends on D91693

Differential Revision: https://phabricator.services.mozilla.com/D91694
2020-10-20 23:28:40 +00:00
Jean-Yves Avenard ccbc49fc25 Bug 1595994 - P16. Handle NullData object potentially returned by the video decoders. r=mattwoodrow
Depends on D91692

Differential Revision: https://phabricator.services.mozilla.com/D91693
2020-10-20 23:28:32 +00:00
Jean-Yves Avenard babdb5befd Bug 1595994 - P15. Enable fast video copy path in AV1 decoder. r=mattwoodrow
Depends on D91691

Differential Revision: https://phabricator.services.mozilla.com/D91692
2020-10-20 23:28:19 +00:00
Jean-Yves Avenard c69d4669c4 Bug 1595994 - P13. Enable ffvpx in RDD on linux. r=mattwoodrow,gcp
Depends on D91689

Differential Revision: https://phabricator.services.mozilla.com/D91690
2020-10-20 23:28:00 +00:00
Jean-Yves Avenard a8439d3ed7 Bug 1595994 - P12. Allow ffvpx and the AppleDecoderModule in the RDD. r=haik,jolin
Ultimately, we should be able to remove everything that got added to the RDD sandbox from the content's one.

Fly-by fix; allow checking if AVX512 is supported in content sandbox.

Splitting sandbox setting from Utility to a new RDD one as per review comment in P12 considering it's no longer an IPC only sandbox.

Depends on D91688

Differential Revision: https://phabricator.services.mozilla.com/D91689
2020-10-20 23:27:52 +00:00
Jean-Yves Avenard 72a2e74943 Bug 1595994 - P11. Don't unnecessarily create the RemoteDecoderManagerChild thread. r=mattwoodrow
This is no longer required now that the RemoteDecoderManagerChild manages decoder creation

Depends on D56857

Differential Revision: https://phabricator.services.mozilla.com/D91688
2020-10-20 23:27:36 +00:00
Dan Glastonbury 73eb04fe2b Bug 1595994 - P10: Allow FFMPEG decoding in RDD process. r=mattwoodrow
Disabled by default.

Depends on D54884

Differential Revision: https://phabricator.services.mozilla.com/D56857
2020-10-20 23:27:21 +00:00
Dan Glastonbury b2d9951eb3 Bug 1595994 - PF: Allow FFVPX decoding in RDD process. r=mattwoodrow
Enabled by default on non-ARM64 Windows.

Depends on D56856

Differential Revision: https://phabricator.services.mozilla.com/D54884
2020-10-20 23:27:13 +00:00
Dan Glastonbury 7ab5253afe Bug 1595994 - PD: Allow WMF decoding inside RDD process. r=mattwoodrow
This assumes that access to Windows WMF and DirectX is allowed from RDD process.

Depends on D91699

Differential Revision: https://phabricator.services.mozilla.com/D54883
2020-10-20 23:26:52 +00:00
Dan Glastonbury 31d9d69c6c Bug 1595994 - PA: Delete GPUDecoderModule wrapper. r=mattwoodrow
Moved support logic into WMFDecoderModule.

Depends on D54882

Differential Revision: https://phabricator.services.mozilla.com/D54881
2020-10-20 23:26:38 +00:00
Dan Glastonbury 77bf32c70e Bug 1595994 - P9: Allow LaunchRDDProcess() to be called from MainThread without hanging. r=mattwoodrow
Depends on D54880

Differential Revision: https://phabricator.services.mozilla.com/D54882
2020-10-20 23:26:33 +00:00
Dan Glastonbury c3920c64e7 Bug 1595994 - P8: Use RemoteDecoderModule to communicate with GPU and RDD. r=mattwoodrow
Depends on D54879

Differential Revision: https://phabricator.services.mozilla.com/D54880
2020-10-20 23:26:30 +00:00
Dan Glastonbury a70a2c09f1 Bug 1595994 - P7: Add Supports messages to PRemoteDecoderManager. r=kamidphish,nika,ipc-reviewers
Add a synchronous Supports message to the IPDL PRemoteDecoderManager protocol so
decoder modules can query for playback support in the actual process that will
attempt to do the decoding.

Depends on D54878

Differential Revision: https://phabricator.services.mozilla.com/D54879
2020-10-20 23:26:27 +00:00
Jean-Yves Avenard f8343f2b4d Bug 1595994 - P6: Change Supports to take SupportDecoderParams. r=kamidphish
This is a subset of the parameters passed via CreateDecoderParams and is so
Supports() calls have access to KnowsCompositor and Options when determining
if decoding is supported.

Depends on D54877

Differential Revision: https://phabricator.services.mozilla.com/D54878
2020-10-20 23:26:25 +00:00
Dan Glastonbury 9ef1beee14 Bug 1595994 - P5: Agnostic PDM reports supported mime types for current process. r=kamidphish
Depends on D54875

Differential Revision: https://phabricator.services.mozilla.com/D54877
2020-10-20 23:24:48 +00:00
Dan Glastonbury 7ef0bd86bd Bug 1595994 - P4: Use PDMFactory to create decoders in RDD & GPU process. r=kamidphish
Depends on D54876

Differential Revision: https://phabricator.services.mozilla.com/D54875
2020-10-20 23:24:40 +00:00
Dan Glastonbury 665d2ab6f5 Bug 1595994 - P3: Only create PDMs that are supported in the current process. r=kamidphish
Depends on D52797

Differential Revision: https://phabricator.services.mozilla.com/D54876
2020-10-20 23:24:27 +00:00
Dan Glastonbury 29f6310810 Bug 1595994 - P2: Make RemoteDecoderManagerChild responsible for creation of remote decoders. r=kamidphish,mattwoodrow
Fly-by fix potential races when accessing the manager's thread.

Depends on D52796

Differential Revision: https://phabricator.services.mozilla.com/D52797
2020-10-20 23:23:58 +00:00
Dan Glastonbury 5cc27aec49 Bug 1595994 - P1: Move LaunchRDDProcessIfNeeded to RemoteDecoderManagerChild. r=kamidphish
It uses data and threads from the RemoteDecoderManagerChild not
RemoteDecoderModule.

Differential Revision: https://phabricator.services.mozilla.com/D52796
2020-10-20 23:23:40 +00:00
Jean-Yves Avenard 44f7c14c88 Bug 1671535 - Add 10 bits reftest with filter applied. r=mattwoodrow
This allows to test our readback implementation across platforms.

Differential Revision: https://phabricator.services.mozilla.com/D93716
2020-10-20 23:17:36 +00:00
Razvan Maries 6ad7ee6c29 Backed out 7 changesets (bug 1670917) for multiple GTest perma failures. CLOSED TREE
Backed out changeset 635942af8244 (bug 1670917)
Backed out changeset b0825300e78d (bug 1670917)
Backed out changeset 881fac72e13c (bug 1670917)
Backed out changeset 0285b2ab6d50 (bug 1670917)
Backed out changeset b58d65b96f2d (bug 1670917)
Backed out changeset 6ad13b34f08d (bug 1670917)
Backed out changeset 426aa6482835 (bug 1670917)
2020-10-20 22:55:47 +03:00
Paul Adenot fded7de4b4 Bug 1670917 - Add a pref to allow using raw WASAPI streams. Make it default to input-only raw streams. r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D93363
2020-10-20 13:08:27 +00:00
Paul Adenot 96b78da32a Bug 1670917 - Upstream build system and other bits from freebsd-ports. r=cubeb-reviewers,chunmin
This is the first two chunks in ed3dd55916/www/firefox/files/patch-cubeb-oss, from From: jbeich <jbeich@FreeBSD.org>. The rest of this patch file is now upstream.

This allows OSS users to drop a patch downstream.

Differential Revision: https://phabricator.services.mozilla.com/D93362
2020-10-20 13:08:22 +00:00
Dan Minor f55f5accb0 Bug 1667319 - Move duplicate payload type checking to JsepCodecDescription; r=bwc
This moves most of the JsepTrack functionality for dealing with duplicate
payload types to a new EnsurePayloadTypeNotDuplicate method in
JsepCodecDescription. It also adds a virtual EnsureNoDuplicatePayloadTypes
method that checks the appropriate payload types for each codec type.

Differential Revision: https://phabricator.services.mozilla.com/D92112
2020-10-20 13:54:20 +00:00
Dan Minor 9db8c73a93 Bug 1667319 - Store RED and ULPFEC payload types as strings; r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D92111
2020-10-20 13:55:04 +00:00
Andreas Pehrson ce0e1a41eb Bug 1671931 - Remove some `using` keywords and set up typedefs in VideoOutput.h. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D94055
2020-10-19 23:14:41 +00:00
Andreas Pehrson 648a59a37c Bug 1671931 - Let VideoOutput roll its own FrameID generator. r=bwc
There is a case where two VideoOutputs are feeding the same VideoFrameContainer
with data: VideoStreamTrack::AddVideoOutput(VideoFrameContainer) and
VideoStreamTrack::AddVideoOutput(FirstFrameVideoOutput) in HTMLMediaElement.
This is racy since they both call VideoFrameContainer::NewFrameID().

These VideoOutputs use different ProducerIDs however, so it makes sense for them
to also use separate FrameID generators.

Differential Revision: https://phabricator.services.mozilla.com/D94054
2020-10-19 23:14:34 +00:00
Mihai Alexandru Michis 25d5a4443a Backed out changeset 08f400e9b07d (bug 1671535) for causing reftest failures in image-10bits-rendering-90-video.html
CLOSED TREE
2020-10-20 10:29:53 +03:00
Jean-Yves Avenard 8d26b4c087 Bug 1671888 - Add VP9 HDR refrest. r=mattwoodrow
The purpose for those reftest at present isn't to verify that our image conversion is correct (it isn't), just that decoding produce something not completely broken

Differential Revision: https://phabricator.services.mozilla.com/D94065
2020-10-20 04:19:10 +00:00
Jean-Yves Avenard 59304c981e Bug 1671535 - Add 10 bits reftest with filter applied. r=mattwoodrow
This allows to test our readback implementation across platforms.

Differential Revision: https://phabricator.services.mozilla.com/D93716
2020-10-20 04:24:58 +00:00
Cosmin Sabou 9057e3c41b Backed out changeset 7a41ed3a5447 (bug 1671535) as requested by jya for pushing the wrong version. 2020-10-20 07:22:21 +03:00
Jean-Yves Avenard de1260940f Bug 1671535 - Add 10 bits reftest with filter applied. r=mattwoodrow
This allows to test our readback implementation across platforms.

Differential Revision: https://phabricator.services.mozilla.com/D93716
2020-10-20 01:25:59 +00:00
Jean-Yves Avenard 383d41acab Bug 1671863 - Skip reftest on mingw platform. r=heycam
The RDD doesn't start on MinGW and so the AV1 decoder isn't available.

Differential Revision: https://phabricator.services.mozilla.com/D93909
2020-10-20 02:46:28 +00:00
Narcis Beleuzu d54df1cd36 Backed out 12 changesets (bug 1626278) for mochitest leakchecks . CLOSED TREE
Backed out changeset eeed6ebfc444 (bug 1626278)
Backed out changeset cc2023032191 (bug 1626278)
Backed out changeset 15f89d2c5981 (bug 1626278)
Backed out changeset 1227d9db743d (bug 1626278)
Backed out changeset d91d9eb46983 (bug 1626278)
Backed out changeset 5861d6340ee8 (bug 1626278)
Backed out changeset 1cf19408d522 (bug 1626278)
Backed out changeset 90cf750aba51 (bug 1626278)
Backed out changeset 991bc13ae061 (bug 1626278)
Backed out changeset 8432bc08676e (bug 1626278)
Backed out changeset 5c0c76832287 (bug 1626278)
Backed out changeset 2f57fa13df7e (bug 1626278)
2020-10-19 22:58:59 +03:00
Bryce Seager van Dyk 8449f6d2b3 Bug 1671477 - Add profile markers and logs to help diagnose failures in WMF decoding. r=alwu
We have reports of VPx WMF failures in the wild causing performance issues, but
it can be hard to detect these failures. Having explicit markers in the profiler
with more information will make it easier to see if users are running into these
issues if they can provide profiles. I've also added logs to enrich cases where
we will use logging to debug.

Driveby fix a comment that says we're asserting when we no longer are.

Differential Revision: https://phabricator.services.mozilla.com/D93672
2020-10-19 14:41:11 +00:00
Dorel Luca b77a4cd190 Backed out changeset b64cb312c05b (bug 1671477) for Build bustage on Android. CLOSED TREE 2020-10-19 19:23:29 +03:00
Andreas Pehrson d5227f851c Bug 1582294 - Set up HTMLMediaElement to convey video track alpha channel when playing a MediaStream. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D92898
2020-10-19 15:35:13 +00:00
Byron Campen [:bwc] 7c4942b547 Bug 1626278: Shutdown MediaTransportHandlerSTS on profile-change-net-teardown. Also add some logging. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D93655
2020-10-19 15:13:55 +00:00
Byron Campen [:bwc] c3182f0329 Bug 1626278: Remove transports from main, just like we do under normal circumstances. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D93262
2020-10-15 20:31:13 +00:00
Byron Campen [:bwc] f6dd76e473 Bug 1626278: Ensure that pcid is unique. r=mjf
This fixes a failure in browser_WebrtcGlobalInformation.js on windows opt.

Differential Revision: https://phabricator.services.mozilla.com/D93261
2020-10-15 20:31:10 +00:00
Byron Campen [:bwc] e6969a8105 Bug 1626278: Move sigslot stuff to STS, and ensure we disconnect before releasing our ref to the MediaTransportHandler. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D90626
2020-10-15 20:27:35 +00:00
Byron Campen [:bwc] caa58b2223 Bug 1626278: Stash for ICE logs, and move log filtering into a single place. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D89677
2020-10-15 20:27:53 +00:00
Byron Campen [:bwc] 789c175c1a Bug 1626278: Filter stats for closed PeerConnections the same way we do for live ones. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88498
2020-10-15 20:18:10 +00:00
Byron Campen [:bwc] 02a62e624e Bug 1626278: Add a stats stash to WebrtcGlobalInformation, to avoid stats from being lost when a content process goes away. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88497
2020-10-15 20:15:48 +00:00
Byron Campen [:bwc] 6fabb4ea9d Bug 1626278: Simplify/promisify PWebrtcGlobal. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88496
2020-10-15 20:18:08 +00:00
Byron Campen [:bwc] ba4aa19c91 Bug 1626278: Use NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_DESTROY to ensure that MediaTransportHandler stays around long enough to finish pending stats queries. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D87180
2020-10-15 20:08:05 +00:00
Bryce Seager van Dyk 76c3e94c96 Bug 1671477 - Add profile markers and logs to help diagnose failures in WMF decoding. r=alwu
We have reports of VPx WMF failures in the wild causing performance issues, but
it can be hard to detect these failures. Having explicit markers in the profiler
with more information will make it easier to see if users are running into these
issues if they can provide profiles. I've also added logs to enrich cases where
we will use logging to debug.

Driveby fix a comment that says we're asserting when we no longer are.

Differential Revision: https://phabricator.services.mozilla.com/D93672
2020-10-19 14:41:11 +00:00
smolnar eba1c00fcf Backed out 2 changesets (bug 1346880) for causing audio failures. CLOSED TREE
Backed out changeset 7c0018c583b5 (bug 1346880)
Backed out changeset 4e7a614b30f8 (bug 1346880)
2020-10-19 13:07:51 +03:00
Paul Adenot 307c6e1733 Bug 1346880 - Test that a muted tab that plays audio via the Web Audio API is really muted using PulseAudio monitoring devices. r=pehrsons,alwu
Differential Revision: https://phabricator.services.mozilla.com/D93653
2020-10-19 08:45:04 +00:00
Paul Adenot fb3387d796 Bug 1346880 - Always initialize an AudioChannelAgent when initializing an AudioContext. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D92644
2020-10-19 08:45:04 +00:00
Dorel Luca 2aec5b3017 Backed out changeset ebe668f9d3dd (bug 1671477) for Build bustages. CLOSED TREE 2020-10-16 23:33:54 +03:00
Bryce Seager van Dyk cc05c909ab Bug 1671477 - Add profile markers and logs to help diagnose failures in WMF decoding. r=alwu
We have reports of VPx WMF failures in the wild causing performance issues, but
it can be hard to detect these failures. Having explicit markers in the profiler
with more information will make it easier to see if users are running into these
issues if they can provide profiles. I've also added logs to enrich cases where
we will use logging to debug.

Driveby fix a comment that says we're asserting when we no longer are.

Differential Revision: https://phabricator.services.mozilla.com/D93672
2020-10-16 19:28:36 +00:00
Jean-Yves Avenard c161e47a80 Bug 1671266 - Skip reftest on Windows for ARM. r=mattwoodrow
the AV1 decoder isn't available on this platform due to the lack of RDD support.

Differential Revision: https://phabricator.services.mozilla.com/D93713
2020-10-16 03:11:02 +00:00
alwu 58719da6a9 Bug 1668139 - part2 : add a telemetry probe to know how many actions are handled by default handler or media session handler. r=chunmin
It would be good for us to know how many websites actually use MediaSession API to control (play/pause/stop) their media playback, an how many websites use our default handler.

Differential Revision: https://phabricator.services.mozilla.com/D93283
2020-10-14 20:04:31 +00:00
alwu 96dfcf1376 Bug 1668139 - part1 : add a telemetry probe to record the usage on each different platform. r=chunmin
Each platform has different ways to allow users to use media control, adding a telemetry probe to detect that would be good for us to know the usage among different platforms.

Differential Revision: https://phabricator.services.mozilla.com/D93282
2020-10-14 20:04:34 +00:00
Razvan Maries a1a77c09cd Backed out 4 changesets (bug 1667454, bug 1668139) for perma failures on browser_media_control.js. CLOSED TREE
Backed out changeset 302032fe6d64 (bug 1668139)
Backed out changeset 859ee72e9e57 (bug 1668139)
Backed out changeset fe7de882fcbf (bug 1667454)
Backed out changeset dfd0308f5ab7 (bug 1667454)
2020-10-14 22:59:00 +03:00
alwu 873f48060e Bug 1668139 - part2 : add a telemetry probe to know how many actions are handled by default handler or media session handler. r=chunmin
It would be good for us to know how many websites actually use MediaSession API to control (play/pause/stop) their media playback, an how many websites use our default handler.

Differential Revision: https://phabricator.services.mozilla.com/D93283
2020-10-13 22:42:59 +00:00
alwu 32fa7ff7fb Bug 1668139 - part1 : add a telemetry probe to record the usage on each different platform. r=chunmin
Each platform has different ways to allow users to use media control, adding a telemetry probe to detect that would be good for us to know the usage among different platforms.

Differential Revision: https://phabricator.services.mozilla.com/D93282
2020-10-13 22:42:59 +00:00
Jean-Yves Avenard 950d6f18ca Bug 1670560 - Don't use the same thread pool for both decoding and waiting for the decode to complete. r=mattwoodrow
Unlikely to happen, but we could have exhausted all our thread in the decoder thread pool and be deadlock.

Differential Revision: https://phabricator.services.mozilla.com/D93202
2020-10-14 09:32:49 +00:00
Jean-Yves Avenard 6a0aeae0a5 Bug 1660727 - Add reftest. r=mattwoodrow
PNG file was generated with ffmpeg -i av1hdr2020.mp4 av1hdr2020.png

Differential Revision: https://phabricator.services.mozilla.com/D93456
2020-10-14 08:07:30 +00:00
Matt Woodrow 5487b02f9e Bug 1666055 - Remove RenderTextureHostOGL. r=lsalzman
This interface is never used directly, and the only consumers of the virtual functions are by the derived classes themselves.

Differential Revision: https://phabricator.services.mozilla.com/D93180
2020-10-14 07:58:18 +00:00
Bogdan Tara 09263ac198 Backed out 11 changesets (bug 1626278) for leaks and WebrtcGlobalInformation related failures CLOSED TREE
Backed out changeset 59228ee9d9e0 (bug 1626278)
Backed out changeset 59da0d11510e (bug 1626278)
Backed out changeset cd2e50c8af34 (bug 1626278)
Backed out changeset afdb75a17ac9 (bug 1626278)
Backed out changeset 5f453c8df70b (bug 1626278)
Backed out changeset 9b612ea670d4 (bug 1626278)
Backed out changeset 387a53fd83f3 (bug 1626278)
Backed out changeset 5870625073f6 (bug 1626278)
Backed out changeset 25c03ac56306 (bug 1626278)
Backed out changeset 3239d49be3ee (bug 1626278)
Backed out changeset 82ed327e71ed (bug 1626278)
2020-10-14 02:34:48 +03:00
Byron Campen [:bwc] faf7b39a92 Bug 1626278: Remove transports from main, just like we do under normal circumstances. r=mjf
Just in case.

Differential Revision: https://phabricator.services.mozilla.com/D93262
2020-10-12 20:09:28 +00:00
Byron Campen [:bwc] 2409f9b07e Bug 1626278: Ensure that pcid is unique. r=mjf
This fixes a failure in browser_WebrtcGlobalInformation.js on windows opt.

Differential Revision: https://phabricator.services.mozilla.com/D93261
2020-10-12 20:06:40 +00:00
Byron Campen [:bwc] 414ee0525d Bug 1626278: Move sigslot stuff to STS, and ensure we disconnect before releasing our ref to the MediaTransportHandler. r=mjf
This patch fixes an intermittent crash in pre-existing mochitests/wpt.

Differential Revision: https://phabricator.services.mozilla.com/D90626
2020-10-12 20:02:53 +00:00
Byron Campen [:bwc] 4e17277690 Bug 1626278: Stash for ICE logs, and move log filtering into a single place. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D89677
2020-10-12 20:06:51 +00:00
Byron Campen [:bwc] 181a475af9 Bug 1626278: Filter stats for closed PeerConnections the same way we do for live ones. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88498
2020-10-12 20:04:07 +00:00
Byron Campen [:bwc] 2e5c449c07 Bug 1626278: Add a stats stash to WebrtcGlobalInformation, to avoid stats from being lost when a content process goes away. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88497
2020-10-12 20:21:48 +00:00
Byron Campen [:bwc] 89cd7c2768 Bug 1626278: Simplify/promisify PWebrtcGlobal. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D88496
2020-10-12 19:57:12 +00:00
Byron Campen [:bwc] 0126e3fca7 Bug 1626278: Use NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_DESTROY to ensure that MediaTransportHandler stays around long enough to finish pending stats queries. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D87180
2020-10-12 19:56:44 +00:00
Aaron Klotz 865e038207 Bug 1668376: Part 1 - Rename GeckoProcessManager::MarkAsDead to GeckoProcessManager::ShutdownProcess; r=geckoview-reviewers,necko-reviewers,agi,dragana
Since the semantics of `ContentParent::MarkAsDead` are significantly different
from `GeckoProcessManager::MarkAsDead`, let's rename the latter to better
reflect what it actually does.

Differential Revision: https://phabricator.services.mozilla.com/D92649
2020-10-06 20:25:02 +00:00
Kartikaya Gupta 6d47eac4ee Bug 1666802 - Remove LayersLogging.*. r=mattwoodrow
The remaining functions are moved to be with their brethren in xpcom.

Differential Revision: https://phabricator.services.mozilla.com/D93146
2020-10-11 21:20:46 +00:00
Chun-Min Chang 156825631e Bug 1646719 - P2: Queue a suspended status check when cloning a cache-stream r=jya
- What this patch does:

Send a "download-suspended-by-cache" signal to the media-element paired
with a cloned cache-stream right after the cache-stream is cloned. That
signal help the media-element to decide if it's ready to enter the
HAVE_ENOUGH_DATA state and fire a "canplaythrough" event.

- Why this patch is needed:

It solves a WPT timeout issue. That WPT test waits a "canplaythrough"
event.

- What problem this patch solves is:

This patch addresses the problem mentioned in [1].

Each media-element pairs with a cache-stream downloading the data it
needs. When the data-download of a cache-stream gets suspended, the
media-element paired with the cache-stream should be notified. This
notification is one of the factor to move the ready-state of the
media-element to HAVE_ENOUGH_DATA. However, the media-element paired
with a cloned cache-stream may never receive this notification. And the
worst is that it may never have a chance to download enough data it
needs to move the ready-state to HAVE_ENOUGH_DATA as well at the same
time, in the case mentioned below.

This can happen when a media-element paired with a cloned cache-stream
is created after the cache is full, and all of the cache-streams are
suspended. (Cloned cache-stream is a cache-stream cloned from another
cache-stream that shares the same underlying data with it since their
paired media-elements have the same `src` (of `HTMLMediaElement`)).

"canplaythrough" event is fired when the ready-state is transited to
HAVE_ENOUGH_DATA. As a result, it will never be fired in this case.

In usual case, if the cache-stream gets suspended from non-suspended, it
will send a "download-suspended-by-cache=true" signal to its paired
media-element when running `MediaCache::Update()`. In fact, all other
cache-streams sharing the same underlying data will send this signal at
the same time if necessary. (Later, once the cache-stream is resumed
from suspended to non-suspended it will send a
"download-suspended-by-cache=false" signal to its paired media-element.
All other cache-streams sharing the same underlying data will do the
same if necessary.) The media-element keeps tracking that signal it
receives. After the first-frame of the media-element is loaded, the
ready-state of the media-element will be transited to HAVE_ENOUGH_DATA
by force if the signal is true. (Otherwise, the ready-state will be
inferred by other information.)

When cloning a cache-stream from another one, the cloned cache-stream is
suspended by default. If it's added to a jammed cache that all of the
cache-streams are suspended since the cache is full, then it never has a
chance to fire the "download-suspended-by-cache" signal. Both its
source-stream and itself have no status-change between suspended and
non-suspended, so `MediaCache::Update` is unable to send the signal.

In this case, we should force the media-element paired with the newly
cloned cache-stream transits its ready-state to HAVE_ENOUGH_DATA, which
follows the existing mechanism, by queueing a status-change-update when
cloning the stream. The status-change-update will be run in the
`MediaCache::Update` and it will check what the signal should be sent.
Once the "download-suspended-by-cache=true" is sent, the
"canplaythrough" event of the media-element can be dispatched after
its first-frame is loaded. (The event listeners can possibly make the
media-element starts playing, which is likely to cause a cache-seek that
can revitalize the cache eventually.)

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1646719#c5

Differential Revision: https://phabricator.services.mozilla.com/D92125
2020-10-09 23:07:05 +00:00
Chun-Min Chang 9d1970b6ea Bug 1646719 - P1: Add more debugging logs r=gerald
Add some logs that can help us to check how many cache-streams are
suspended and the working status in `MediaCache::Update`

Differential Revision: https://phabricator.services.mozilla.com/D92124
2020-10-04 07:19:18 +00:00
Andreas Pehrson e050f5fb8c Bug 1667728 - Simplify capping logic in OpusTrackEncoder. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D91958
2020-10-07 21:59:32 +00:00
Andreas Pehrson 018bbad6a7 Bug 1667728 - Make FrameEncode gtest pass EOS for completion. r=bryce
Without this patch, the FrameEncode gtest encoder won't encode the last bit of
data, making the total duration 20ms too short.

When passing EOS we encode the lookahead worth of silence, so this patch also
accounts for that.

Differential Revision: https://phabricator.services.mozilla.com/D91957
2020-10-07 21:59:22 +00:00
Andreas Pehrson d2bc5556a6 Bug 1667728 - Always round up framesToFetch when using a resampler. r=bryce
Without this patch, there could be an input rate leading to the use of a
resampler *and* framesLeft being 0 (not rounding up). Then we end up with too
little data to feed the resampler, and we fail an assert.

Differential Revision: https://phabricator.services.mozilla.com/D91956
2020-10-08 15:35:33 +00:00
Andreas Pehrson 7c84dcf8dc Bug 1667728 - Add lookahead silence after resampling. r=bryce
Without this patch, the lookahead silence would be added to the source segment,
which is sampled at the input rate.

The lookahead is in the output rate.

Converting the lookahead to the input rate, and letting our regular encoding
logic convert it back to the output rate can lead to a rounding error for some
input rates. A rounding error here would lead to the last packet being too
short.

Differential Revision: https://phabricator.services.mozilla.com/D91725
2020-10-08 15:43:17 +00:00
Andreas Pehrson 6473127af5 Bug 1667728 - Keep track of the output time by counting frames rather than accumulating packets durations in microseconds. r=bryce
There should be no accumulating rounding error here since packet durations are
exactly 200ms which does not lead to a rounding error when converting to
microseconds.

But this is for sanity, since the behavior prior to this patch is exactly how
you get an accumulating rounding error.

Differential Revision: https://phabricator.services.mozilla.com/D91955
2020-10-08 15:40:58 +00:00
Andreas Pehrson f0d67db160 Bug 1667728 - Test that encoding with opus at various input rates produces the expected number of frames. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D91954
2020-10-07 21:58:55 +00:00
Andreas Pehrson 59bacb5f29 Bug 1667728 - Decide the need for a resampler, and the output rate, at construction. r=bryce
Certain logic, like AudioOutputFramesPerPacket(), is hinged off whether a
resampler exists. The resampler is destroyed when encoding is completed, making
such logic flawed from that point. To avoid this potential footgun we can decide
the output rate at construction time, since the input rate is known then.

Differential Revision: https://phabricator.services.mozilla.com/D91953
2020-10-07 21:58:57 +00:00
Andreas Pehrson 810d0f98b6 Bug 1667728 - Define sample rate for GetPacketDuration(). r=bryce
AudioTrackEncoder uses GetPacketDuration() for signaling upwards that data is
available to be encoded. Data to be encoded is sampled at the input rate while
GetPacketDuration() is the duration in the output rate.

Meanwhile, OpusTrackEncoder uses GetPacketDuration() internally for deciding how
much data to encode. This is after resampling so correctly in the output rate.

To support both these cases, this patch adds NumOutputFramesPerPacket(), modeled
on GetOutputSampleRate(), denoting the packet duration in the output rate.
GetPacketDuration() is renamed to NumInputFramesPerPacket() and changed to be
the packet duration in the input rate.

Differential Revision: https://phabricator.services.mozilla.com/D91952
2020-10-08 15:24:34 +00:00
Andreas Pehrson ec3a23c754 Bug 1667728 - Use only one notion of sample rate for AudioTrackEncoder. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D91951
2020-10-07 22:19:37 +00:00
Andreas Pehrson 335693edce Bug 1667728 - Use TimeUnit where applicable in MediaRecorder's EncodedFrame. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D91728
2020-09-30 16:18:18 +00:00
Andreas Pehrson dce93bb60b Bug 1667728 - Add duration base asserts to EncodedFrame for sanity. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D91727
2020-09-30 16:17:58 +00:00
Andreas Pehrson a37ba69f3d Bug 1667728 - Ensure the Muxer doesn't have metadata set more than once. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D91726
2020-09-30 16:17:51 +00:00
Andreas Pehrson 0c7e9d79f3 Bug 1667728 - Make MediaRecorder's EncodedFrame immutable. r=bryce
Without this patch there was a gap between the default-ctor and when real values
got set. If setting a member was forgotten, it would have needed an audit to be
found. With this patch the compiler will make sure all values have been
explicitly handed to the ctor.

mFrameData (nsTArray) becomes Refcountable to allow VP8TrackEncoder to extend
the duration of an EncodedFrame by copying the last frame's ref and constructing
a new EncodedFrame with a longer duration than the last one's.

Differential Revision: https://phabricator.services.mozilla.com/D91724
2020-09-30 16:17:43 +00:00
Andreas Pehrson 5dcb49142e Bug 1667728 - Shift responsibility of adjusting packets with opus codec delay to opus encoder. r=bryce
This was originally handled by EbmlComposer. Since bug 1014393 this was handled
by MediaEncoder. By doing it in OpusTrackEncoder we can avoid reading hardcoded
fields in the opus metadata to get the codec delay value.

Differential Revision: https://phabricator.services.mozilla.com/D91723
2020-09-30 16:17:36 +00:00
alwu 17ff21b7c5 Bug 1663128 - part3 : the event source should do the cleanup when it closes. r=chunmin
When close the event source, it should be responsible to clear up and reset the virtual control interface, rather than doing so by `Media Control Server` via setting some empty results.

Differential Revision: https://phabricator.services.mozilla.com/D92116
2020-10-07 09:23:08 +00:00
alwu bce9062dc0 Bug 1663128 - part2 : let MediaControlService determine when we should open/close the event source. r=chunmin
The old way to open/close the event source, which is triggered by controller amount change event, is less intuitive, and we do the extra clean up when close the event source by assigning some parameters [1] that causes an issue on Windows where the control interface can't be clear up completely.

Each platform has its own way to clean the interface. For example, on Windows, we can simply call `ISystemMediaTransportControlsDisplayUpdater::ClearAll()`. So calling those functions actually helps nothing. The best way to do that is to ask the event source to do the clean up, rathering than setting those unnecessary parameters.

Therefore, we make it happen closer to when we determine or clear main controller and ask the event source to take a responsible to clean up when it closes.

[1] https://searchfox.org/mozilla-central/rev/35245411b9e8a911fe3f5adb0632c3394f8b4ccb/dom/media/mediacontrol/MediaControlService.cpp#410-413

Differential Revision: https://phabricator.services.mozilla.com/D92115
2020-10-08 00:06:21 +00:00
alwu 1a34753bd6 Bug 1663128 - part1 : remove unused function 'SetControlledTabBrowsingContextId()'. r=chunmin
As we've chosen another way for GeckoView implementation, so `SetControlledTabBrowsingContextId` is no longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D92114
2020-10-07 09:23:18 +00:00
Jon Bauman 3532affb49 Bug 1651239 - Merge GeckoMediaPluginServiceChild::GetContentParent methods. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D92341
2020-10-07 19:40:40 +00:00
Nico Grunbaum 2248f8b080 Bug 1669406 - add pref to blocklist codecs for WebRTC testing;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D92540
2020-10-07 14:26:37 +00:00
Andreas Pehrson c5e3e23059 Bug 1662760 - Add dedicated setup method to audio and video receivers. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D92448
2020-10-06 12:51:16 +00:00
Razvan Maries 98e7259515 Backed out 4 changesets (bug 1663128) for perma failures on browser_control_page_with_audible_and_inaudible_media.js. CLOSED TREE
Backed out changeset c9bd215fdafa (bug 1663128)
Backed out changeset 0ea9bcad0ff8 (bug 1663128)
Backed out changeset 6791eacd4868 (bug 1663128)
Backed out changeset 1f6e8e343055 (bug 1663128)
2020-10-07 12:14:56 +03:00
alwu d81f601202 Bug 1663128 - part3 : the event source should do the cleanup when it closes. r=chunmin
When close the event source, it should be responsible to clear up and reset the virtual control interface, rather than doing so by `Media Control Server` via setting some empty results.

Differential Revision: https://phabricator.services.mozilla.com/D92116
2020-10-06 21:43:25 +00:00
alwu 8fa7fe5499 Bug 1663128 - part2 : let MediaControlService determine when we should open/close the event source. r=chunmin
The old way to open/close the event source, which is triggered by controller amount change event, is less intuitive, and we do the extra clean up when close the event source by assigning some parameters [1] that causes an issue on Windows where the control interface can't be clear up completely.

Each platform has its own way to clean the interface. For example, on Windows, we can simply call `ISystemMediaTransportControlsDisplayUpdater::ClearAll()`. So calling those functions actually helps nothing. The best way to do that is to ask the event source to do the clean up, rathering than setting those unnecessary parameters.

Therefore, we make it happen closer to when we determine or clear main controller and ask the event source to take a responsible to clean up when it closes.

[1] https://searchfox.org/mozilla-central/rev/35245411b9e8a911fe3f5adb0632c3394f8b4ccb/dom/media/mediacontrol/MediaControlService.cpp#410-413

Differential Revision: https://phabricator.services.mozilla.com/D92115
2020-10-07 02:51:43 +00:00
alwu c4860628a6 Bug 1663128 - part1 : remove unused function 'SetControlledTabBrowsingContextId()'. r=chunmin
As we've chosen another way for GeckoView implementation, so `SetControlledTabBrowsingContextId` is no longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D92114
2020-10-07 02:51:53 +00:00
Paul Adenot 78d06fb142 Bug 1668598 - Don't use the word 'size' to mean a number of elements in MediaData.h. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D92429
2020-10-06 10:24:00 +00:00
Nico Grunbaum 9a0ceb7126 Bug 1668359 - Add call bandwidth estimation to about:webrtc r=dminor,emilio
Differential Revision: https://phabricator.services.mozilla.com/D92038
2020-10-06 04:04:12 +00:00
Dan Minor 4051f6c414 Bug 1668862 - Add script to extract local modifications to libwebrtc for upstream; r=ng DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D92271
2020-10-05 20:32:08 +00:00
Bryce Seager van Dyk 6e2d1d8482 Bug 1618529 - Store clear crypto subsample info in uint32 rather than uint16. r=jolin
This avoids us risking an overflow when we convert encrypted media with
subsamples to AnnexB (since that conversion can grow the clear sizes of the
sample). See the test in the preceding patch for an example of how and why this
happens.

Differential Revision: https://phabricator.services.mozilla.com/D92300
2020-10-05 18:17:06 +00:00
Bryce Seager van Dyk 9dbc3391a2 Bug 1618529 - Add gtest coverage for AnnexB conversions. r=jolin
Add test code to ensure AnnexB conversions behave as we expect. This adds some
coverage for non-encrypted conversions that we only tested with broader tests
until now. It also adds a test to ensure we don't overflow our subsample sizes
when dealing with encrypted media with very large subsamples. This latter test
covers the issue seen in bug 1618529.

Differential Revision: https://phabricator.services.mozilla.com/D92299
2020-10-05 18:22:08 +00:00
Chun-Min Chang e0a1f1aaec Bug 1666805 - P6: Remove the comment for AsyncBlockWriter r=jya
`AsyncBlockWriter` was removed long time ago. Its comment should be
removed as well.

Depends on D92107

Differential Revision: https://phabricator.services.mozilla.com/D92108
2020-10-03 00:36:40 +00:00
Chun-Min Chang 5d0898f7ae Bug 1666805 - P5: Remove `mBlockOwnersWatermark` r=jya
`mBlockOwnersWatermark` is introduced in bug 1366936 for telemetry `MEDIACACHE_BLOCKOWNERS_WATERMARK` but `MEDIACACHE_BLOCKOWNERS_WATERMARK` is removed in bug 1356046

Depends on D92106

Differential Revision: https://phabricator.services.mozilla.com/D92107
2020-10-03 10:39:40 +00:00
Chun-Min Chang 243f94d2ed Bug 1666805 - P4: Remove `mIndexWatermark` r=jya
`mIndexWatermark` was introduced in bug 1366929 for telemetry `MEDIACACHE_WATERMARK_KB` but `MEDIACACHE_WATERMARK_KB` was removed in bug 1356046

Depends on D92105

Differential Revision: https://phabricator.services.mozilla.com/D92106
2020-10-03 00:34:10 +00:00
Chun-Min Chang 39d95b1db5 Bug 1666805 - P3: Replace `mReentrantMonitor` by `mMonitor` in comment r=jya
In bug 1420798, the `mReentrantMonitor` is renamed to `mMonitor`.

Depends on D92104

Differential Revision: https://phabricator.services.mozilla.com/D92105
2020-10-03 00:32:53 +00:00
Chun-Min Chang dec01a31e5 Bug 1666805 - P2: Fix the wrong comment r=jya
`mCurrentMode` is initialized to MODE_METADATA [1,2]

[1]: https://searchfox.org/mozilla-central/rev/f21850ca45036ddb84cd25aa355a6969d7c94c4f/dom/media/MediaCache.h#527
[2]: Bug 1421134

Depends on D92103

Differential Revision: https://phabricator.services.mozilla.com/D92104
2020-10-03 00:31:19 +00:00
Chun-Min Chang 641663f60c Bug 1666805 - P1: Replace `aNotify` by `aNotifyAll` to align with the comment r=jya
Differential Revision: https://phabricator.services.mozilla.com/D92103
2020-10-03 00:29:29 +00:00
Paul Adenot c8239595d2 Bug 1566389 - Test that various mp3 files have exactly the correct duration. r=jya
Depends on D91773

Differential Revision: https://phabricator.services.mozilla.com/D91774
2020-10-05 15:43:50 +00:00
Paul Adenot bc85c0b003 Bug 1566389 - Trim the beginning and end of mp3 files, r=jya
Depends on D91772

Differential Revision: https://phabricator.services.mozilla.com/D91773
2020-10-05 15:43:40 +00:00
Paul Adenot d1ddf42f65 Bug 1566389 - Send encoder delay and padding info to the mp3 decoder. r=jya
Depends on D91771

Differential Revision: https://phabricator.services.mozilla.com/D91772
2020-10-05 15:43:30 +00:00
Paul Adenot 025cb49a2b Bug 1566389 - Tag compressed mp3 frames as EOS when it's the case. r=jya
Depends on D91770

Differential Revision: https://phabricator.services.mozilla.com/D91771
2020-10-05 15:43:16 +00:00
Paul Adenot 4460bb2aaf Bug 1566389 - Store the parsed encoder delay and padding when demuxing an mp3 file. r=jya,bryce
Depends on D91769

Differential Revision: https://phabricator.services.mozilla.com/D91770
2020-10-05 15:43:03 +00:00
Paul Adenot a8aac7aef6 Bug 1566389 - Parse lame encoder delay and padding when demuxing MP3s. r=bryce,jya
Depends on D91776

Differential Revision: https://phabricator.services.mozilla.com/D91769
2020-10-05 15:42:57 +00:00
Paul Adenot bbc8ba8d2b Bug 1566389 - Allow removing elements at the end of an AlignedAudioBuffer. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D91776
2020-10-05 15:42:55 +00:00
Kershaw Chang 71089ed718 Bug 1652677 - P2: Implement necko part of echconfig r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D89455
2020-10-05 15:16:46 +00:00
Noemi Erli d5e42c4c4e Backed out 7 changesets (bug 1566389) for causing bustages in FFmpegAudioDecoder.cpp
Backed out changeset 748e0d854d86 (bug 1566389)
Backed out changeset dd68ca2ed329 (bug 1566389)
Backed out changeset 820744dbc7d1 (bug 1566389)
Backed out changeset 89378e240d00 (bug 1566389)
Backed out changeset 6d36dae2ca8f (bug 1566389)
Backed out changeset ec4e0024ab8d (bug 1566389)
Backed out changeset 0fe64b836e24 (bug 1566389)
2020-10-05 18:23:37 +03:00
Paul Adenot efda27b066 Bug 1566389 - Test that various mp3 files have exactly the correct duration. r=jya
Depends on D91773

Differential Revision: https://phabricator.services.mozilla.com/D91774
2020-10-05 13:12:35 +00:00
Paul Adenot ec196fafb6 Bug 1566389 - Trim the beginning and end of mp3 files, r=jya
Depends on D91772

Differential Revision: https://phabricator.services.mozilla.com/D91773
2020-10-05 13:12:12 +00:00