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

468 Коммитов

Автор SHA1 Сообщение Дата
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
Jean-Yves Avenard 9c5a09051e Bug 1404997 - P26. Give Await the threadpool to use. r=gerald
This allows to re-use the SharedThreadPool across calls, preventing the need to create a new thread on each call.

MozReview-Commit-ID: CbP6OTYKhHL

--HG--
extra : rebase_source : 969f2c74f00614d6265fe0e25abfb36c9648d564
2017-12-15 20:06:38 +01:00
Jean-Yves Avenard 1fc0ccabbd Bug 1404997 - P20. Make MediaStreamListener::NotifyPull asynchronous. r=padenot
The operations is done in two ways:
1- Process all the MediaStreamListener at once, which returns a promise that will be resolved once the operation is completed.
2- As the Cubeb audio callback must be resolved immediately, the MSG will wait for all the promises to be resolved until it continues the operation of feeding the callback the necessary data.

This will allow to parallelize the stream's tracks' audio decoding.

MozReview-Commit-ID: EeoDvxnJyWV

--HG--
extra : rebase_source : 3d09af5aa3c80c4892a4d9af80842541d8fc33bb
2017-12-10 21:33:43 +01:00
Jean-Yves Avenard 8ee5b6a296 Bug 1404997 - P17. Split ExtractPendingInput into two methods. r=padenot
There were two steps happening inside ExtractPendingInput:
1- Retrieve the data from the StreamTracks
2- Process any pending pending states change

We split it so that the retrieval from the StreamTrack can be promisified in an upcoming change

MozReview-Commit-ID: 53O4fXWMDGL

--HG--
extra : rebase_source : da082fa8db3a9029dc05d845cb9f58514f5ffcff
2017-12-07 20:52:56 +01:00
Jean-Yves Avenard ec5bd7af01 Bug 1404997 - P16. Properly finish the SourceMediaStream during shutdown. r=padenot
Despite the name of the function, the original SourceMediaStream::Finish() (consequently renamed FinishPending) didn't actually finished the stream, but instead set a bool that would indicate to completely finish the stream once ExtractPendingInput ran. But here it could never run again.
So actually do what the original fix intended to do (bug 1410829)

MozReview-Commit-ID: 1hHiOLiovG

--HG--
extra : rebase_source : 7b108a96b54c92812ba583b0dc78ceddbfe15636
2017-12-07 20:20:53 +01:00
Jean-Yves Avenard d62fc9df33 Bug 1404997 - P15. Move MSG::FinishStream logic to MediaStream. r=padenot
It is good practice for the MSG to now know the implementation details of the MediaStream.

Additionally, this will allow to make a thread-safe version later.,

MozReview-Commit-ID: CTacCLSeKRP

--HG--
extra : rebase_source : 4feb4beb12f4cd2a6fb67fd6a18f003ea8b18869
2017-12-07 16:12:19 +01:00
Jean-Yves Avenard a21ef82be7 Bug 1404997 - P14. Rename members to clarify the finish meaning. r=padenot
We have different concept of "finish" between the base class and its hierarchy.
Attempt to clear the sitatuation by renaming the members and related methods.

MozReview-Commit-ID: vFsXhMK5GY

--HG--
extra : rebase_source : 65eda9257e447584161da51af7c240e31027c501
2017-12-06 19:00:22 +01:00
Jean-Yves Avenard 55065b688d Bug 1404997 - P13. Move ExtractPendingInput logic to SourceMediaStream. r=padenot
The MSG shouldn't have to know about the inner details of the SourceMediaStream

MozReview-Commit-ID: 2S81SPzy09E

--HG--
extra : rebase_source : dff8384b19442e7686cef42420372e39f10094b6
2017-12-06 16:55:56 +01:00
Jean-Yves Avenard b8ec246a1f Bug 1404997 - P7. Simplify played time calculations. r=pehrsons
Now that the graph rate match the one out of NetEQ, we can remove an unecessary conversion.

Additionally, move a member from the base case to the only one where it's used.

MozReview-Commit-ID: II5mdcl0vhK

--HG--
extra : rebase_source : 1d9edfc2803c3fadde7505b4d84293640e4311e0
2017-12-08 20:58:09 +01:00
Alex Chronopoulos 8904b64329 Bug 1406772 - Get channel count from MSG. p=padenot
MozReview-Commit-ID: 8aFdJkfcbCA
2017-12-01 23:21:42 +02:00
Karl Tomlinson 7c98745089 bug 1408276 move to LIFECYCLE_WAITING_FOR_MAIN_THREAD_CLEANUP at end of iteration f=pehrsons r=padenot
MozReview-Commit-ID: GbfIOPZPuGu

--HG--
extra : rebase_source : 8a7abbe8a96a90f20dbb0465b6a5f69f05140d4f
extra : amend_source : 41079a2a825b53ed6d4e8cc31fc4c8de2f041e8b
extra : histedit_source : df5b962ac253df34ace8ebc22cdd98b608b6ddfb
2017-10-17 18:14:43 +13:00
Jean-Yves Avenard 2f874411a0 Bug 1415556 - P11. Remove unecessary locking. r=padenot
The method doesn't use any MSG member, only dispatching a task.

MozReview-Commit-ID: 7uZbTvq9OQt

--HG--
extra : rebase_source : e12c5ffcb6479ab2bc06973121c291e759db23a4
2017-11-11 10:20:59 +01:00
Jean-Yves Avenard d1be81a96e Bug 1415556 - P10. Make functions const where needed. r=padenot
MozReview-Commit-ID: EBEgDVCTewa

--HG--
extra : rebase_source : 282ea4f98d253e9235f159afd7d3f88a4f26d6b1
2017-11-10 20:01:27 +01:00
Jean-Yves Avenard a4416cf9f6 Bug 1415556 - P7. Remove unecessary locking. r=padenot.
mForceShutdownTicket and mShutdownTimer are only ever accessed on the main thread. We don't need the use of the monitor to reset them.

MozReview-Commit-ID: 1DL8bLmzEH5

--HG--
extra : rebase_source : 84d56c7f4428143426cd22e88ef2912330efba4e
2017-11-10 18:53:23 +01:00
Jean-Yves Avenard 66c39c273f Bug 1415556 - P6. Ensure mLifecycleState member is always accessed safely. r=padenot
We only access mLifecycleState via a helper which strongly enforced how the member can be accessed.
Two non-safe accesses are corrected.

MozReview-Commit-ID: 6LYk7t4rSyB

--HG--
extra : rebase_source : 9727771e1b04ba1b39f5cf9a6cf94093b7e92b27
2017-11-10 18:38:02 +01:00
Jean-Yves Avenard 251f706a51 Bug 1415556 - P5. Use helper to set mDriver. r=padenot
MozReview-Commit-ID: Fres1YwcYYM

--HG--
extra : rebase_source : e856357a57708d21e896818095fa1a25085b11a9
2017-11-10 18:28:42 +01:00
Jean-Yves Avenard 95a29ea071 Bug 1415556 - P4. Make members atomics. r=padenot
They are accessed across multiple threads without the use of monitors.
While it could be argued that some use of the monitor in functions accessing those members would set in place memory barriers, making them atomics remove all doubts as to the thread safetyness of their use.

MozReview-Commit-ID: tyTqeGgDNM

--HG--
extra : rebase_source : 420c38abcfeaa5fca2449034d8e1e3d82949d49d
2017-11-10 18:27:39 +01:00
Jean-Yves Avenard 2eda28dd35 Bug 1415556 - P3. clearly mark functions' thread use. r=padenot
MozReview-Commit-ID: BXmdk4zBo28

--HG--
extra : rebase_source : 4afd6fa5e887aff093e7a9e629e8c93573f17631
2017-11-10 18:24:20 +01:00
Andreas Pehrson e22e9cf471 Bug 1407542 - Implement MediaStreamGraph::GetInstanceIfExists. r=padenot
MozReview-Commit-ID: EAd0rIrZg43

--HG--
extra : rebase_source : 2fdfc1ce361b9f9d6c43ffa887c54c88e6157f11
2017-10-23 19:08:40 +02:00
Andreas Pehrson c8ea57f25d Bug 1410829 - Clean up streams and listeners before unblocking shutdown. r=padenot
MozReview-Commit-ID: CcGaAJAUahm

--HG--
extra : rebase_source : 70133a11af466484bd7bbf6ef8793fbdff4312ab
2017-10-27 10:12:59 +02:00
Andreas Pehrson 71cacec3d5 Bug 1410829 - Signal listeners removed on shutdown so they can clean up. r=padenot
When shutting down we shut modules down in the order of
[media, gfx, cycleCollector].

At the same time we rely on destructors to clean up resources for MediaStreams
and MediaStreamTracks, but these objects may be held until cycleCollector
shutdown. Gfx resources are not allowed to be released after gfx shutdown, which
is where we this approach hits a wall.

This patch will signal them through the three available listener types to clean
up during media shutdown.

MozReview-Commit-ID: FwsG3ukV29P

--HG--
extra : rebase_source : 554ec29a43b7551b3b5570577b0559285e36d4fd
2017-10-26 16:13:38 +02:00
Kris Maglione 60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07: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
Andreas Pehrson 2acc2e8b7e Bug 1406027 - Always use the mixer so AudioCallbackDriver can track processed samples. r=padenot
This is unnecessary work but simpler than adding a path to, or refactoring, AudioCallbackDriver::DataCallback.

MozReview-Commit-ID: GLNoBqxEuwz

--HG--
extra : rebase_source : b5ef6b2e1506e68d41b22ad557968d70214fbd9f
2017-10-06 12:42:11 +02:00
Karl Tomlinson 449d985d8e bug 1406831 don't tolerate just owning the monitor if AssertOnGraphThreadOrNotRunning() is not called on the correct thread r=pehrsons
Owning the monitor is not sufficient for consistent state if state can be
accessed without the monitor.

The requirements for SetCurrentDriver() are tighted to require both the
monitor and correct thread, as CurrentDriver() can be called either with the
monitor or on the graph thread.

MozReview-Commit-ID: 90q7Pfa8jxn

--HG--
extra : rebase_source : 6cbcc334dc2bd355d2e9afdebda45a9624edda4b
2017-09-28 15:30:48 +13:00
Karl Tomlinson 4bd4041ca0 bug 1406831 tighten AssertOnGraphThreadOrNotRunning() to not accept graph thread after mDetectedNotRunning r=pehrsons
This also permits setting mDriver to null after mDetectedNotRunning, which is
useful for fixing bug 1406830.

MozReview-Commit-ID: EEgAxqPQPRI

--HG--
extra : rebase_source : 56e1583a0090e683e92463536637d0f1460cb727
2017-09-28 12:17:22 +13:00
Karl Tomlinson b6f526449e bug 1406831 simplify AssertOnGraphThreadOrNotRunning() r=pehrsons
mLifecycleState is always > LIFECYCLE_RUNNING when mDetectedNotRunning

MozReview-Commit-ID: Ds6ybTv4miA

--HG--
extra : rebase_source : 71aea6693026dc919ea6d2096f55152ae12bc58e
2017-09-28 12:10:59 +13:00
Alex Chronopoulos 643923ac4c Bug 1400889 - Keep constant output channels in MediaStreamGraph. r=padenot
MozReview-Commit-ID: JlQdxU0aNOf

--HG--
extra : rebase_source : 25b6f223c2158a4eb9175731cdbb8521de4ce312
2017-10-03 17:56:53 +03:00
Andreas Pehrson d918302551 Bug 1319446 - DirectMediaStreamListener, you are dead to me. r=padenot
MozReview-Commit-ID: KwztE5ogSj9

--HG--
extra : rebase_source : e8e6bb3548c5697c5db901c0310ea5067a30c895
2017-09-27 12:01:46 +02:00
Andreas Pehrson 540090020d Bug 1296531 - Make logic that passes buffered data to direct listener generic. r=jesup
MozReview-Commit-ID: GdGFJHTNBS

--HG--
extra : rebase_source : 031f02b25072a2c2e47e28c9f584c7d31a758c60
2017-05-24 18:54:40 +02:00
Andreas Pehrson f6213c0568 Bug 1296531 - Don't notify of ended tracks when adding a direct listener. r=jesup
There were some cases where these tracks were detected as ended when they were
in fact not. That result in problems in the MediaRecorder.

MozReview-Commit-ID: 4CNUYRvzOgK

--HG--
extra : rebase_source : b94c29bc73e76575489a4684facc0b01bb7aeb22
extra : source : bedb7abcc84263c6a6369c4d05e8bf3287281090
2017-05-23 16:00:42 +02:00
Andreas Pehrson eabd4ccaab Bug 1296531 - Break out ShutdownTicket and GetShutdownBarrier from MSG to MediaUtils. r=jib
MozReview-Commit-ID: HVCfuJz1zoA

--HG--
extra : rebase_source : 409867202687a2597f3ede12d06720f4a3e4ac30
2017-05-16 12:39:02 +02:00
Andreas Pehrson 63142392a5 Bug 1296531 - Notify MSG track listeners of removal during shutdown. r=jesup
MozReview-Commit-ID: BnWrUUvE5qk

--HG--
extra : rebase_source : d205097a8fd9e831af9ba4638b1e957224a546a9
2017-02-23 11:08:57 +01:00
Andreas Pehrson 8cf8c5abb7 Bug 1296531 - Change MSG ControlMessages from virtual to override. r=jesup
MozReview-Commit-ID: 5cCbIG4gpd0

--HG--
extra : rebase_source : adbf77d9b71d81794feb7cb0cc6d896717ee3eba
2017-02-23 11:08:26 +01:00
Andreas Pehrson 4cf8133d45 Bug 1296531 - Notify of realtime data after NotifyDirectListenerInstalled. r=jesup
MozReview-Commit-ID: Byw5PZTHdLC

--HG--
extra : rebase_source : 7f32fa5e32fbf358cd7e56158a82699625a8d6b5
extra : source : e3d8905bbadd64994388b1059e81ddb00bc0a84f
2016-11-17 09:59:49 +01:00
Wes Kocher cf93b6ca0d Merge m-c to autoland, a=merge
MozReview-Commit-ID: BlE0HFQUP9c
2017-08-31 16:56:58 -07:00
Paul Adenot 202ba7566b Bug 1335029 - Take into account SystemClockDrivers in fallback mode when dealing with AudioContext promises. r=jesup
MozReview-Commit-ID: HBS6XGXDGf1

--HG--
extra : rebase_source : 00ea5cd91d0c96d352239fdd1fa89e332399fe04
2017-08-30 15:18:10 +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
Matthew Gregan 2f8cc7804c Bug 1388236 - Remove B2G-only AudioChannel code from MSG. r=padenot 2017-08-10 13:00:08 +12:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Bevis Tseng 95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Andrea Marchesini 50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Carsten "Tomcat" Book daa67cc9e3 merge mozilla-inbound to mozilla-central a=merge 2017-06-30 12:59:45 +02:00
Paul Adenot 404c800005 Bug 1341555 - Consolidate use of the MSG's AbstractMainThread, and stop having AbstractMainThread on MediaStreams. r=pehrsons
MozReview-Commit-ID: 5hGDQcfpH6a

--HG--
extra : rebase_source : 41bb678f37cfcdbc9912a25f45a5ca488084aabe
2017-06-29 11:30:57 -07:00
Paul Adenot 91cc425f9a Bug 1341555 - Label MSG runnables. r=pehrsons
MozReview-Commit-ID: 4sfRH3FxtBT

--HG--
extra : rebase_source : 1c473d1f6c7f79462c39126dc7bb9116948cca54
2017-06-29 11:31:17 -07:00
Paul Adenot 6e485889b8 Bug 1330360 - Create new MSGs for each nsPIDOMWindow. r=jesup
MozReview-Commit-ID: 5m1MGcLmT7J

--HG--
extra : rebase_source : b9c05464bb545c047b7718a048eb7e5de3fe275d
2017-06-23 16:18:34 -07: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
Alex Chronopoulos 41737dc1af Bug 1213414 - Implement channelCount audio constraint. r=jib,padenot
MozReview-Commit-ID: K95iBYOE1nR

--HG--
extra : rebase_source : 5c73eea4902933faec75e37d90e42a2f38c51b81
2017-06-29 21:01:17 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Paul Adenot 04e87f3df5 Bug 1369422 - Simplify MediaStreamGraph::IsNonRealtime and make it not lock. r=jesup
MozReview-Commit-ID: HAHR97y6zfh

--HG--
extra : rebase_source : 2b258ccedbe40599acc62c8932682ac21784cce4
2017-06-01 17:51:15 +02:00
Bill McCloskey c197e07ff2 Bug 1363560 - Name more runnables (r=mccr8)
MozReview-Commit-ID: 3hxZDA4JlTV
2017-05-09 21:53:25 -07:00
Andreas Pehrson 3bc708da64 Bug 1342950 - Assert false, not true, on failure in debug. r=jesup
MozReview-Commit-ID: EQ9NESBhRdK

--HG--
extra : rebase_source : 83c6ea79dc1233b4d2567d8f58357e4072732260
2017-04-26 14:02:09 +02:00
Jan-Ivar Bruaroey aa0a07c837 Bug 1354642 - Add MakeRefPtr<> helper class. r=Ehsan
MozReview-Commit-ID: es34uMTZ00

--HG--
extra : rebase_source : 8738a70a47cceece1b56b66f741e29275c066d92
2017-04-07 15:08:42 -04:00
Paul Adenot b8d7a98beb Bug 1341666 - Allow running a `close` message during an MSG shutdown. r=jesup
MozReview-Commit-ID: Hqg0porLEXT
2017-03-20 16:25:19 +01:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Bill McCloskey 194043ae97 Bug 1339289 - Give names to a lot of common runnables (r=ehsan)
MozReview-Commit-ID: 5IdvK6kgoAW
2017-02-15 12:30:01 -08:00
Paul Adenot 36370e3c12 Bug 1336945 - Modernize MSG/GraphDriver logging. r=jesup
MozReview-Commit-ID: 5Redgg5uaQG
2017-02-06 16:22:36 +01:00
Jean-Yves Avenard b7844bd5c3 Bug 1319987: P9. More coding style fixes. r=gerald
MozReview-Commit-ID: DhFRqkWQZny

--HG--
extra : rebase_source : 03ed44efc83fe9cab7fc975229ac4e5746aff96b
2017-01-27 13:20:37 +01:00
Bevis Tseng 72d516ef01 Bug 1314833 - Part 2.2: Use AbstractThread::CreateDirectTaskDrainer() to Drain Direct Tasks Dispatched to MediaStreamGraph. f=rjesup,r=padenot,jwwang
MozReview-Commit-ID: 1KgE3uKu4CG

--HG--
extra : rebase_source : 2ad950afe84675fb9bc4c449e53e7c0d52270175
2016-12-07 22:00:12 -10:00
Randell Jesup c35aa15ca3 Bug 1330212: Release GraphDrivers outside of StableState runnable to avoid spinning the event queue r=smaug,padenot 2017-01-13 13:54:20 -05:00
Paul Adenot c666bf1323 Bug 1228226 - Backed out changeset 2553c3b5ba89.
This causes a number of issues, like bug 1329082, where we don't swap the
message queues of the MSG where we should, and blows up an assert in debug.

MozReview-Commit-ID: 2I3IjfK8L8r
2017-01-13 16:15:27 +01:00
Andreas Pehrson c66e1073f9 Bug 1305949 - Use the same path for passing on missed data to video sink, as during normal operation. r=ctai
MozReview-Commit-ID: FDKFf1skYVe

--HG--
extra : rebase_source : 83a1b9ec57e3b83807a482009558a78c80e1774a
extra : histedit_source : b4f61d91f7832c70585a79ce5381eafcdc5c761f
2016-10-13 11:18:53 +02:00
Andreas Pehrson 63cefa6875 Bug 1305949 - Refactor code that feeds video stream sink when it gets added. r=ctai
This mostly simplifies the code, but there are two changes to the logic as well.

1) The decision to install the listener or not used to be based on if the track
   existed in mUpdateTracks, while feeding the sink would look at the
   StreamTracks as well. This now looks at StreamTracks since an ended track is
   kept there but removed from mUpdateTracks. That means that we also
   NotifyEnded() if the track was in the StreamTracks but not in mUpdateTracks.

2) I removed the code that feeds a video stream sink with the last chunk in
   case the graph's current time has passed the end of the track. Tests should
   be written so that we have guarantees that there will be video data when a
   video stream sink gets added. If this fails we should fix the root cause of
   such a timing issue instead of wallpapering it with an old frame. I think
   this could be masking other issues. We'll see how this acts out on try.

MozReview-Commit-ID: KKr9JhVpxZt

--HG--
extra : rebase_source : f775fcfbe9647e29ee107ecc7b1f39c2d91f3b0d
extra : histedit_source : 4fa675ce93dc67d7db972a07bb3236f34707e7d3
2016-09-28 16:12:20 +02:00