Commit Graph

436 Commits

Author SHA1 Message Date
Paul Adenot
1c154b62b4 Bug 1483926 - Take into account mInputDeviceID is always nullptr on Android for now. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D3899

--HG--
extra : moz-landing-system : lando
2018-08-21 16:32:24 +00:00
Paul Adenot
3f50ca3b6f Bug 1480036 - Allow scaling all MSG volume with a pref. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D2594

--HG--
extra : rebase_source : 12a931585d95fe190e6fc1e3b4fba9a2f0cd6cd9
extra : histedit_source : 355f316e6eba1feaa0ee3e7750feede92eeae4bc
2018-08-01 12:10:32 +02:00
Andreas Pehrson
7803237bca Bug 1404977 - Exit NotifyInputData early if there's no input listener. r=achronop
MozReview-Commit-ID: KMy01D2VjLi

--HG--
extra : rebase_source : 3975d92084815cbc44b3d8bd437f6b838fd1f541
2018-08-03 14:14:36 +02:00
Paul Adenot
a1777772d7 Bug 1404977 - Part 13 - Remove useless mutex, and assert why they were useless, in WebRTCAudioDataListeners. r=pehrsons
MozReview-Commit-ID: 2Mb5WZXbYgS

--HG--
extra : rebase_source : c4a7c8874919901eb11327cfb5f86d6b185be388
2018-05-31 16:44:00 +02:00
Paul Adenot
ff9c7304e1 Bug 1404977 - Part 12 - Make DeviceChanged() notification thread safe by using the MSG message queue. r=pehrsons
This is slightly slower, especially if the main thread is busy, but it's cleaner
and actually safe.

MozReview-Commit-ID: 4C2FalxmE3L

--HG--
extra : rebase_source : 3f1341397bede31fcc35dab5a0cbf59b893f9b81
2018-05-31 16:42:24 +02: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
Paul Adenot
064d4d9b47 Bug 1404977 - Part 8 - Tell the MSG the MediaEngineAudioSource are now independent and that we can have multiple of them, cleanup the MSG-side API for managing them. r=pehrsons
The MSG now can feed microphone data to all its input listeners. This paves the
way for multiple input device, if we feel it's needed at some point, but does
not implement it.

The method for adding/removing inputs are also cleaned up.

MozReview-Commit-ID: 9OX4Da6Gjq2

--HG--
extra : rebase_source : 043c486e53f9220ae61fd788ed86064ba723f1a4
2018-04-30 16:01:38 +02:00
Andreas Pehrson
8b155b06b1 Bug 1479027 - Don't announce existing ended tracks when they have no input r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D2596

--HG--
extra : moz-landing-system : lando
2018-08-01 14:47:46 +00:00
Andreas Pehrson
b06b413c9e Bug 1471588 - Add details to SourceMediaStream and TrackUnionStream tracing. r=padenot
MozReview-Commit-ID: 38UoVtXILBk

--HG--
extra : rebase_source : 0665eb25e3717caa6635cfce3d8e028a252d022d
2018-06-27 18:30:13 +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
023dddff06 Bug 1460346 - Assert that driver switch request comes only from audio thread. r=pehrsons
MozReview-Commit-ID: B8ZTPE5qqpY

--HG--
extra : rebase_source : 9001972d910e5089c2c2fb72a912c3d18292094f
2018-05-22 19:51:48 +03:00
Andi-Bogdan Postelnicu
60732a90a5 Bug 1453795 - DOM/Media - Initialize member fields in classes/ structures. r=jyavenard
--HG--
extra : rebase_source : 0c785260497fadf98cf3cff8b9fcae8ea699c2c1
2018-06-15 10:25:02 +03:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

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

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

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

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Alex Chronopoulos
ea082741ae Bug 1457427 - Restrict the asserts of two MediaStreamGraph methods to align it with their callers. r=padenot
These two methods assert for OnGraphThreadOrNotRunning when their callers assert for OnGraphThread. Since the second assert is more limited we do not have to assert for a wider eventuality.

MozReview-Commit-ID: 2cgzO160l6F

--HG--
extra : rebase_source : 922a3d9775bb25022e456c19495b5e1666e7f8b7
2018-05-07 19:36:25 +02:00
Alex Chronopoulos
10f5acd2cc Bug 1457427 - In SourceMediaStream request driver change through ControlMessage to avoid locking on non priority thread. r=padenot
That method is used on update of channelCount constraint. By raising a ControlMessage to MediaStreamGraph we avoid the lock the mutex on a non priority thread. Unfortunately we have to send the message in main thread first, thankfully this will change soon.

MozReview-Commit-ID: 8JRSmKGGVAN

--HG--
extra : rebase_source : 3d3a3f03ec601e5fbe0e8fda01608ee8cadf8d78
2018-04-19 12:01:54 +02:00
Andreas Pehrson
9382b10798 Bug 1458166 - Clear out tracks while destroying MediaStream. r=bryce
MediaStream::Destroy() is part of a controlled shutdown sequence.
If there are still tracks with content beyond Destroy() they will
only get caught by the dtor, which may be on CC shutdown and too late.

MozReview-Commit-ID: GV6XRiTCIRk

--HG--
extra : rebase_source : 88b5730c3566f8405c8f6da5e93e7cc446b9dd75
2018-05-07 11:33:07 +02:00
Paul Adenot
f412eb58ae Bug 1456115 - Re-serialize inbound NotifyPull. r=jya
We made NotifyPull parallel to try to lower the load, and we initially measured
an improvement. However, we did the measurements with a profiler that did an
aggregation of the results. Our results had an high variance, so the mean load
was in fact not meaningful.

More careful measurement performed without doing any aggregation show that,
under load, relying on the fact that the scheduler schedules the tasks on time
is too risky, and that the code is fast enough to not have to parallelize.

MozReview-Commit-ID: CMhSn8Sc0OO

--HG--
extra : rebase_source : cfb41f861089bce9e10446bee81c13f8565ba90e
2018-04-12 14:23:03 +02:00
Narcis Beleuzu
d6e889b127 Backed out 4 changesets (bug 1456115) for Asan Mochitest filures "AddressSanitizer: stack-overflow /celt/bands.c:1437:4 in quant_all_bands". CLOSED TREE
Backed out changeset 3379d4fc07f6 (bug 1456115)
Backed out changeset 9c77f5b53b56 (bug 1456115)
Backed out changeset e48268ffa4d8 (bug 1456115)
Backed out changeset bffecfd92808 (bug 1456115)
2018-04-24 21:47:07 +03:00
Paul Adenot
0640ca7fdb Bug 1456115 - Re-serialize inbound NotifyPull. r=jya
We made NotifyPull parallel to try to lower the load, and we initially measured
an improvement. However, we did the measurements with a profiler that did an
aggregation of the results. Our results had an high variance, so the mean load
was in fact not meaningful.

More careful measurement performed without doing any aggregation show that,
under load, relying on the fact that the scheduler schedules the tasks on time
is too risky, and that the code is fast enough to not have to parallelize.

MozReview-Commit-ID: CMhSn8Sc0OO

--HG--
extra : rebase_source : cfb41f861089bce9e10446bee81c13f8565ba90e
2018-04-12 14:23:03 +02:00
Paul Adenot
fbf116232d Bug 1444976 - Trace some initial real-time media stuff. r=pehrsons
MozReview-Commit-ID: 7mmDHVS2t8f

--HG--
extra : rebase_source : ac56722792f99aadd8e359ef9ae4b30f6dc78076
extra : source : 7b9d0ce0b1cb20540d1c5bf4c77596359b5cb73e
2018-04-12 17:51:35 +02:00
Paul Adenot
a1cfe22210 Bug 1444976 - Use the AsyncLog to implement a tracing subsystem for real-time media. r=pehrsons
Use it like this:

MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_LOG=MSGTracing:5,sync,raw MOZ_LOG_FILE=trace.log ./mach run

Now open `chrome://tracing` and load the file.

Lanes are threads, thread 0 is the audio callback thread, the other thread have
normal numbers.

Thread 1 shows the theoretical budget we have for a particular audio callback.

MozReview-Commit-ID: 87woGiFT4ID

--HG--
extra : rebase_source : 03cefb8edf12b077607ae71aeb999fd0ac966674
extra : source : 14929579ba3f71f14c9d81b6ed88563d35da11e0
2018-03-20 18:22:08 +01:00
Andreea Pavel
14ac5e554d Backed out 3 changesets (bug 1444976) for failing android at dom/media/tests/mochitest/test_getUserMedia_mediaStreamTrackClone.html a=backout
Backed out changeset 79b7ee8b01ee (bug 1444976)
Backed out changeset 35ca96cabe3c (bug 1444976)
Backed out changeset 2512c9c24244 (bug 1444976)
2018-04-18 21:25:14 +03:00
Paul Adenot
f00a090b8a Bug 1444976 - Trace some initial real-time media stuff. r=pehrsons
MozReview-Commit-ID: 7mmDHVS2t8f

--HG--
extra : rebase_source : a6b0bd42a63f3fc6e4a6307249ed447d749f96c4
extra : source : 7b9d0ce0b1cb20540d1c5bf4c77596359b5cb73e
2018-04-12 17:51:35 +02:00
Paul Adenot
a28be80f69 Bug 1444976 - Use the AsyncLog to implement a tracing subsystem for real-time media. r=pehrsons
Use it like this:

MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_LOG=MSGTracing:5,sync,raw MOZ_LOG_FILE=trace.log ./mach run

Now open `chrome://tracing` and load the file.

Lanes are threads, thread 0 is the audio callback thread, the other thread have
normal numbers.

Thread 1 shows the theoretical budget we have for a particular audio callback.

MozReview-Commit-ID: 87woGiFT4ID

--HG--
extra : rebase_source : b4310af51efa83c6670ba4e37433f7a23a575bba
extra : source : 14929579ba3f71f14c9d81b6ed88563d35da11e0
2018-03-20 18:22:08 +01:00
Cosmin Sabou
2680ecadac Backed out 3 changesets (bug 1444976) for build bustages on dom/media/AsyncLogger. CLOSED TREE
Backed out changeset b021b33ddf74 (bug 1444976)
Backed out changeset 822a57090d84 (bug 1444976)
Backed out changeset 0fa5f7cfee1d (bug 1444976)
2018-04-17 13:07:12 +03:00
Paul Adenot
d9b247b0d7 Bug 1444976 - Trace some initial real-time media stuff. r=pehrsons
MozReview-Commit-ID: 7mmDHVS2t8f

--HG--
extra : rebase_source : 0ab839099c0a5d83f639a1157c126d6fae60cb1e
extra : source : 7b9d0ce0b1cb20540d1c5bf4c77596359b5cb73e
2018-04-12 17:51:35 +02:00
Paul Adenot
7e374f59ca Bug 1444976 - Use the AsyncLog to implement a tracing subsystem for real-time media. r=pehrsons
Use it like this:

MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_LOG=MSGTracing:5,sync,raw MOZ_LOG_FILE=trace.log ./mach run

Now open `chrome://tracing` and load the file.

Lanes are threads, thread 0 is the audio callback thread, the other thread have
normal numbers.

Thread 1 shows the theoretical budget we have for a particular audio callback.

MozReview-Commit-ID: 87woGiFT4ID

--HG--
extra : rebase_source : 52d0b6a3b054238c79f1b224d6cbfcbaec743a67
extra : source : 14929579ba3f71f14c9d81b6ed88563d35da11e0
2018-03-20 18:22:08 +01:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Alex Chronopoulos
2ef6a59abe Bug 1387454 - Create a MediaStreamGraph according to the given sample rate. r=padenot
MozReview-Commit-ID: 4YP8oWIVyjy

--HG--
extra : rebase_source : 54c83c0aa122fecc9e07868405e42d31b2172516
2018-04-03 20:02:15 +03:00
Andreas Pehrson
c213ba1025 Bug 1407549 - Avoid copying principal handles as much as possible. r=padenot
MozReview-Commit-ID: EMX2nf5nk1L

--HG--
extra : rebase_source : 4cbdfabcafb0bfb844dd022e6f56b425c4f6e87c
2018-03-29 16:15:51 +02:00
Andreas Pehrson
d46c8b84c9 Bug 1407549 - Simplify MSGImpl::AudioTrackPresent. r=padenot
MozReview-Commit-ID: 9MBH3xoah1f

--HG--
extra : rebase_source : 536dc84e1fd11e8edbf426067943c8c210ea0327
2018-03-29 16:10:29 +02:00
Andreas Pehrson
7835856206 Bug 1447563 - Clear direct track listeners from TrackUnionStream during shutdown. r=padenot
MozReview-Commit-ID: 9PbpQpOaIIh

--HG--
extra : rebase_source : d37a941097e921de5b83753244ab1523b34157b8
2018-03-26 19:20:44 +02:00
Andreas Pehrson
a55204490f Bug 1447563 - Clear video outputs during shutdown. r=padenot
MozReview-Commit-ID: L1ZnhmxrPqa

--HG--
extra : rebase_source : b35a810559d4b5706c3cce5a42b58cf388246ba7
2018-03-26 14:58:06 +02:00
Andreas Pehrson
60f3567035 Bug 1440040 - Don't round up to next block unless necessary. r=padenot
With block size 128, rounding `128` to end of next block gives `256`, which is
not what we want when running MSG iterations. That could mean over-iterating and
buffering unnecessary amounts of silence.

MozReview-Commit-ID: vW14l2ygRy

--HG--
extra : rebase_source : 8aeedc8958e646f9730c9163447e3355a73fd42e
2018-02-28 22:37:02 +01:00
Ben Kelly
75bf35692e Bug 1440407 P2 Remove some unnecessary nsPIDOMWindowInner QI to nsIGlobalObject. r=mystor 2018-02-22 14:28:39 -08:00
Andreas Pehrson
09669c4432 Bug 1299515 - Don't assert that tracks must be ended in forced shutdown. r=padenot
I hit this during local tests. It's a fine invariant but it doesn't hold in
forced shutdown.

MozReview-Commit-ID: HtoiGwf7IMI

--HG--
extra : rebase_source : 707de2fe08ccad99a06dab00969e2f140e63abad
2018-01-03 15:13:36 +01:00
Andreas Pehrson
2b25cd7258 Bug 1299515 - Signal SetPullEnabled with a message. r=padenot
With the added invariant that NotifyPull() needs a MediaStreamListener present
to not underrun, we need SetPullEnabled() and AddListener() to stay in sync by
using the same signaling mechanism.

MozReview-Commit-ID: 49KWdiTOG98

--HG--
extra : rebase_source : d0ad44d7ce431aa792c4908f96baf0c0920dbe90
2018-01-03 11:59:41 +01:00
Andreas Pehrson
aa75f0c28e Bug 1408294 - Don't assume there is always a listener feeding a SourceMediaStream. r=padenot
There are legit cases when a SourceMediaStream gets pulled without a listener
present.

A clear example (though a corner case and easily overlooked) that I've hit is
when the last track is ended and the only stream listener is removed at the same
time. This leads to a pull on the next iteration where the track-end has not
yet been picked up. And thus, a false positive error saying that a live track
doesn't have listeners.

The real error here will now instead be caught by the new assert for when a
pulled stream underruns (which is now illegal).

MozReview-Commit-ID: 3e8FcCZfhYJ

--HG--
extra : rebase_source : ada823dbab07c8ca50429cd854b0c4b1df688fbb
2018-01-04 10:32:30 +01:00
Andreas Pehrson
ee75d2b969 Bug 1408294 - Assert that NotifyPull produces data. r=padenot
MozReview-Commit-ID: CtC8A83iJgg

--HG--
extra : rebase_source : ada5a771164fafe35d22589956ced6f54545ee73
2017-12-05 14:34:08 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Paul Adenot
e3c5088847 Bug 1428392 - Remove AudioOutputObserver, and feed the reverse-stream directly to the AEC. r=pehrsons
MozReview-Commit-ID: EVpH5LUOZ6g

--HG--
extra : rebase_source : d172cd10dffee89ac48b9ec6b6435dcf0c0581d4
2018-01-05 18:10:23 +01:00
Karl Tomlinson
798ca9ae4e bug 1418820 add diagnostic asserts to check for running with incorrect lifecycle state r=padenot
MozReview-Commit-ID: HfwBfHoIsTu

--HG--
extra : rebase_source : 854ac34687bdcea2faf01d8006f8302ff2139923
2017-12-21 18:04:08 +13:00
Jean-Yves Avenard
0a4ce68473 Bug 1425623 - Don't allocate array on the heap. r=padenot
Instead allocate it on the stack and provide it as out parameter.

MozReview-Commit-ID: 9fSJ68EfAga

--HG--
extra : rebase_source : 81430b45e4341d0f4208097f021c2a917e8e2645
2017-12-17 15:47:44 +01:00