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

1726 Коммитов

Автор SHA1 Сообщение Дата
Karl Tomlinson 32c6cac7db Bug 1644647 - Bug 1285290 use strong pointers for tracks in ApplyAudioContextOperation() r=padenot
This will be helpful when delaying resumption of tracks until there is an AudioCallbackDriver.

The memory for the array is also transferred to the callee to save an allocation.

Differential Revision: https://phabricator.services.mozilla.com/D76801
2020-06-12 01:02:18 +00:00
Simon Giesecke 82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Butkovits Atila e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Simon Giesecke ca2d0aaa68 Bug 1644403 - Fix inconsistent uses of CopyableAutoTArray and Clone. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78893
2020-06-09 14:27:20 +00:00
Simon Giesecke ebbc7ae838 Bug 1642989 - Use RemoveLastElements instead of RemoveElementsAt where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78049
2020-06-08 08:50:15 +00:00
Karl Tomlinson 4e78ffdefb Bug 1641161 - Bug 1285290 alias move() to std::move() in MediaTrackGraph.cpp and AudioContext.cpp r=padenot
Depends on D76799

Differential Revision: https://phabricator.services.mozilla.com/D76800
2020-05-27 08:36:18 +00:00
Karl Tomlinson cd4aaf8433 Bug 1641161 - Bug 1285290 don't add destroyed tracks to graph from Increment/DecrementSuspendCount r=padenot
Tracks remove themselves from the graph after DestroyImpl() and so should not
be added again after this.

These methods are now invoked only on the MediaTrack removing the possibility
of calling the wrong method.

Depends on D76797

Differential Revision: https://phabricator.services.mozilla.com/D76798
2020-05-27 08:34:13 +00:00
Masatoshi Kimura 9c7a29b17e Bug 1531851 - Make WebAudio GC tests more reliable. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D76590
2020-05-25 18:04:58 +00:00
Paul Adenot 781a32b68c Bug 1607781 - Consistently use a fixed sample-rate when resisting fingerprinting. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D75937
2020-05-19 12:50:30 +00:00
Karl Tomlinson dc85ea650c Bug 1625372 permit ForceShutDown() on a realtime graph r=padenot
Depends on D74812

Differential Revision: https://phabricator.services.mozilla.com/D74813
2020-05-15 08:22:31 +00:00
Karl Tomlinson e8ab6c7193 Bug 1625372 remove unnecessary DestroyNonRealtimeInstance() call from AudioDestinationNode::DestroyMediaTrack() r=padenot
DestroyMediaTrack() is called only on Unlink or destruction of the AudioDestinationNode.
If there are no references to the AudioDestinationNode, then the graph's last stream
will be destroyed and the graph will shut down itself.

Differential Revision: https://phabricator.services.mozilla.com/D74812
2020-05-13 10:13:19 +00:00
Karl Tomlinson 0a1151e126 Bug 1625372 request interrupt of AudioWorklet JS on force shutdown r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D71915
2020-05-15 08:24:06 +00:00
alwu 3581879481 Bug 1509933 - part3 : use the new pref in tests. r=padenot
This patch will do :
- replace the old pref with the new pref

The advantage of doing so :
- to ensure those tests can still use the correct blocking autoplay policy

Differential Revision: https://phabricator.services.mozilla.com/D73973
2020-05-15 02:51:18 +00:00
Dorel Luca 68c900462b Backed out 3 changesets (bug 1509933) for Linting failure in gecko/mobile/android/app/mobile.js. CLOSED TREE
Backed out changeset c15ecdcd5d13 (bug 1509933)
Backed out changeset 951ea1d0f42a (bug 1509933)
Backed out changeset 3abb24d6dfc9 (bug 1509933)
2020-05-15 05:02:07 +03:00
alwu 1c6be41aa9 Bug 1509933 - part3 : use the new pref in tests. r=padenot
This patch will do :
- replace the old pref with the new pref

The advantage of doing so :
- to ensure those tests can still use the correct blocking autoplay policy

Differential Revision: https://phabricator.services.mozilla.com/D73973
2020-05-07 13:05:22 +00:00
Karl Tomlinson 62c2076a1b Bug 1637159 remove now-unused public DOMEventTargetHelper::BindToOwner() rebind methods r=smaug
The virtual is no longer required since
https://hg.mozilla.org/mozilla-central/rev/a01586b62cf5#l1.92

Differential Revision: https://phabricator.services.mozilla.com/D75042
2020-05-14 05:29:49 +00:00
Philip Chimento f93330de3e Bug 1629293 - Expose js::ErrorReport in public API. r=evilpie
Renames it to JS::ErrorReportBuilder, since it is used to 'build' a
JSErrorReport object.

Differential Revision: https://phabricator.services.mozilla.com/D73521
2020-05-14 04:44:15 +00:00
Narcis Beleuzu a12e8bbd08 Backed out 5 changesets (bug 1505129, bug 1506323, bug 1629293) for bustages on testPrintError.cpp . CLOSED TREE
Backed out changeset ad1ccad76686 (bug 1629293)
Backed out changeset 452e9ab721bd (bug 1629293)
Backed out changeset 72a63e290177 (bug 1629293)
Backed out changeset faeed99f813e (bug 1505129)
Backed out changeset 7bd84a644d2b (bug 1506323)
2020-05-13 21:23:59 +03:00
Philip Chimento 5606c63575 Bug 1629293 - Expose js::ErrorReport in public API. r=evilpie
Renames it to JS::ErrorReportBuilder, since it is used to 'build' a
JSErrorReport object.

Differential Revision: https://phabricator.services.mozilla.com/D73521
2020-05-13 16:10:39 +00:00
Csoregi Natalia 0da2867bf2 Backed out 5 changesets (bug 1625372) for assertion failures on GraphDriver.cpp. CLOSED TREE
Backed out changeset b9feee4f447c (bug 1625372)
Backed out changeset d86f066bd68b (bug 1625372)
Backed out changeset 7a38398623f8 (bug 1625372)
Backed out changeset 6e9928fb37d1 (bug 1625372)
Backed out changeset ca93e9921c05 (bug 1625372)
2020-05-13 13:09:22 +03:00
Karl Tomlinson ef208899b1 Bug 1625372 shut down MediaTrackGraph from AudioContext when window will be destroyed r=padenot
Depends on D74813

Differential Revision: https://phabricator.services.mozilla.com/D74814
2020-05-12 08:44:46 +00:00
Karl Tomlinson 989d1fc6db Bug 1625372 permit ForceShutDown() on a realtime graph r=padenot
Depends on D74812

Differential Revision: https://phabricator.services.mozilla.com/D74813
2020-05-12 08:43:11 +00:00
Karl Tomlinson 3e139c32e0 Bug 1625372 remove unnecessary DestroyNonRealtimeInstance() call from AudioDestinationNode::DestroyMediaTrack() r=padenot
DestroyMediaTrack() is called only on Unlink or destruction of the AudioDestinationNode.
If there are no references to the AudioDestinationNode, then the graph's last stream
will be destroyed and the graph will shut down itself.

Differential Revision: https://phabricator.services.mozilla.com/D74812
2020-05-12 08:42:38 +00:00
Karl Tomlinson 53bf89e445 Bug 1625372 request interrupt of AudioWorklet JS on force shutdown r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D71915
2020-05-12 07:10:51 +00:00
Hiroyuki Ikezoe 34c6fd1e8c Bug 1636838 - Undef CurrentTime and define X11CurrentTime instead. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D74585
2020-05-11 19:34:02 +00:00
Benoît Chauvet 1854f52b7c Bug 1626753 - WaveShaperNode.cpp : removed else after return. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D74741
2020-05-11 21:17:24 +00:00
Simon Giesecke f7f5462a4b Bug 1626570 - Improve handling of copying arrays in dom/media/. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D73627
2020-05-05 11:38:10 +00:00
Paul Adenot 052b46021c Bug 1633747 - Flush NaNs to zeros before handing back the audio output buffer to the OS. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D72927
2020-05-01 23:57:30 +00:00
Tom Tung 684a5d3947 Bug 1624266 - Use IsSharedMemoryAllowed to decide whether should the CTOR SharedArrayBuffer be defined for Worklets; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D71536
2020-05-01 11:36:08 +00:00
Paul Adenot 3f634118d6 Bug 1634098 - Fix a few clang-tidy warnings in AudioNodeEngine.cpp and vector sibling files. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D73087
2020-04-29 22:39:15 +00:00
Chris Peterson d8873bd7de Bug 1594529 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/media/webaudio. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D72565
2020-04-27 11:46:32 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Paul Adenot 68f59c15f7 Bug 1626382 - r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D72144
2020-04-24 01:57:47 +00:00
Paul Adenot bbddb266a3 Bug 1611622 - Add a decode test for an OGG Vorbis file with a nil packet at EOS. r=bryce
The test file was created using VLC, that has a muxer that does this.

Differential Revision: https://phabricator.services.mozilla.com/D71351
2020-04-21 09:30:57 +00:00
Paul Adenot 2ff258c252 Bug 1611622 - Allow testing for a decode success without checking the file. r=bryce
Useful to test the demuxer in the web audio case.

Differential Revision: https://phabricator.services.mozilla.com/D71350
2020-04-21 09:30:40 +00:00
Paul Adenot 22429adf2a Bug 1611622 - Add some logging to MediaBufferDecoder.cpp. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D70894
2020-04-21 09:30:00 +00:00
Noemi Erli 0e5b704353 Backed out 5 changesets (bug 1611622) for causing failures in test_mediaDecoding.html CLOSED TREE
Backed out changeset f4a83f3ac965 (bug 1611622)
Backed out changeset 87254fc7b777 (bug 1611622)
Backed out changeset 1177ae3a0ef3 (bug 1611622)
Backed out changeset daf821043996 (bug 1611622)
Backed out changeset adab60e7e9c5 (bug 1611622)
2020-04-20 22:50:35 +03:00
Paul Adenot ea156f7bf4 Bug 1611622 - Add a decode test for an OGG Vorbis file with a nil packet at EOS. r=bryce
The test file was created using VLC, that has a muxer that does this.

Differential Revision: https://phabricator.services.mozilla.com/D71351
2020-04-20 18:36:48 +00:00
Paul Adenot 571e9f80af Bug 1611622 - Allow testing for a decode success without checking the file. r=bryce
Useful to test the demuxer in the web audio case.

Differential Revision: https://phabricator.services.mozilla.com/D71350
2020-04-20 18:36:41 +00:00
Paul Adenot 010795c79b Bug 1611622 - Add some logging to MediaBufferDecoder.cpp. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D70894
2020-04-20 18:36:20 +00:00
Mihai Alexandru Michis 1ad47078f4 Backed out 5 changesets (bug 1611622) for causing bustages.
CLOSED TREE

Backed out changeset 8be308a0ff7d (bug 1611622)
Backed out changeset e6286802e8b5 (bug 1611622)
Backed out changeset ca1198a5d65c (bug 1611622)
Backed out changeset 7f14a871f69e (bug 1611622)
Backed out changeset 1db1f7da1215 (bug 1611622)
2020-04-17 21:17:37 +03:00
Paul Adenot 88b9f51e9b Bug 1611622 - Add a decode test for an OGG Vorbis file with a nil packet at EOS. r=bryce
The test file was created using VLC, that has a muxer that does this.

Differential Revision: https://phabricator.services.mozilla.com/D71351
2020-04-17 17:56:45 +00:00
Paul Adenot d4b4cd9dee Bug 1611622 - Allow testing for a decode success without checking the file. r=bryce
Useful to test the demuxer in the web audio case.

Differential Revision: https://phabricator.services.mozilla.com/D71350
2020-04-17 17:56:25 +00:00
Paul Adenot 60a6cea746 Bug 1611622 - Add some logging to MediaBufferDecoder.cpp. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D70894
2020-04-17 17:55:59 +00:00
Jeff Walden 3dddf97e18 Bug 1624266 - Add code to page/worker/worklet code so that the global "SharedArrayBuffer" property can be trivially omitted from their global objects by changing how a single C++ variable for each case is initialized. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D71253
2020-04-17 08:21:02 +00:00
Steve Fink a19414b831 Bug 1626772 - gcc compatibility hack for __attribute__ and mutable ordering in lambda decl r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D69402

--HG--
extra : moz-landing-system : lando
2020-04-10 01:09:04 +00:00
Mihai Alexandru Michis f2e4ef7d2a Backed out 3 changesets (bug 1626772) for causing bustages in DefineEnum.h
CLOSED TREE

Backed out changeset f42150bdee2b (bug 1626772)
Backed out changeset ab5b637f714a (bug 1626772)
Backed out changeset fd4026a9f380 (bug 1626772)
2020-04-10 03:49:33 +03:00
Steve Fink f052f2616d Bug 1626772 - gcc compatibility hack for __attribute__ and mutable ordering in lambda decl r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D69402

--HG--
extra : moz-landing-system : lando
2020-04-08 08:48:11 +00:00
Tom Schuster 763682c095 Bug 1626100 - Replace SetPendingExceptionAndStack with a ExceptionStack version. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D69667

--HG--
extra : moz-landing-system : lando
2020-04-09 12:35:59 +00:00
Tom Schuster fae4303276 Bug 1626100 - Introduce an ExceptionStack class and StealPendingExceptionStack. r=sfink,mccr8
See also the bug for a more detailed description.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 12:35:29 +00:00
Tom Tung d33e72aaa9 Bug 1586761 - P5 - Use new methods in media r=tjr,baku
Differential Revision: https://phabricator.services.mozilla.com/D63906

--HG--
extra : moz-landing-system : lando
2020-03-25 14:16:15 +00:00
Tom Tung 94183661ac Bug 1586761 - P2 - Introduce new TimerPrecisionTypes and a set of new Reduce methods to decide the TimerPrecisionType in the nsRFPService; r=tjr
To support checking CrossOriginIsolated in performance.now(), we need to:
- Add new types to TimerPrecisionType for nsRFPService
  - System, HighResAllowed are added
  - All is renamed to Normal
- Introduce a set of Reduce methods which require isSystemPrincipal and
CrossOriginIsolated to be passed and decide the TimerPrecisionType later
  - Original Reduce methods should only be called when callsites know the
  TimerPrecisionType. Otherwise, they should call the new methods.
- The following patches will use new methods

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

--HG--
extra : moz-landing-system : lando
2020-03-25 14:09:55 +00:00
Andreas Farre 36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Alex Chronopoulos 88b8c3cca3 Bug 1626319 - Change async callback logger to log per thread-id. r=padenot
TRACE_AUDIO_CALLBACK() and TRACE_AUDIO_CALLBACK_COMMENT(aFmt, ...) log to a hardcoded thread id number. This creates confusion when more than one MTG is running because logs from different threads are depicted to the same thread line and overlapping each other. Those logging commands have been removed and the TRACE* command is used that it logs per thread-id.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 10:45:52 +00:00
Amogh Kerigond eac94b6c20 Bug 1624234 - Removes else or else if after return statement r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D67970

--HG--
extra : moz-landing-system : lando
2020-03-30 20:08:39 +00:00
André Bargull 14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.

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

--HG--
extra : moz-landing-system : lando
2020-03-28 16:00:09 +00:00
André Bargull ebec34a898 Bug 1625138 - Part 16: Replace mozilla::IsIntegral with std::is_integral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68371

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:15 +00:00
André Bargull 1f5d157732 Bug 1625138 - Part 15: Replace mozilla::IsFloatingPoint with std::is_floating_point. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68370

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:15 +00:00
Paul Adenot a8b1a92375 Bug 1565464 - Allow not having a parameterDescriptor getter in an AudioWorkletProcessor. r=karlt
https://github.com/WebAudio/web-audio-api/issues/2171

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

--HG--
extra : moz-landing-system : lando
2020-03-27 10:50:23 +00:00
Paul Adenot 02b0f626e1 Bug 1565464 - Accept any iterable for parameterDescriptors in AudioWorkletGlobalScope.registerProcessor(). r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D65003

--HG--
extra : moz-landing-system : lando
2020-03-27 10:50:08 +00:00
Mike Conley eaccc7871f Bug 1621684 - Take an audio-playing wakelock when using WebAudio. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D67544

--HG--
extra : moz-landing-system : lando
2020-03-26 08:02:05 +00:00
Paul Adenot c5169dcde5 Bug 1613070 - Add tracing markers to AudioWorklet code (real-time thread side). r=karlt
Moving the trace point for messages to the inner loop allow understanding what
pages are doing better (if they are creating lots of nodes or changing lots of
params, etc.). Also, it is important to be able to characterize `onmessage`
calls.

Having two tracepoints under `ProcessBlockOnPorts` allows gauging the buffer
preparation overhead. vs just the page's processing code.

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

--HG--
extra : moz-landing-system : lando
2020-03-24 13:21:54 +00:00
Andrea Marchesini 6e5bd2d254 Bug 1402784 - Use nsIContentPolicy::TYPE_INTERNAL_AUDIOWORKLET and nsIContentPolicy::TYPE_INTERNAL_PAINTWORKLET in Worklet code, r=smaug
Depends on D67105

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

--HG--
extra : moz-landing-system : lando
2020-03-17 22:24:39 +00:00
Simon Giesecke 7e9a7de895 Bug 1620632 - Rename confusingly named types/macros for relocation handling of nsTArray. r=froydnj
Specifically, this renames
* nsTArray_CopyChooser to nsTArray_RelocationStrategy
* the Copy template argument of nsTArray_base to RelocationStrategy
* nsTArray_CopyWithConstructors to nsTArray_RelocateUsingMoveConstructor
* nsTArray_CopyWithMemutils to nsTArray_RelocateUsingMemutils
* DECLARE_USE_COPY_CONSTRUCTORS to MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR

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

--HG--
extra : moz-landing-system : lando
2020-03-20 17:04:27 +00:00
Paul Adenot eb1764b731 Bug 1558124 - When calling the AudioWorkletProcessor ctor, switch to rethrowing exceptions to handle them manually. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D64769

--HG--
extra : moz-landing-system : lando
2020-03-18 10:53:31 +00:00
Paul Adenot 3514c96161 Bug 1558124 - When an exception happens in the AudioWorkletGlobalScope, fire `onprocessorerror`. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D64766

--HG--
extra : moz-landing-system : lando
2020-03-18 10:53:56 +00:00
Paul Adenot 2fef3e1da9 Bug 1558124 - Pass the track and the JSContext to SendProcessorError. r=karlt
Those are needed, respectively to be able to ensure the stream doesn't go away
when messaging back to the control thread, and then to access the details of the
exception thrown.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 10:53:00 +00:00
Paul Adenot bf21b8928e Bug 1558124 - Don't suppress the exception when the ctor of an AudioWorkletProcessor throws. r=karlt
https://github.com/WebAudio/web-audio-api/issues/2096

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

--HG--
extra : moz-landing-system : lando
2020-03-18 10:52:53 +00:00
Paul Adenot 0dfeed31ae Bug 1558124 - Pass a JSContext to AudioWorkletGlobalScope::ConstructProcessor. r=karlt
Having nested AutoJSAPI clobbers the exception value of the innermost one on
destruction.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 10:52:46 +00:00
Alex Chronopoulos 9fb4eecd46 Bug 1617915 - Expose output device id when MediaTrackGraph is created. r=padenot
In order to be able to change the audio output device, the device id is exposed to the constructor of MediaStreamGraph. Any component that gets/creates an MTG will be able to provide the device id in order to determine the desired output device. If the provided device id is null the default device will be used.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 12:56:20 +00:00
Paul Adenot ae95e91636 Bug 1619607 - When attempting to create an AudioWorkletNode with non-existing processor, throw InvalidStateError. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D65109

--HG--
extra : moz-landing-system : lando
2020-03-11 14:45:12 +00:00
Paul Adenot dc3afac772 Bug 1621596 - Adjust one patch from bug 1598114 to land what was meant to be landing
Differential Revision: https://phabricator.services.mozilla.com/D66382

--HG--
extra : moz-landing-system : lando
2020-03-11 10:56:00 +00:00
Ehsan Akhgari c6394ae30b Bug 873335 - Add a crashtest based on the test case for the bug
Differential Revision: https://phabricator.services.mozilla.com/D66237

--HG--
extra : moz-landing-system : lando
2020-03-10 15:18:56 +00:00
Paul Adenot 3a25af8174 Bug 1598114 - Never destroy `AudioTimelineEvent` from the render thread when it contains a valid pointer to an `AudioNodeTrack`, and assert it. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D64759

--HG--
extra : moz-landing-system : lando
2020-03-05 16:13:12 +00:00
Paul Adenot 31bc8ab686 Bug 1598114 - Compute the values for each AudioParamTimeline directly into the Float32Arrays and pass the object to `process`. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D63356

--HG--
extra : moz-landing-system : lando
2020-03-05 00:55:28 +00:00
Paul Adenot a67b86366f Bug 1598114 - Initialize the javascript objects necessary to pass the third parameter to `process`. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D63355

--HG--
extra : moz-landing-system : lando
2020-03-04 15:22:51 +00:00
Paul Adenot ae9705970c Bug 1598114 - Receive AudioParamTimeline events to the render thread. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D63354

--HG--
extra : moz-landing-system : lando
2020-03-04 15:22:48 +00:00
Paul Adenot 4651ad6731 Bug 1598114 - Implement `AudioWorkletNode.parameters`. r=karlt
This covers only the main thread part of this attribute.

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

--HG--
extra : moz-landing-system : lando
2020-03-05 00:49:09 +00:00
Paul Adenot 3902b2f19e Bug 1598114 - Pass the graph time to ProcessBlockOnPorts. r=karlt
This is necessary to then compute AudioParam values for the right time.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 15:21:28 +00:00
Paul Adenot ebe89c5caa Bug 1598114 - Use char16_t for AudioParam names, since they can now be exposed to js and contain non-ascii values. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D63351

--HG--
extra : moz-landing-system : lando
2020-03-04 15:21:23 +00:00
Boris Zbarsky c878a8bb26 Bug 1619112 part 2. Pass char literals instead of char16_t literals into ErrorResult throwing methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65538

--HG--
extra : moz-landing-system : lando
2020-03-06 21:04:58 +00:00
Boris Zbarsky 8e25df76a8 Bug 1618011 part 10. Use a BindingCallContext for initializing AudioParamDescriptors. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D64891

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:17 +00:00
Boris Zbarsky 0082f55dee Bug 1618011 part 7. Switch most error messages used in bindings to having a method name prefix. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D64888

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:16 +00:00
Arthur Iakab 14247fb057 Backed out 11 changesets (bug 1618011)for Linting failure.
CLOSED TREE

Backed out changeset 8b11ddd8999f (bug 1618011)
Backed out changeset 11df2f359473 (bug 1618011)
Backed out changeset c50121035d50 (bug 1618011)
Backed out changeset 8b8c4c60c34b (bug 1618011)
Backed out changeset b01f8c66110b (bug 1618011)
Backed out changeset 433fdf04058c (bug 1618011)
Backed out changeset 29a9227d08ac (bug 1618011)
Backed out changeset b2dfa2e66d24 (bug 1618011)
Backed out changeset 85650ee945c4 (bug 1618011)
Backed out changeset 278a213e5304 (bug 1618011)
Backed out changeset 9119aeb72ea4 (bug 1618011)
2020-03-07 00:15:57 +02:00
Boris Zbarsky eaa46a9a55 Bug 1618011 part 10. Use a BindingCallContext for initializing AudioParamDescriptors. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D64891

--HG--
extra : moz-landing-system : lando
2020-03-06 20:39:50 +00:00
Boris Zbarsky bc068d0e54 Bug 1618011 part 7. Switch most error messages used in bindings to having a method name prefix. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D64888

--HG--
extra : moz-landing-system : lando
2020-03-06 20:39:10 +00:00
Simon Giesecke 88ead5d627 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/media. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D65178

--HG--
extra : moz-landing-system : lando
2020-03-04 15:39:20 +00:00
Karl Tomlinson f2383505ff Bug 1596655 Keep DestinationNode track after offline completion for worklets r=padenot
This keeps the worklet/graph thread alive for control and MessagePort messages
until there are no references to main thread objects.

In test_getUserMedia_audioCapture, the track of the OscillatorNode being
recorded does not end, and, even if it did, MediaRecorder would not listen for
ended notification on the node's track but its pipe track.  Recording via
DestinationNode works around this because the DestinationNode track ends and
MediaRecorder listens to this track directly because it has
EXTERNAL_OUTPUT. Previously MediaRecorder would stop when the MediaTrackGraph
was shutdown, but this is no longer happening.

Depends on D65069

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

--HG--
extra : moz-landing-system : lando
2020-03-03 18:16:03 +00:00
Karl Tomlinson 0c148488c4 Bug 1596655 move offline complete event logic from engine to node r=padenot
This will allow the node to drop its self reference without
AudioContext::Shutdown().

Depends on D65068

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

--HG--
extra : moz-landing-system : lando
2020-03-03 18:01:54 +00:00
Karl Tomlinson 350141becf Bug 1596655 move OnCompleteTask to anonymous namespace r=padenot
This will allow the class to be used from AudioDestinationNode.

Depends on D65067

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

--HG--
extra : moz-landing-system : lando
2020-03-03 18:01:37 +00:00
Sylvestre Ledru 096c7ab5f0 Bug 1617437 - OggCodecState.h/DynamicsCompressor.h: Fix two -Wnon-c-typedef-for-linkage warnings r=jya
Differential Revision: https://phabricator.services.mozilla.com/D63785

--HG--
extra : moz-landing-system : lando
2020-03-01 12:39:18 +00:00
Andrew McCreight 4babb2b5ab Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Ciure Andrei 00dd87f6f4 Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight b197e1f783 Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Kris Maglione c31aa68fb4 Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 19:44:39 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Sylvestre Ledru ca6530131a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-02-24 15:33:38 +00:00
Eric Rahm 6ea4ed1c80 Bug 1322095 - Part 2: Remove nsAutoPtr from dom/media. r=jya
This converts `nsAutoPtr` usage in dom/media to `UniquePtr`. Beyond just a
search and replace we also needed to update assignment and access of the
`UniquePtr`s. This falls into a few categories:
  - Assignment from a newly constructed object switches to `MakeUnique`
  - Assignment from a raw ptr switches to `UniquePtr::reset`
  - Handing out a raw ptr now requires `UniquePtr::get`
  - Uses `UniquePtr::release` rather than `nsAutoPtr::forget`
  - A few spots are updated to return a `UniquePtr` rather than a raw ptr

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

--HG--
extra : moz-landing-system : lando
2020-02-21 22:44:00 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
Karl Tomlinson b7633dada4 Bug 1614551 Allow an unreferenced closed AudioContext to be garbage collected r=padenot
Depends on D62521

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

--HG--
extra : moz-landing-system : lando
2020-02-12 14:40:30 +00:00
Karl Tomlinson 802d8b8b21 Bug 1614551 Add test for GC of closed AudioContext r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D62521

--HG--
extra : moz-landing-system : lando
2020-02-12 14:30:35 +00:00
Karl Tomlinson d8b56164b2 Bug 1614551 Allow an unreferenced suspended AudioContext to be garbage collected r=padenot
Depends on D62517

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

--HG--
extra : moz-landing-system : lando
2020-02-12 14:30:33 +00:00
Karl Tomlinson 665f67f2c5 Bug 1614551 Add test for GC of suspended AudioContext r=padenot
Depends on D62516

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

--HG--
extra : moz-landing-system : lando
2020-02-12 14:30:26 +00:00
Karl Tomlinson 1b07ed625f Bug 1614551 Add some tests for AudioContext GC r=padenot
Depends on D62515

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

--HG--
rename : dom/media/webaudio/test/test_ScriptProcessorCollected1.html => dom/media/webaudio/test/test_audioContextGC.html
extra : moz-landing-system : lando
2020-02-12 14:30:24 +00:00
Karl Tomlinson ee6d3bcf1b Bug 1221889 suspend new tracks created after AudioContext.close() r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D62515

--HG--
extra : moz-landing-system : lando
2020-02-12 14:14:46 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Boris Zbarsky a8af57b293 Bug 1614038 part 2. Improve error reporting in webaudio code. r=padenot
The change to throw NotSupportedError in AudioContext::CreateBuffer is
purposeful, to align with the spec and Chrome.  There's apparently no web
platform test coverage for this, but we'll work on converting our test to a WPT.

The change to AudioContext::Close is fixing what looks like an obvious bug to
me (it _resolved_ a Promise<void> with a DOMException!).  No obvious test coverage; https://bugzilla.mozilla.org/show_bug.cgi?id=1614960 tracks adding some.

The change to throw RangeError in OscillatorNode::Start is purposeful, to align
wih the spec and Chrome.  Again, there's apparently no test coverage.

The change to throw RangeError in OscillatorNode::Stop is purposeful, to align
wih the spec and Chrome.  Again, there's apparently no test coverage.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 17:59:41 +00:00
Boris Zbarsky c798ed8038 Bug 1614038 part 1. Fix ChannelSplitterNode to follow the spec for its setters. r=padenot
This is based on looking at what the actual spec constraints around the
channelCount, channelCountMode, and channelInterpretation setters are and on
testing Chrome's behavior: the setters _can_ be called as long as you do it with
the current value.  That said, the spec sure could use being clearer here; the
style it's using is pretty hard to follow, unfortunately.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 15:38:02 +00:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Andrea Marchesini acbbf5b903 Bug 1614899 - Support WASM + SAB in AudioWorkletNode processOptions, r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D62598

--HG--
extra : moz-landing-system : lando
2020-02-12 16:16:23 +00:00
Boris Zbarsky c1c6ce37b3 Bug 1613827. Be more careful with SharedBuffer::Create callsites. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D61959

--HG--
extra : moz-landing-system : lando
2020-02-11 16:58:33 +00:00
Boris Zbarsky 05327f8a52 Bug 1613978. Allow passing u"...", not just nsAStrings, to templated ThrowType/RangeError. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D62061

--HG--
extra : moz-landing-system : lando
2020-02-10 13:08:48 +00:00
Boris Zbarsky 1395be1f23 Bug 1613013 part 3. Annotate TypeErrors and RangeErrors from WebIDL implementations with the method they come from. r=peterv
Please review the changes to Errors.msg very carefully.  I caught a number of
mistakes there in self-review (e.g. not renumbering replacement markers
correctly when I added {0} to the beginnings of strings), and my confidence
that I caught them all is only middling.

A few lines (MSG_USELESS_SETTIMEOUT, MSG_TYPEDARRAY_IS_DETACHED,
MSG_NOT_SUBMIT_BUTTON) were removed from Errors.msg either because they were
already unused or because they either were single-user constant strings or
became such in the new setup and we could just use the string version of
ThrowTypeError.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 21:22:32 +00:00
Boris Zbarsky 747a4d9f0a Bug 1613013 part 1. Annotate DOMExceptions from WebIDL implementations with the method they come from. r=peterv
This adds the name of the interface and method to the beginning of the exception
string when reporting the exception from Web IDL codegen, so it's clearer what
was called.

Some existing error messages are adjusted to not duplicate the information
about which method was called.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 21:16:10 +00:00
Andrea Marchesini 1edd5d228f Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 7 - nsIGlobalObject::IsSharedMemoryAllowed(), r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61277

--HG--
extra : moz-landing-system : lando
2020-02-06 13:50:11 +00:00
Andrea Marchesini 175bac3a30 Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 1, r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D61136

--HG--
extra : moz-landing-system : lando
2020-02-06 13:45:47 +00:00
Narcis Beleuzu d259fe38d8 Backed out 13 changesets (bug 1611855) for wpt failures on /audioworklet-postmessage-sharedarraybuffer.https.html . CLOSED TREE
Backed out changeset 2b661d588f96 (bug 1611855)
Backed out changeset 16094fc92bc9 (bug 1611855)
Backed out changeset 3f89bbcaff92 (bug 1611855)
Backed out changeset a906501b6d92 (bug 1611855)
Backed out changeset 54738b88425d (bug 1611855)
Backed out changeset d27de910a6c0 (bug 1611855)
Backed out changeset 261902f6336d (bug 1611855)
Backed out changeset 380d83b61e62 (bug 1611855)
Backed out changeset 39aac60ebf5e (bug 1611855)
Backed out changeset 5ea099787376 (bug 1611855)
Backed out changeset d0f58871f838 (bug 1611855)
Backed out changeset e1be102310a9 (bug 1611855)
Backed out changeset 633357835540 (bug 1611855)

--HG--
rename : dom/base/test/test_postMessages_workers.html => dom/base/test/test_postMessages.html
2020-02-06 12:31:36 +02:00
Paul Adenot 227468453f Bug 1569809 - Remove AudioNodeOptions from the ctor of AudioWorkletProcessor. r=baku
This was changed in https://github.com/WebAudio/web-audio-api/issues/2044

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

--HG--
extra : moz-landing-system : lando
2020-02-05 19:21:15 +00:00
Andrea Marchesini db7085724d Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 7 - nsIGlobalObject::IsSharedMemoryAllowed(), r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61277

--HG--
extra : moz-landing-system : lando
2020-02-05 22:09:44 +00:00
Andrea Marchesini 2106c7dcda Bug 1611855 - Worklet must be part of the same parent's agentCluster - part 1, r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D61136

--HG--
extra : moz-landing-system : lando
2020-02-05 22:07:04 +00:00
Paul Adenot c17dc41bb3 Bug 1161025 - Reject attempts to set non-null AudioBufferSourceNode.buffer more than once r=karlt,baku
as spec'd in https://github.com/WebAudio/web-audio-api/pull/743

This also removes the crashtests that don't apply anymore now that a buffer
cannot be set more than once, and changes another one so it still tests what
needs to be tested, but doesn't time-out.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 16:26:52 +00:00
Boris Zbarsky b88d5ac5a8 Bug 1612213 part 1. Switch most consumers of ThrowDOMException to the new methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61267

--HG--
extra : moz-landing-system : lando
2020-02-03 20:19:11 +00:00
Arthur Iakab ca111b6d55 Backed out changeset e3b626560b0d (bug 1161025) for causing crashtest failures on 966636.html.
CLOSED TREE
2020-02-03 13:21:08 +02:00
Paul Adenot 6ceb6a920f Bug 1161025 - reject attempts to set non-null AudioBufferSourceNode.buffer more than once r=karlt,baku
as spec'd in https://github.com/WebAudio/web-audio-api/pull/743

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

--HG--
extra : moz-landing-system : lando
2020-01-24 08:06:49 +00:00
Karl Tomlinson 4d907bb120 Bug 1606148 align ProcessBlocksOnPorts() Span parameter lengths with number of inputs and outputs r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D59190

--HG--
extra : moz-landing-system : lando
2020-01-15 14:44:39 +00:00
Edgar Chen 9e846bd48a bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60514

--HG--
extra : moz-landing-system : lando
2020-01-23 03:22:06 +00:00
Edgar Chen 8346d0956a Bug 1575425 - Part 4: Remove manually checking shareness in various APIs implmentation; r=bzbarsky
Now we support [AllowShared] in WebIDL, we don't need to manually check shareness
and throw exception if API don't accept SharedArrayBuffer, the binding will handle
it.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 13:51:04 +00:00
Andrea Marchesini a9cf3442be Bug 1607791 - Get rid of IDBMutableFile.getFile() - part 3 - Rename SameProcessDifferentThread to SameProcess, r=asuth,sfink
Differential Revision: https://phabricator.services.mozilla.com/D59142

--HG--
extra : moz-landing-system : lando
2020-01-15 12:02:17 +00:00
Mihai Alexandru Michis 4345a38d0d Backed out 9 changesets (bug 1607791, bug 1605566) for causing multiple wpt failures.
CLOSED TREE

Backed out changeset 39f34852842e (bug 1605566)
Backed out changeset 3427a92445c8 (bug 1605566)
Backed out changeset 36631ec96f1f (bug 1605566)
Backed out changeset 554b2bdce66c (bug 1605566)
Backed out changeset 37026beadbd8 (bug 1605566)
Backed out changeset f15835338319 (bug 1607791)
Backed out changeset 4c92f506cf62 (bug 1607791)
Backed out changeset 80707bcc8427 (bug 1607791)
Backed out changeset 75bc7533c899 (bug 1607791)
2020-01-15 13:45:33 +02:00
Andrea Marchesini 6d6aa4cc66 Bug 1607791 - Get rid of IDBMutableFile.getFile() - part 3 - Rename SameProcessDifferentThread to SameProcess, r=asuth,sfink
Differential Revision: https://phabricator.services.mozilla.com/D59142

--HG--
extra : moz-landing-system : lando
2020-01-15 09:59:16 +00:00
Karl Tomlinson e026e88f35 Bug 1558526 remove check for callable process() in registerProcessor() r=bzbarsky
Since https://github.com/WebAudio/web-audio-api/pull/2104

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

--HG--
extra : moz-landing-system : lando
2020-01-10 02:31:13 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Andrew Halberstadt 10e66445cb Bug 1604360 - Fix duplicate keys in the DEFAULT section of some manifests r=padenot,mak
Differential Revision: https://phabricator.services.mozilla.com/D57405

--HG--
extra : moz-landing-system : lando
2019-12-18 12:53:59 +00:00
Andreas Pehrson 1adcbfee14 Bug 1586370 - Use MozPromise for AudioContextOperations and NotifyWhenGraphStarted. r=padenot
This removes a level of indirection where the graph had to call back into
AudioContext. It also removes a dependency on the graph from GraphDriver, where
it can now just resolve a MozPromiseHolder instead.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 22:50:52 +00:00
Jeff Walden 62a130ba0a Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595

--HG--
extra : moz-landing-system : lando
2019-12-11 06:17:44 +00:00
Karl Tomlinson 1457fcc07d Bug 1599952 initialize AudioWorkletProcessor.port r=baku
Differential Revision: https://phabricator.services.mozilla.com/D53135

--HG--
extra : moz-landing-system : lando
2019-12-11 00:24:09 +00:00
Karl Tomlinson 2b63e70947 Bug 1587872 ensure one output channel when input is null r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D54675

--HG--
extra : moz-landing-system : lando
2019-11-26 16:53:37 +00:00
Karl Tomlinson 115ab06aac Bug 1587872 call process() on active AudioWorkletProcessor even with no active inputs r=padenot
and don't call process() on inactive AudioWorkletProcessor when inputs are null.

AudioNodeTrack::mIsActive, which determines when ProcessBlocksOnPorts() is
called, differs slightly from "actively processing" in the spec.
"An AudioScheduledSourceNode is actively processing if and only if it is
playing for at least part of the current rendering quantum" but
AudioNodeTrack::mIsActive is set even before the source node has started
playing.
Null input blocks provide a better indication of inputs that are not actively
processing.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 15:11:16 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Karl Tomlinson 9631373efa Bug 1599952 pass MessagePort to AudioWorkletGlobalScope r=baku
Differential Revision: https://phabricator.services.mozilla.com/D53134

--HG--
extra : moz-landing-system : lando
2019-12-03 00:37:28 +00:00
Karl Tomlinson aaf899d471 Bug 1599952 initialize AudioWorkletNode.port r=baku
Differential Revision: https://phabricator.services.mozilla.com/D53133

--HG--
extra : moz-landing-system : lando
2019-12-03 01:11:13 +00:00
Coroiu Cristina 679f321343 Backed out 5 changesets (bug 1599952) for failures at webaudio/the-audio-api/the-audioworklet-interface/audioworklet-messageport.https.html.ini
Backed out changeset 78adc22d922a (bug 1599952)
Backed out changeset b07c89cbc212 (bug 1599952)
Backed out changeset 7768d524d914 (bug 1599952)
Backed out changeset 7012927838fe (bug 1599952)
Backed out changeset dbf476d4eab6 (bug 1599952)
2019-12-03 02:33:23 +02:00
Karl Tomlinson 5d8f14ddef Bug 1599952 pass MessagePort to AudioWorkletGlobalScope r=baku
Differential Revision: https://phabricator.services.mozilla.com/D53134

--HG--
extra : moz-landing-system : lando
2019-12-02 11:30:39 +00:00
Karl Tomlinson 816db578f9 Bug 1599952 initialize AudioWorkletNode.port r=baku
Differential Revision: https://phabricator.services.mozilla.com/D53133

--HG--
extra : moz-landing-system : lando
2019-12-03 00:07:33 +00:00
Karl Tomlinson f85045e1eb Bug 1599356 correct math in AudioWorkletGlobalScope.currentTime r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D54676

--HG--
extra : moz-landing-system : lando
2019-11-26 16:42:10 +00:00
alwu 54b8cc7893 Bug 1593843 - part8 : move helper functions out from 'AutoplayPolicy'. r=bryce
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 11:00:13 +00:00
Noemi Erli 23395b20e2 Backed out 13 changesets (bug 1593843) for bustages in Logging.h CLOSED TREE
Backed out changeset b6e3fa6363bd (bug 1593843)
Backed out changeset 3db512256b0d (bug 1593843)
Backed out changeset f67081ea84ee (bug 1593843)
Backed out changeset ad02bb934459 (bug 1593843)
Backed out changeset 1a79176d3f7b (bug 1593843)
Backed out changeset 486c8562b816 (bug 1593843)
Backed out changeset 0d4313c436c5 (bug 1593843)
Backed out changeset 0c7e831d11bf (bug 1593843)
Backed out changeset 02ac8c39f46d (bug 1593843)
Backed out changeset 80895462dddf (bug 1593843)
Backed out changeset 4ab855869725 (bug 1593843)
Backed out changeset 5a24fc933cd6 (bug 1593843)
Backed out changeset f1c50ee60a78 (bug 1593843)
2019-11-23 05:18:17 +02:00
alwu f789ab1d90 Bug 1593843 - part8 : move helper functions out from 'AutoplayPolicy'. r=bryce
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 09:17:35 +00:00
Karl Tomlinson 2a599ccaf2 Bug 1572627 implement currentFrame, currentTime, and sampleRate members on AudioWorkletGlobalScope r=padenot
Depends on D54084

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

--HG--
extra : moz-landing-system : lando
2019-11-21 13:42:49 +00:00
Paul Adenot 6f573300ae Bug 1567949 - Expose the number of input channels of an AudioNode, on the audio rendering thread side. r=pehrsons
This is in line with the meaning of channelCount in the Web Audio API
specification.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 18:22:55 +00:00
Paul Adenot ad2a2521c9 Bug 1567949 - Don't use a global for the key in AudioDestinationNode.cpp, nullptr is fine. r=pehrsons
This was initialized to 0 anyways.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 18:22:51 +00:00
Paul Adenot c4aa2ac956 Bug 1567949 - Don't change the channel count when it's not necessary. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D50059

--HG--
extra : moz-landing-system : lando
2019-11-19 18:22:41 +00:00
Paul Adenot 8ee0c89da8 Bug 1567949 - Default to 2 channels when creating an AudioContext. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D50057

--HG--
extra : moz-landing-system : lando
2019-11-19 18:22:37 +00:00
Paul Adenot 131751c9fd Bug 1595823 - Fix the AudioContext's sample-rate if privacy.resistFingerprinting is enabled. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D53810

--HG--
extra : moz-landing-system : lando
2019-11-19 16:52:18 +00:00
Andreas Pehrson 99a2c25dbc Bug 1596433 - Mark MediaStreamTrackAudioSourceNode active when set up with a live input track. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D53025

--HG--
extra : moz-landing-system : lando
2019-11-15 15:25:05 +00:00
Karl Tomlinson 5f10fac9dd Bug 1565956 updated quoted AudioWorkletProcessor instantiation steps r=padenot
Depends on D53129

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

--HG--
extra : moz-landing-system : lando
2019-11-15 13:34:01 +00:00
Karl Tomlinson 98a669ee97 Bug 1565956 reorder AudioWorkletNode constructor parameter verification to align with spec r=padenot
and update quoted steps.

Depends on D53128

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

--HG--
extra : moz-landing-system : lando
2019-11-17 21:21:31 +00:00
Michael Froman 76c71c37b1 Bug 1568058 - pt 4 - Use batch decoding in MediaBufferDecoder. r=jya
- Add a pref for controlling the batch size when doing webaudio decoding
  on RDD.
- If batch size is greater than 1 and the decoder is capable of batch
  decoding, send raw sample batches to decoder.

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

--HG--
extra : moz-landing-system : lando
2019-11-14 16:06:54 +00:00
Michael Froman 39d8e90a04 Bug 1568058 - pt 3 - Remove MediaFormatReader from MediaBufferDecoder. r=jya
Stop using MediaFormatReader and use a demuxer and decoder directly in
MediaBufferDecoder.  This will allow us to do batch decoding calls for
webaudio that will improve performance by reducing the number of IPC
calls to the RDD process.

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

--HG--
extra : moz-landing-system : lando
2019-11-14 16:06:46 +00:00
Andreas Pehrson cdbd8a12f8 Bug 1172394 - Always mark a MediaStreamAudioSourceNode attached to a live track as active. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52049

--HG--
extra : moz-landing-system : lando
2019-11-14 14:33:44 +00:00
Andreas Pehrson 56c675fa60 Bug 1172394 - Ignore video tracks in autoplay checks in MediaStreamAudioSourceNode. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D52048

--HG--
extra : moz-landing-system : lando
2019-11-13 22:39:53 +00:00
Andreas Pehrson 7fac8df54d Bug 1172394 - Merge MediaStream and MediaDecoder track sources. r=padenot
This reworks how media element captureStream works by removing the differences
between MediaStream and MediaDecoder capture. MediaDecoder capture will be
refactored so that ownership of MediaStreamTracks lies with the media element
instead of the OutputStreamManager. The internal MediaDecoder parts happen in a
later patch.

The new API for capturing a MediaDecoder involves a boolean on/off toggle, the
output tracks the decoder pipes data to, and the principal that data is tagged
with. If capturing is on but there are no output tracks, playback will not
happen, to ensure that no data gets accidentally skipped in the output tracks
while captured.

This also changes the logic for setting up MediaElementTrackSources in
HTMLMediaElement so it's triggered by the WatchManager and thus run in tail
dispatched runnables.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:09 +00:00
Csoregi Natalia 6ba30843e8 Backed out 15 changesets (bug 1500049, bug 1172394, bug 1546756, bug 1302379) for failures on browser_disabledForMediaStreamVideos.js. CLOSED TREE
Backed out changeset 355f090421a6 (bug 1500049)
Backed out changeset 306341d0b586 (bug 1302379)
Backed out changeset 3ff0d72d23a2 (bug 1546756)
Backed out changeset a4f256e68cef (bug 1172394)
Backed out changeset d0aa43657e8c (bug 1172394)
Backed out changeset edff95b6f724 (bug 1172394)
Backed out changeset 94bd21d9b396 (bug 1172394)
Backed out changeset 7e7baa73e1ef (bug 1172394)
Backed out changeset c3bd415507e8 (bug 1172394)
Backed out changeset 1c45b135318d (bug 1172394)
Backed out changeset c57c41e8c39e (bug 1172394)
Backed out changeset a796541fe5ef (bug 1172394)
Backed out changeset 89ad0b553b0f (bug 1172394)
Backed out changeset 744fb77a5833 (bug 1172394)
Backed out changeset afb4b226ff04 (bug 1172394)
2019-11-14 00:32:51 +02:00
Andreas Pehrson 7e0c927800 Bug 1172394 - Always mark a MediaStreamAudioSourceNode attached to a live track as active. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52049

--HG--
extra : moz-landing-system : lando
2019-11-13 08:58:25 +00:00
Andreas Pehrson 2eaffe564d Bug 1172394 - Ignore video tracks in autoplay checks in MediaStreamAudioSourceNode. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D52048

--HG--
extra : moz-landing-system : lando
2019-11-13 08:58:21 +00:00
Andreas Pehrson 5b1bea60b3 Bug 1172394 - Merge MediaStream and MediaDecoder track sources. r=padenot
This reworks how media element captureStream works by removing the differences
between MediaStream and MediaDecoder capture. MediaDecoder capture will be
refactored so that ownership of MediaStreamTracks lies with the media element
instead of the OutputStreamManager. The internal MediaDecoder parts happen in a
later patch.

The new API for capturing a MediaDecoder involves a boolean on/off toggle, the
output tracks the decoder pipes data to, and the principal that data is tagged
with. If capturing is on but there are no output tracks, playback will not
happen, to ensure that no data gets accidentally skipped in the output tracks
while captured.

This also changes the logic for setting up MediaElementTrackSources in
HTMLMediaElement so it's triggered by the WatchManager and thus run in tail
dispatched runnables.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:55:29 +00:00
Paul Adenot f7f11a5637 Bug 1595819 - Limit the audio output channel count maximum reported value if RFP is enabled. r=tjr
Stereo output is what the immense majority of mobile and desktop users have.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 12:24:11 +00:00
Andreas Pehrson 67b601ce95 Bug 1594136 - Check for ended track in MediaStreamTrackAudioSourceNode. r=padenot
Depends on D52521

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

--HG--
extra : moz-landing-system : lando
2019-11-13 13:13:48 +00:00
Karl Tomlinson c8963484d2 Bug 1591254 set WorkletNodeEngine input and output span lengths appropriately for zero inputs and outputs r=padenot
AudioNodeTrack::ProcessInput() uses ProcessBlock() when input and output
counts are <= 1.

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

--HG--
extra : moz-landing-system : lando
2019-10-25 12:57:46 +00:00
Geoff Brown de6c41dd8a Bug 1585119 - Re-enable yet more mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
This completes my review of skipped Android tests.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 20:10:27 +00:00
Paul Adenot 772872cd0e Bug 1587244 - Allow NaN in IIR filter output. r=karlt
It's perfectly possible to create unstable filter, that can easily go to
infinity, so this assert is not valid.

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

--HG--
extra : moz-landing-system : lando
2019-10-20 21:52:31 +00:00
Paul Adenot 415ad2bbdc Bug 1499597 - Don't clamp the Q of a BiquadFilterNode when in low-pass and high-pass mode. r=karlt
Bug 1265395 implemented the new filter equations from
a6842f2f73,
but missed removing the clamping.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 01:52:39 +00:00
Razvan Maries bbfcab1552 Backed out changeset 239ff6e79980 (bug 1572884) for causing perma fails on audionode-channel-rules.html. CLOSED TREE 2019-10-18 12:41:02 +03:00
Alex Chronopoulos 3131adff9f Bug 1572884 - Upmix mono webaudio channels to stereo when the output configuration is 3 and 5 channels. r=padenot
WebAudio upmix layout is defined in the spec for the channel configurations mono, stereo, quad and 5.1. Layouts with 3 and 5 channels are not defined yet. For those undefined layouts firefox provided upmix to a single channel (left). This has been updated to upmix to the two stereo channels (left, right).

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

--HG--
extra : moz-landing-system : lando
2019-10-18 07:46:07 +00:00
Andreas Pehrson 1bdb34c6ec Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug
This renames the following (in alphabetical order, non-exhaustive):

AudioCaptureStream -> AudioCaptureTrack
AudioNodeStream -> AudioNodeTrack
AudioNodeExternalInputStream -> AudioNodeExternalInputTrack
DirectMediaStreamTrackListener -> DirectMediaTrackListener
MediaStream -> MediaTrack
  - Note that there's also dom::MediaTrack. Namespaces differentiate them.
MediaStreamGraph -> MediaTrackGraph
MediaStreamTrackListener -> MediaTrackListener
MSG -> MTG (in comments)
ProcessedMediaStream -> ProcessedMediaTrack
SharedDummyStream -> SharedDummyTrack
SourceMediaStream -> SourceMediaTrack
StreamTime -> TrackTime
TrackUnionStream -> ForwardedInputTrack
  - Because this no longer takes a union of anything, but only a single track
    as input.

Other minor classes, members and comments have been updated to reflect these
name changes.

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

--HG--
rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp
rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h
rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp
rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h
rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp
rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h
rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h
rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp
rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h
rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp
rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h
rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp
rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h
extra : moz-landing-system : lando
2019-10-02 10:23:02 +00:00
Andreas Pehrson 0ef0cab288 Bug 1454998 - Remove AudioNodeStream::SampleRate(). r=karlt
AudioNodeStream is a subclass of MediaStream, which now exposes a
public const mSampleRate member.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 10:22:55 +00:00
Andreas Pehrson 8028758d0e Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt
This change mainly removes the `mTracks` member from MediaStream and moves all
associated members up a level, so that a MediaStream in practice represents a
single track.

Classes will be renamed in a future patch to reflect this.

Other changes include:

The new `mEnded` member of MediaStream changes meaning to only become true when
all data in the stream has been processed. It stems from
StreamTracks::Track::mEnded which used to become true as soon as the last bit of
data had been added to a track, and there could still be data in the track that
would get processed in future iterations. We are moving towards not having any
future data in tracks, which is why this change is ok to make -- keeping the old
behavior will soon not make sense.

TrackUnionStream is changed to no longer take a list of streams as input and
forward the union of their tracks to itself. Instead it's limited to having one
track as input at a time.

The autofinishing functionality that TrackUnionStream had before has been
transformed into an autoending functionality to allow it to defer ending until
its been told that it's ok to end through the control API. This lets a single
TrackUnionStream span the lifetime of multiple inputs, which will be useful for
making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
a few potential use cases.

AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
however only used with data if the EXTERNAL_OUTPUT flag is enabled.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 10:22:53 +00:00
Andreas Pehrson a639f42a0e Bug 1454998 - Remove track blocking from MediaInputPort. r=karlt
This functionality is not used since we moved to only having a single track per
MediaStream (bug 1493613).

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

--HG--
extra : moz-landing-system : lando
2019-10-02 10:22:49 +00:00
Gurzau Raul 40dae37e00 Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE.
Backed out changeset 80417bdfa721 (bug 1454998)
Backed out changeset 8ff03f2f4ca2 (bug 1454998)
Backed out changeset ae6056b748d1 (bug 1454998)
Backed out changeset ab721cb2066b (bug 1454998)
Backed out changeset d0e8d413cd1c (bug 1454998)
Backed out changeset 3ce4dc7e9ae2 (bug 1454998)
Backed out changeset 6105a4176729 (bug 1454998)

--HG--
rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp
rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h
rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp
rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h
rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h
rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp
rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h
rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp
rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h
rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp
rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h
rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp
rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Andreas Pehrson 36d89d91c8 Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug
This renames the following (in alphabetical order, non-exhaustive):

AudioCaptureStream -> AudioCaptureTrack
AudioNodeStream -> AudioNodeTrack
AudioNodeExternalInputStream -> AudioNodeExternalInputTrack
DirectMediaStreamTrackListener -> DirectMediaTrackListener
MediaStream -> MediaTrack
  - Note that there's also dom::MediaTrack. Namespaces differentiate them.
MediaStreamGraph -> MediaTrackGraph
MediaStreamTrackListener -> MediaTrackListener
MSG -> MTG (in comments)
ProcessedMediaStream -> ProcessedMediaTrack
SharedDummyStream -> SharedDummyTrack
SourceMediaStream -> SourceMediaTrack
StreamTime -> TrackTime
TrackUnionStream -> ForwardedInputTrack
  - Because this no longer takes a union of anything, but only a single track
    as input.

Other minor classes, members and comments have been updated to reflect these
name changes.

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

--HG--
rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp
rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h
rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp
rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h
rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp
rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h
rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h
rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp
rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h
rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp
rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h
rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp
rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h
extra : moz-landing-system : lando
2019-10-02 08:18:16 +00:00
Andreas Pehrson 05d6bfa0c1 Bug 1454998 - Remove AudioNodeStream::SampleRate(). r=karlt
AudioNodeStream is a subclass of MediaStream, which now exposes a
public const mSampleRate member.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 08:17:59 +00:00
Andreas Pehrson 1bc37d8ea4 Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt
This change mainly removes the `mTracks` member from MediaStream and moves all
associated members up a level, so that a MediaStream in practice represents a
single track.

Classes will be renamed in a future patch to reflect this.

Other changes include:

The new `mEnded` member of MediaStream changes meaning to only become true when
all data in the stream has been processed. It stems from
StreamTracks::Track::mEnded which used to become true as soon as the last bit of
data had been added to a track, and there could still be data in the track that
would get processed in future iterations. We are moving towards not having any
future data in tracks, which is why this change is ok to make -- keeping the old
behavior will soon not make sense.

TrackUnionStream is changed to no longer take a list of streams as input and
forward the union of their tracks to itself. Instead it's limited to having one
track as input at a time.

The autofinishing functionality that TrackUnionStream had before has been
transformed into an autoending functionality to allow it to defer ending until
its been told that it's ok to end through the control API. This lets a single
TrackUnionStream span the lifetime of multiple inputs, which will be useful for
making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
a few potential use cases.

AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
however only used with data if the EXTERNAL_OUTPUT flag is enabled.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 08:17:51 +00:00
Andreas Pehrson 778a50400e Bug 1454998 - Remove track blocking from MediaInputPort. r=karlt
This functionality is not used since we moved to only having a single track per
MediaStream (bug 1493613).

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

--HG--
extra : moz-landing-system : lando
2019-10-02 08:12:28 +00:00
Paul Adenot 7f8e465155 Bug 1583512 - Remove remaining references to doppler shift from AudioBufferSourceNode. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D46934

--HG--
extra : moz-landing-system : lando
2019-09-24 23:52:21 +00:00
alwu e3fa191af4 Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 21:18:07 +00:00
Alastor Wu 330adf4d9e Bug 1580659 - part5 : stop audio capturing explicitly. r=chunmin,karlt
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.

We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:39 +00:00
alwu d158e0c4b2 Bug 1580659 - part4 : pulling the intial update after starting AudioChannelAgent. r=chunmin
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.

In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 21:17:59 +00:00
Alastor Wu 5d31bee21f Bug 1580659 - part3 : call 'WindowAudioCaptureChanged()' explicitly. r=chunmin,karlt
Previously `AudioChannelService` called `WindowAudioCaptureChanged()` implicitly whenever we added the agent to the service [1], which made the audio capturing callback happen before finishing registration.

There are two drawbacks,
(1) it's hard to be aware of that the audio capturing callback would be called before finishing `AudioChannelAgent::NotifyStartedPlaying()` [2], which causes unclear call flow.

(2) If someone checks `AudioChannelAgent::IsPlayingStarted()` [3] inside audio capturing callback, then we would find that the `mIsRegToService` is false even if we have registered the agent to `AudioChannelService` because `mIsRegToService` is updated in the last line in the `AudioChannelAgent::NotifyStartedPlaying()`, but the audio capturing callback could be executed before that.

[1] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelService.cpp#723
[2] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#144
[3] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#285

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

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:43 +00:00
alwu ba0d878e47 Bug 1580659 - part1 : use AudioChannelAgent directly. r=chunmin
`nsIAudioChannelAgent` was created a common interface for a usage of in both js and C++ before, now we have no any JS code would use `nsIAudioChannelAgent`, it's only used in C++ code.

Therefore, in a coming refactoring (bug1580662), we will remove `nsIAudioChannelAgent` and use `AudioChannelAgent` as the only interface. Here we can make these classes start to reference `AudioChannelAgent`, instead of `nsIAudioChannelAgent`.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:29 +00:00
shindli bfa22f415b Backed out 9 changesets (bug 1580659) for causing linting failure in /builds/worker/checkouts/gecko/dom/plugins/base/nsNPAPIPluginInstance.cpp CLOSED TREE
Backed out changeset b8c46aaec410 (bug 1580659)
Backed out changeset fd31977767d5 (bug 1580659)
Backed out changeset 8b9f61694270 (bug 1580659)
Backed out changeset 276827f54c71 (bug 1580659)
Backed out changeset ecb2bf9fb452 (bug 1580659)
Backed out changeset b712f15af619 (bug 1580659)
Backed out changeset c25bfc8b31b1 (bug 1580659)
Backed out changeset 20cfcd96a40e (bug 1580659)
Backed out changeset e92ff4ac7f43 (bug 1580659)
2019-09-24 09:50:42 +03:00
Alastor Wu b3e82e167d Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 00:03:14 +00:00
Alastor Wu eaf6b8ef6e Bug 1580659 - part5 : stop audio capturing explicitly. r=chunmin,karlt
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.

We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.

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

--HG--
extra : moz-landing-system : lando
2019-09-21 02:21:58 +00:00
Alastor Wu 17d1e17425 Bug 1580659 - part4 : pulling the intial update after starting AudioChannelAgent. r=chunmin
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.

In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 17:44:21 +00:00
Alastor Wu f74da16941 Bug 1580659 - part3 : call 'WindowAudioCaptureChanged()' explicitly. r=chunmin,karlt
Previously `AudioChannelService` called `WindowAudioCaptureChanged()` implicitly whenever we added the agent to the service [1], which made the audio capturing callback happen before finishing registration.

There are two drawbacks,
(1) it's hard to be aware of that the audio capturing callback would be called before finishing `AudioChannelAgent::NotifyStartedPlaying()` [2], which causes unclear call flow.

(2) If someone checks `AudioChannelAgent::IsPlayingStarted()` [3] inside audio capturing callback, then we would find that the `mIsRegToService` is false even if we have registered the agent to `AudioChannelService` because `mIsRegToService` is updated in the last line in the `AudioChannelAgent::NotifyStartedPlaying()`, but the audio capturing callback could be executed before that.

[1] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelService.cpp#723
[2] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#144
[3] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#285

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

--HG--
extra : moz-landing-system : lando
2019-09-18 21:59:32 +00:00
alwu 8c34182874 Bug 1580659 - part1 : use AudioChannelAgent directly. r=chunmin
`nsIAudioChannelAgent` was created a common interface for a usage of in both js and C++ before, now we have no any JS code would use `nsIAudioChannelAgent`, it's only used in C++ code.

Therefore, in a coming refactoring (bug1580662), we will remove `nsIAudioChannelAgent` and use `AudioChannelAgent` as the only interface. Here we can make these classes start to reference `AudioChannelAgent`, instead of `nsIAudioChannelAgent`.

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

--HG--
extra : moz-landing-system : lando
2019-09-16 19:44:37 +00:00
Boris Zbarsky 417c6749c3 Bug 1581276. Require a message arg to ThrowDOMException. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D46250

--HG--
extra : moz-landing-system : lando
2019-09-20 02:17:01 +00:00
Boris Zbarsky dbed44ddf4 Bug 1581315 part 2. Fix incorrect behavior of PannerNode::SetRolloffFactor. r=karlt
Our implementation modified the state, in addition to throwing the exception.
And the tests not only didn't test for this, but wouldn't have reached that
code anyway, due to the harness giving up as soon as anything failed.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 22:15:54 +00:00
Boris Zbarsky e26682d684 Bug 1581173 part 1. Add a way to more easily throw TypeErrors and RangeErrors with custom message strings via ErrorResult. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45932

--HG--
extra : moz-landing-system : lando
2019-09-20 02:19:18 +00:00
Nathan Froyd 970d3a1d9b Bug 1582812 - fix some dom/media/ header cargo-culting; r=mccr8
Both of these files obviously use things from the newly-included
headers, but they were not including them prior to this point.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 20:19:32 +00:00
Boris Zbarsky 1128b8dee8 Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D45394

--HG--
extra : moz-landing-system : lando
2019-09-12 11:01:17 +00:00
Geoff Brown 56ca134785 Bug 1579272 - Cleanup obviously fennec-centric test annotations; r=bc
Remove test manifest annotations that specifically target fennec,
or likely target the android 4.3 emulator.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 16:51:10 +00:00
Karl Tomlinson 6b19f33045 Bug 1578623 create worklet global with JSPrincipals having reference to WorkletImpl r=baku,bzbarsky
This will permit implementation of JSPrincipals::write().

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

--HG--
rename : dom/worklet/WorkletPrincipal.cpp => dom/worklet/WorkletPrincipals.cpp
rename : dom/worklet/WorkletPrincipal.h => dom/worklet/WorkletPrincipals.h
extra : moz-landing-system : lando
2019-09-06 02:01:44 +00:00
Andreas Pehrson 12adbb075f Bug 1577184 - Guard against a shutting down AudioContext in MediaElementAudioSourceNode. r=karlt
Depends on D44486

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

--HG--
extra : moz-landing-system : lando
2019-09-03 23:33:54 +00:00
Eric Rahm 74b57d4f28 Bug 1577932 - Remove using namespace std from dom/media r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D44289

--HG--
extra : moz-landing-system : lando
2019-09-02 12:40:00 +00:00
Paul Adenot b3f91d148e Bug 1576656 - Only allow setting an AudioBuffer as convolution impulse if it has the same sample-rate than the associated AudioContext. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D43477

--HG--
extra : moz-landing-system : lando
2019-09-02 13:06:29 +00:00
Paul Adenot f766c2a6d2 Bug 1572878 - Compute the reverb on the main thread. r=karlt
This is necessary to keep the invariant that once the setter returns, the reverb
is ready to process.

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

--HG--
extra : moz-landing-system : lando
2019-09-02 12:58:51 +00:00
Paul Adenot d8326c0e70 Bug 1572878 - Add a new method on AudioNodeStream, to be able to set a Reverb object on a ConvolverNode, from the main thread, using a ControlMessage. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D42900

--HG--
extra : moz-landing-system : lando
2019-09-02 12:58:40 +00:00
Mark Banner 351d147e2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44149

--HG--
extra : moz-landing-system : lando
2019-09-02 11:22:27 +00:00
Sylvestre Ledru 759eed09b4 Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in dom/media r=jya
Depends on D43776

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

--HG--
extra : moz-landing-system : lando
2019-08-30 05:44:13 +00:00
Andrew McCreight 62bd52a17f Bug 1575343, part 1 - Avoid a gratuitous string copy by calling the nsAString overload of GetCallingLocation. r=smaug
The nsAString overload of GetCallingLocation directly converts the
original source file name string into an nsAString. A number of
callers that want the source file name in an nsAString are calling the
nsACString overload of GetCallingLocation, then calling
NS_ConvertUTF8toUTF16. This results in an extra intermediate copy of
the original string data.

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

--HG--
extra : moz-landing-system : lando
2019-08-20 22:53:49 +00:00
Dan Minor e6817b0e4d Bug 1573541 - Fix assertion failure in PannerNode.h; r=karlt
This removes the call to SetThreeDPointParameter which is no longer necessary
now that we're using AudioParams for position and orientation. Doing the
conversion can cause an assertion failure when the AudioParams have a scheduled
future value.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 21:17:36 +00:00
Jared Wein 90c83c7843 Bug 1571567 - Fix no-fallthrough errors in /dom. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40874

--HG--
extra : moz-landing-system : lando
2019-08-08 15:18:45 +00:00
Bogdan Tara 844afcfb06 Backed out 10 changesets (bug 1571567) complementary backout after es lint failure on the patch CLOSED TREE
Backed out changeset ce83fa75ae32 (bug 1571567)
Backed out changeset 7aa97ba7cce9 (bug 1571567)
Backed out changeset 777d79076e99 (bug 1571567)
Backed out changeset fbdf6b75a484 (bug 1571567)
Backed out changeset e2ed4620f232 (bug 1571567)
Backed out changeset 2c67015f12c6 (bug 1571567)
Backed out changeset 7ec086bb5bd5 (bug 1571567)
Backed out changeset 42df735c8556 (bug 1571567)
Backed out changeset 7d5fc57b2809 (bug 1571567)
Backed out changeset 606bafb8211c (bug 1571567)
2019-08-08 18:13:54 +03:00
Jared Wein a0b4a0401b Bug 1571567 - Fix no-fallthrough errors in /dom. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40874

--HG--
extra : moz-landing-system : lando
2019-08-08 01:38:50 +00:00
Andreas Pehrson f95bb47fbc Bug 1570684 - Don't access MediaStreamTrack::mStream after the track has ended. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D40397

--HG--
extra : moz-landing-system : lando
2019-08-02 12:02:05 +00:00
Andreas Pehrson 4b3fa9c67e Bug 1493613 - Move MediaStream control from DOMMediaStream to MediaStreamTrack. r=padenot
This is inherently large, because modifying these bits of DOMMediaStream and
MediaStreamTrack affects all consumers and producers of all DOMMediaStreams and
MediaStreamTracks.

Things are generally much simpler now.

Producers of tracks now create a MediaStream in the graph, add it to a
MediaStreamTrackSource subclass that takes ownership of it, and add the source
to a MediaStreamTrack. Should the producer need a DOMMediaStream it is now much
simpler to create as the only thing needed is the current window. The stream is
a rather simple wrapper around an array of MediaStreamTracks.

HTMLMediaElement is still not as straight forward as other consumers since it
consumes the DOMMediaStream directly, as opposed to a set of tracks.
The new MediaStreamRenderer helper class helps bridge the gap between this fact
and the new track-based MediaStreamGraph interface, as it needs to juggle
registering multiple audio tracks for audio output. This hooks into existing
HTMLMediaElement logic and brings a welcome simplification to all the glue
previously needed there.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 07:58:17 +00:00
Paul Adenot 834e954d9f Bug 1570015 - Fix test_waveShaperGain.html by placing the <pre> tag before the script. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D39893

--HG--
extra : moz-landing-system : lando
2019-07-30 16:41:15 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Karl Tomlinson 35faeb0880 bug 1558123 call AudioWorkletProcessor.process() r=padenot,bzbarsky
https://heycam.github.io/webidl/#call-a-user-objects-operation may be a
simpler option here, but there are some small optimizations possible with
using JS::Call() directly:
JS::ExposeObjectToActiveJS() is not necessary because parameters are
PersistentRooted and so won't be gray.  MaybeWrapObjectValue() is not
necessary because parameters are already in the appropriate compartment.

See also https://github.com/WebAudio/web-audio-api/issues/1967 and
https://github.com/WebAudio/web-audio-api/issues/1933

Microtask support is tracked in
https://bugzilla.mozilla.org/show_bug.cgi?id=1566312

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

--HG--
extra : moz-landing-system : lando
2019-07-17 08:20:45 +00:00
Karl Tomlinson 87d828f979 Bug 1558123 copy audio samples to/from JS arrays r=padenot
Direct use of aInput buffers for ArrayBuffer elements is not possible in
general.  aInput buffers are const because they may be used elsewhere but
ArrayBuffer elements may be modified by script.  If necessary, it would be
possible to later add a mechanism to mix inputs directly into the ArrayBuffer,
but often no mixing is required.

Direct use of output ArrayBuffer elements would require DetachArrayBuffer to
ensure the elements are not modified by script, but that would require
creation of a new ArrayBuffer JS object on each call.

https://github.com/WebAudio/web-audio-api/issues/1932 tracks specification of
making output data available for reading (for downstream node input).

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

--HG--
extra : moz-landing-system : lando
2019-07-17 06:36:43 +00:00
Karl Tomlinson 44690447a6 bug 1558123 create JSObjects for inputs/outputs AudioWorkletProcessor.process() parameters r=padenot,bzbarsky
Objects are retained for re-use so as to reduce garbage generation and other
performance benefits.  This is currently unspecified.

https://github.com/WebAudio/web-audio-api/issues/1934
https://github.com/WebAudio/web-audio-api/issues/1933

https://github.com/WebAudio/web-audio-api/issues/1935 tracks specification of
zero-channels of input when inputs are not actively processing.

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

--HG--
extra : moz-landing-system : lando
2019-07-16 20:27:39 +00:00
Karl Tomlinson 46486e57c9 bug 1558123 set AudioWorkletNode output channel counts r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D34835

--HG--
extra : moz-landing-system : lando
2019-07-16 04:40:33 +00:00
Karl Tomlinson 442e4282a1 Bug 1558123 Pass spans to ProcessBlocksOnPorts to facilitate forwarding from ProcessBlock() r=padenot
It is easier to make a span than an nsTArray.

This also clarifies that the output array lengths are not modified.

Depends on D34833

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

--HG--
extra : moz-landing-system : lando
2019-06-14 16:06:22 +00:00
Karl Tomlinson 2f7457ad55 Bug 1542931 Construct AudioWorkletProcessor for each AudioWorkletNode r=padenot,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34482

--HG--
extra : moz-landing-system : lando
2019-07-17 18:58:57 +00:00
Karl Tomlinson ff940f743d Bug 1542931 add a mechanism to notify engine on graph thread of forced shutdown r=padenot
This will be used to release the AudioWorkletProcessor on the correct thread.

Depends on D34480

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

--HG--
extra : moz-landing-system : lando
2019-06-14 15:04:48 +00:00
Karl Tomlinson 64d6bd309f Bug 1542931 add WorkletNodeEngine and send control message for processor construction r=padenot
Depends on D34479

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

--HG--
extra : moz-landing-system : lando
2019-06-14 15:04:12 +00:00
Karl Tomlinson 4891262c8d Bug 1542931 serialize AudioWorkletNodeOptions r=padenot
Depends on D34478

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

--HG--
extra : moz-landing-system : lando
2019-06-14 13:23:57 +00:00
Karl Tomlinson 0d0c740557 Bug 1542931 Add AudioWorkletProcessorConstructor r=bzbarsky
https://github.com/WebAudio/web-audio-api/issues/1839

Depends on D34476

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

--HG--
extra : moz-landing-system : lando
2019-06-11 15:45:45 +00:00
Karl Tomlinson f94d893bf3 Bug 1542931 move forward declarations to appropriate namespaces r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D34476

--HG--
extra : moz-landing-system : lando
2019-06-14 13:23:29 +00:00
Karl Tomlinson 3a7eaf6860 Bug 1558123 don't set outputs array length in ProcessBlocksOnPorts r=padenot
This is set in the AudioNodeStream constructor and does not change.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 15:40:00 +00:00
Paul Adenot c74b95c375 Bug 1350973 - Implement new attributes MediaStreamAudioSourceNode.mediaStream and MediaElementAudioSourceNode.mediaElement. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37283

--HG--
extra : moz-landing-system : lando
2019-07-11 20:09:58 +00:00
Paul Adenot 6d8671ebb8 Bug 1564422 - Change `outputLatency` and `getOutputTimestamp` when `resistFingerPrinting` is enabled. r=tjr
When Firefox is configured to resist fingerprinting, the latency figure returned
is the most commonly found on a particular OS.

For Android, I got data from [0], roughly copy/pasted the table into a file and
did:

```
cat file | cut -d $'\t' -f4 | grep "^[[:digit:]]" | cut -d ' ' -f 1 | sort -h
| uniq -c | sort -h
```

which indicated that 40ms was a good number for round trip latency (input to
output). Since this is for output latency only and the audio path
is roughly symmetrical in terms of duration, we report 20ms.

For OSX, 512 is always used with the default hardware in Firefox, with this
patch, it's always 512 regardless of the setup.

On Linux/Pulse, we use 25ms [1] always, and this is adjusted by PulseAudio. This
makes it always return 25ms.

On Windows, there is a wide variety of configurations, but it's common to be in
the ballpark of 80ms output (this is very empirical, by testing a bunch of
hardware over the years).

For other OSes, we use 2048 frames (adjusted to the sample-rate).

[0]: https://superpowered.com/latency
[1]: https://searchfox.org/mozilla-central/source/media/libcubeb/src/cubeb_pulse.c#725

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

--HG--
extra : moz-landing-system : lando
2019-07-12 11:27:25 +00:00
Paul Adenot 553f80fde6 Bug 1324545 - Implement AudioContext getOutputTimestamp(). r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37281

--HG--
extra : moz-landing-system : lando
2019-07-12 11:27:25 +00:00
Paul Adenot 8c692f2f23 Bug 1324552 - Implement AudioContext baseLatency and outputLatency attributes. r=pehrsons,baku
Differential Revision: https://phabricator.services.mozilla.com/D37280

--HG--
extra : moz-landing-system : lando
2019-07-12 11:28:03 +00:00
shindli 883c6619a6 Backed out 3 changesets (bug 1324552, bug 1324545, bug 1350973) for causing perma mda leakcheck failures CLOSED TREE
Backed out changeset db14e59c7e6e (bug 1324545)
Backed out changeset 088e13476d39 (bug 1324552)
Backed out changeset e79a64fc49e7 (bug 1350973)
2019-07-11 18:55:03 +03:00
Paul Adenot e66a2c4316 Bug 1324545 - Implement AudioContext getOutputTimestamp(). r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37281

--HG--
extra : moz-landing-system : lando
2019-07-11 13:34:15 +00:00
Paul Adenot 4c99611f32 Bug 1324552 - Implement AudioContext baseLatency and outputLatency attributes. r=pehrsons,baku
Differential Revision: https://phabricator.services.mozilla.com/D37280

--HG--
extra : moz-landing-system : lando
2019-07-11 13:30:07 +00:00
Paul Adenot 03e7bf883c Bug 1350973 - Implement new attributes MediaStreamAudioSourceNode.mediaStream and MediaElementAudioSourceNode.mediaElement. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37283

--HG--
extra : moz-landing-system : lando
2019-07-11 13:18:51 +00:00
Paul Adenot 7786a2a4d6 Bug 1456263 - Throw appropriate errors in the ChannelMergerNode ctor. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D37433

--HG--
extra : moz-landing-system : lando
2019-07-10 01:31:21 +00:00
Andreas Pehrson 378c51c9f8 Bug 1177793 - Pass principal instead of forcing black when capturing cross-origin media resource. r=jya,jib
Differential Revision: https://phabricator.services.mozilla.com/D36896

--HG--
extra : moz-landing-system : lando
2019-07-08 21:15:10 +00:00
Emilio Cobos Álvarez 1a39c45ae2 Bug 1563728 - Add a return statement to BiquadFilterNode::GetFrequencyResponse to fix bustage. rs=padenot
CLOSED TREE
2019-07-06 10:45:56 +02:00
Paul Adenot 3ffaf1696e Bug 1563728 - Throw when the three parameters of BiquadFilterNode.getFrequencyResponse aren't of the same size. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D37056

--HG--
extra : moz-landing-system : lando
2019-07-05 20:34:47 +00:00
Paul Adenot f5a83e7113 Bug 893020 - Make AudioParam.value getter return a value based on the AudioContext.currentTime. r=karlt
AudioWG resolution: https://github.com/WebAudio/web-audio-api/issues/1788#issuecomment-468345987

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

--HG--
extra : moz-landing-system : lando
2019-05-14 05:17:00 +00:00
Victor Porof 0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Paul Adenot 1877aafe44 Bug 1563193 - Remove "media.webaudio.audiocontextoptions-samplerate.enabled". r=achronop
Differential Revision: https://phabricator.services.mozilla.com/D36733

--HG--
extra : moz-landing-system : lando
2019-07-03 12:12:15 +00:00
Nicholas Nethercote d839ef58db Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused:
- media.autoplay.allow-muted pref
- media.autoplay.blackList-override-default

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

--HG--
extra : rebase_source : 0570540496302b3efedadf4d5115ee5422d5c279
2019-06-28 14:09:05 +10:00
Paul Adenot 7bcb7bb6a6 Bug 1553215 - Implement the correct behaviour for MediaStreamAudioSource. r=karlt,pehrsons
It should pick and lock to the right track, regardless of if it's still in the
MediaStream.

The test fix is because we don't expose tracks until the HTMLMediaElement has
loaded loading I think.

This alignes with a couple spec changes:
- https://github.com/WebAudio/web-audio-api/issues/264
- https://github.com/WebAudio/web-audio-api/pull/1829/files

and also throws when no valid track are found in the MediaStream, either because
it's all video tracks or because it has no tracks.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 23:06:33 +00:00