Commit Graph

109 Commits

Author SHA1 Message Date
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
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
Alex Chronopoulos
75d6afdf3b Bug 1545079 - Execute revive logic in operation thread. r=padenot
`IsStarted` may not be updated at the time `Revive()` method is executed since the update of the flag happens on the async operation. This will be the case if `Revive` is executed right after `Start`. When that happens the revive method asserts that the stream is started.

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

--HG--
extra : moz-landing-system : lando
2019-05-14 16:00:22 +00:00
Sylvestre Ledru
a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Alex Chronopoulos
5fc615519b Bug 1541290 - Restart driver properly on revive method. r=padenot
Revive method of AudioCallbackDriver was wrong because it was re-initializing an already initialized driver. That was hitting an assert. Instead of that it should stop the drained stream and start it again. Also, mStarted member should be reset properly on the stop method.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 08:34:22 +00:00
Paul Adenot
b1c0df1177 Bug 1531833 - Add a way to tell the graph driver that the audio input is voice. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D21737

--HG--
extra : moz-landing-system : lando
2019-04-16 15:42:38 +00:00
Oana Pop Rus
212a653d81 Backed out 6 changesets (bug 1531833) for geckoview failures on PermissionDelegateTest.media CLOSED TREE
Backed out changeset f90ad6bb8ebd (bug 1531833)
Backed out changeset 465570a54b46 (bug 1531833)
Backed out changeset e725253ee976 (bug 1531833)
Backed out changeset 74ad8e7a722b (bug 1531833)
Backed out changeset b1268e5f7023 (bug 1531833)
Backed out changeset e3ec78b2db1f (bug 1531833)

--HG--
extra : amend_source : 81aa19c352e72cac2369e014d19ec5a896538b21
2019-04-11 21:16:55 +03:00
Paul Adenot
7806f50930 Bug 1531833 - Add a way to tell the graph driver that the audio input is voice. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D21737

--HG--
extra : moz-landing-system : lando
2019-04-11 09:19:34 +00:00
Paul Adenot
653464a0cf Bug 1375562 - Allow suspending, resuming and closing an AudioContext without triggering the statechange event and dealing with Promises. r=karlt
This allows suspending and resuming the context from the debugger without having
observable side-effects.

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

--HG--
extra : moz-landing-system : lando
2019-04-02 11:10:02 +00:00
Andreas Pehrson
e0b244ec9e Bug 1506093 - Remove StreamTracksStartTimeStamp. r=padenot
DecodedStream has been basing video timestamps on something called
StreamTracksStartTimeStamp in MediaStreams, which call through all the way
down to the GraphDriver.

This removes the entire timestamp mechanism, except for a bit of legit
usage internally in the SystemClockDriver. Video timestamps are instead
based on the audio clock through GetPosition(), the same way the VideoSink
operates.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 11:41:46 +00:00
Andreas Pehrson
acf9d0ab88 Bug 1473469 - Make MediaStreamGraph run on a single thread with AudioWorklets enabled. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D20828

--HG--
extra : moz-landing-system : lando
2019-03-06 20:12:25 +00:00
Csoregi Natalia
9d67bf069c Backed out changeset 45c838c4137d (bug 1473469) for various dom/worklet/ failures. CLOSED TREE 2019-03-01 19:39:32 +02:00
Andreas Pehrson
1b78f72fe7 Bug 1473469 - Make MediaStreamGraph run on a single thread with AudioWorklets enabled. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D20828

--HG--
extra : moz-landing-system : lando
2019-03-01 10:11:16 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru
804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

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

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Karl Tomlinson
f85e9dfabc Bug 1503132 add wait/wake-up support to OfflineAudioContext r=padenot
Depends on D10162

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

--HG--
extra : moz-landing-system : lando
2018-10-30 09:48:08 +00:00
Karl Tomlinson
40589e9304 Bug 1503132 remove unnecessary SystemClockDriver::mWaitState r=padenot
mWaitState is only ever tested against WAITSTATE_WAITING_INDEFINITELY and so
the other values are equivalent.  It is never WAITSTATE_WAITING_INDEFINITELY
on leaving (or entering) WaitForNextIteration and so there is no need to set
it in WakeUp().

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

--HG--
extra : moz-landing-system : lando
2018-10-31 00:54:14 +00:00
Karl Tomlinson
a2cc4c6476 Bug 1503132 remove unnecessary monitor notify for AudioCallbackDriver r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D10161

--HG--
extra : moz-landing-system : lando
2018-10-30 23:51:49 +00:00
Paul Adenot
28fa83d1b5 Bug 1404977 - Part 10 - Make logging uniform, and consistently use GraphImpl() to access the graph impl. r=pehrsons
MozReview-Commit-ID: DZ7zhQsBtvy

--HG--
extra : rebase_source : d44599587cc11dccaecf6672fc4ffbaad1a5c14f
2018-04-17 17:11:13 +02:00
Paul Adenot
6622a3551d Bug 1404977 - Part 9 - Propagate the changes to the GraphDrivers, simplifying them, and brokering all access through the MSG. r=pehrsons
For an AudioCallbackDriver, the number of input channels is immutable, and
passed at construction, so that it's less necessary to rely on global state.

MozReview-Commit-ID: F9TL1H92z3W

--HG--
extra : rebase_source : 5193488592ca97273eb2b6f43d4c7a0e4beb0a33
2018-04-30 16:01:56 +02:00
Karl Tomlinson
22e47fbddd bug 1472925 keep a strong reference to MediaStreamGraph from GraphDriver r=padenot
--HG--
extra : rebase_source : 1db73541027a7b8f40365c6dc7977eb6be88c567
2018-07-03 17:23:09 +12:00
Alex Chronopoulos
8b700896f3 Bug 1460346 - Verify that AudioMixer'callback is removed before the destruction of GraphDriver. r=padenot
MozReview-Commit-ID: Jd0PVw7xHDV

--HG--
extra : rebase_source : 2e50404b08778ceadd76691312861d134d7c1a42
2018-06-29 10:05:56 +02:00
Alex Chronopoulos
cd6f5298c4 Bug 1460346 - Fix a case that ThreadedDriver is started when it is already working. r=padenot
MozReview-Commit-ID: 6R6WH3ITw03

--HG--
extra : rebase_source : 0762f709b7b82714f7c3a47ad59984e5bde49238
2018-05-25 11:58:58 +03:00
Alex Chronopoulos
7ab72fe907 Bug 1460346 - Assert that GraphDriver methods are called from graph thread. r=padenot,pehrsons
MozReview-Commit-ID: Kkl7ENMXlJq

--HG--
extra : rebase_source : ccc79b8cfcb1d6d86ced5bc2a5a2931eccd7ff72
2018-05-25 11:58:45 +03:00
Alex Chronopoulos
d3b6626bf0 Bug 1460346 - Create a method to check whether GraphDriver's thread is running. r=pehrsons
MozReview-Commit-ID: 8hOXvxDWOIG

--HG--
extra : rebase_source : 838637720c24e08769ea59204bb55da6678e71b4
2018-05-22 19:51:42 +03:00
Alex Chronopoulos
2b26626333 Bug 1460346 - Move checks for NextDriver member in the setter method. r=pehrsons
MozReview-Commit-ID: 906AyL0tEwG

--HG--
extra : rebase_source : 4359724926d9d06919fc911336125f308dfb1d07
2018-05-22 19:31:56 +03:00
Alex Chronopoulos
3148644625 Bug 1457427 - Change the assert in SetInputListener of GraphDriver to verify that the driver is not started. r=padenot
With the updated OnThread method SetInputListener method cannot continue asserting for being in audio callback. This check is not realistic since it is used on a newly created driver before being started.

MozReview-Commit-ID: 5gntuHm3fnr

--HG--
extra : rebase_source : e3bc17e9d8c83c4d61686889af41edfb3ef3902f
2018-05-07 19:36:45 +02:00
Alex Chronopoulos
7271873512 Bug 1457427 - Improve OnThread method of AudioCallbackDriver to track the thread id of the audio thread so be more accurate. r=padenot
The class has been enhanced to store the thread id at the beginning of the callback and use it in order to compare with the current thread id when OnThread method is called. The old mechanism which includes the mInCallback flag has been removed.

MozReview-Commit-ID: DWSbFQfvKzX

--HG--
extra : rebase_source : e6c011da563b8f1d562ca7a394433e1e53fcffa4
2018-05-07 19:36:14 +02:00
Alex Chronopoulos
196c05c507 Bug 1457427 - Create a new GraphDriver method which performs the switching to next driver. r=padenot
Restructuring of the existing code no functional change.

MozReview-Commit-ID: JWaa8LgG4MR

--HG--
extra : rebase_source : 97190b870172549a0cd2453078c0511887059b73
2018-05-07 19:35:56 +02:00
Karl Tomlinson
c3c3a90bcb bug 1457058 remove unused GraphDriver::RemoveCallback() r=padenot
MozReview-Commit-ID: 3ZWfWEJ7bko

--HG--
extra : rebase_source : 2bd9b8fd0f87f87905606f5550c9645fbe68b465
2018-04-26 17:50:59 +12:00
Chris Peterson
0129d900f3 Bug 1436263 - Part 2: Replace override final virtual function specifiers with just final. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -08:00
Narcis Beleuzu
a8f33facb2 Backed out changeset db713228c8e3 (bug 1425150) for wpt failures on core/platform.cpp r=abackout on a CLOSED TREE 2017-12-14 23:23:20 +02:00
Paul Adenot
17ca0b45f8 Bug 1425150 - Register AudioCallbackDriver to the Gecko Profiler. r=jya
MozReview-Commit-ID: 3rJbF8Kq0zx

--HG--
extra : rebase_source : 49719ea92da9c1c556b1c3d10a06d3f2cdc3b08f
2017-12-13 17:10:14 -06:00
Alex Chronopoulos
758db182f3 Bug 1419378 - Fail before stream init when output number of channels is zero. r=padenot
MozReview-Commit-ID: G2bjXhAXiqz

--HG--
extra : rebase_source : 21cf22e4afd4065835a5323ed0ab44a55035f0db
2017-11-28 12:57:02 +02:00
Karl Tomlinson
2f98789374 bug 1382366 disable AudioCallback -> SystemClockDriver fallback before disowning graph f=pehrsons r=padenot
MozReview-Commit-ID: ESr6yxjPVWf

--HG--
extra : histedit_source : eb60aa28970548a65b31e79ba0c7efaaf27268cc
2017-11-04 19:00:46 +13:00
Karl Tomlinson
ef7235b44f bug 1382366 move declaration of mWaitState to SystemClockDriver f=pehrsons r=padenot
MozReview-Commit-ID: IBqJRjL2Ruk

--HG--
extra : histedit_source : bf467862aa715292c446fa037958338993096441
2017-11-04 11:02:52 +13:00
Karl Tomlinson
9aec4911f8 bug 1408276 remove unused GraphDriver::Destroy() r=padenot
MozReview-Commit-ID: 1eonMAWKubq

--HG--
extra : amend_source : bc4193e7041b25407422d49e4e12c81d24c66e72
2017-10-09 22:09:00 +13:00
Karl Tomlinson
a7bb0b6a26 bug 1406830 store the AsyncCubeTask SharedThreadPool reference on the AudioCallbackDriver r=jesup,padenot
The first AsyncCubebTask dispatch from AudioCallbackDriver::Start() may either
be from MediaStreamGraphImpl::RunInStableState() on the main thread or
ThreadedDriver::RunThread() on a threaded driver thread.
These could potentially occur concurrently when there are multiple
MediaStreamGraphs.

This change removes the race around setting sThreadPool.
SharedThreadPool::Get() would have returned the same pointer, and so
that race was probably mostly benign apart from the potential to add an
extra reference and so hang on shutdown in SharedThreadPool::SpinUntilEmpty().

Storing the reference to the SharedThreadPool on the object using it is the
typical way to use SharedThreadPool.  It lets the thread pool be released when
not in use, and lets SharedThreadPool deal with multi-thread access and
shutdown.

MozReview-Commit-ID: 8WutVsAMfJo

--HG--
extra : rebase_source : a3d0ce75d65889fff47389ccd80640c3f1150244
2017-09-26 17:28:17 +13:00
Karl Tomlinson
7299e56b0b bug 1406830 reimplement Shutdown() as virtual separately on each driver r=padenot
moving Stop() to AudioCallbackDriver only.

MozReview-Commit-ID: 9atG8R4wAsY

--HG--
extra : rebase_source : 0addeae733c001f4e5c6cd2d55cbb0b069863864
2017-09-28 15:05:36 +13:00
Karl Tomlinson
4f358ada69 bug 1406830 remove unused GraphDriver::Resume() r=padenot
MozReview-Commit-ID: IPpyxOHESLW

--HG--
extra : rebase_source : 404e86e6db9c42df64d306697e13b6da1f0c793c
2017-09-28 14:55:20 +13:00
Paul Adenot
ec46b8ffb1 Bug 1403041 - Fix typo in AudioCallbackDriver member. r=kinetik
s/mOuputChannelCount/mOutputChannelCount/

MozReview-Commit-ID: Kv03aSKnfQa
2017-09-26 12:05:01 +02:00
Andreas Pehrson
3e7a54981e Bug 1360334 - Improve error handling. r=padenot
MozReview-Commit-ID: 5tIXzzisg0V

--HG--
extra : source : 0dc85355af3d166038ccf6e0fd161bd614b0ead2
2017-09-08 16:41:36 +02:00
Sebastian Hengst
3a76476175 Backed out changeset a3eabb355005 (bug 1360334) for build bustaget at dom/media/GraphDriver.cpp:200: cannot pass non-trivial object of type 'RefPtr<mozilla::GraphDriver>' to variadic function. r=backout on a CLOSED TREE 2017-09-09 18:00:49 +02:00
Andreas Pehrson
0bdbb7d2aa Bug 1360334 - Improve error handling. r=padenot 2017-09-08 16:41:36 +02:00
Paul Adenot
097de34e5b Bug 1395593 - Don't query the maximum channel count in ::PlayAudio using cubeb. r=achronop
MozReview-Commit-ID: 97ri5vhzsRF

--HG--
extra : rebase_source : 56bc0f44566dfc3e271444f8dfc9f89e12a1a0a1
2017-08-31 17:14:34 +02:00
Chun-Min Chang
b0e140e2a2 Bug 1392930 - part 3: Make AudioCallbackDriver inherit from DeviceChangeListener; r=padenot
--HG--
extra : rebase_source : a6d87257004fe4954044c0ccd70ca4b4f597099a
2017-08-29 17:45:44 +08:00
Alex Chronopoulos
c9d4805a3f Bug 1378070 - Implement multichannel WebAudio. r=padenot
* * *
[mq]: rebase

MozReview-Commit-ID: KJwH3ZeJn55

--HG--
extra : rebase_source : 0e9866c8dc5ccb98a9654c1e18b0bcef1ef5afa8
2017-08-28 17:16:20 +03:00
Matthew Gregan
2f8cc7804c Bug 1388236 - Remove B2G-only AudioChannel code from MSG. r=padenot 2017-08-10 13:00:08 +12:00
Paul Adenot
e55c008768 Bug 1372247 - Make the AudioOutputObserver a member of the MediaEngineWebRTCMicrophoneSource so it's not a global singleton anymore. r=jesup
MozReview-Commit-ID: 3yC1PvG3sW7

--HG--
extra : rebase_source : 950c1633d127ee0b6670b112bb31637a8851a583
2017-06-12 17:14:26 +02:00