Randell Jesup
863298d9e0
bug 1072780: patch 4 - Use atomics for EnsureNextIteration to close races around CurrentDriver r=roc
2014-09-28 12:07:25 -04:00
Randell Jesup
518b26e1f8
bug 1072780: patch 3 - Fix up Revive() to not trigger assertions, and also to avoid Init() (blocking) on MainThread r=roc
2014-09-28 12:07:24 -04:00
Randell Jesup
64af5f19cd
Bug 1072775: Additional assertions for MediaStreamGraph/GraphDriver r=roc
2014-09-28 12:07:24 -04:00
Randell Jesup
bb9f80b6b1
Bug 1072780: patch 1 - clean up CurrentDriver() use off-MSG-thread; fix InCallback() r=roc
2014-09-28 12:07:24 -04:00
Daniel Holbert
8c09c51078
Back out bug 1072780 & bug 1072775 (by reverting to cset before them, d71444b75291) for pthread assertion failures
2014-09-28 09:56:40 -07:00
Randell Jesup
319ff20936
bug 1072780: patch 4 - Use atomics for EnsureNextIteration to close races around CurrentDriver r=roc
2014-09-28 12:07:25 -04:00
Randell Jesup
30d3930ed6
bug 1072780: patch 3 - Fix up Revive() to not trigger assertions, and also to avoid Init() (blocking) on MainThread r=roc
2014-09-28 12:07:24 -04:00
Randell Jesup
e78a54416d
Bug 1072775: Additional assertions for MediaStreamGraph/GraphDriver r=roc
2014-09-28 12:07:24 -04:00
Randell Jesup
40d928dbfe
Bug 1072780: patch 1 - clean up CurrentDriver() use off-MSG-thread; fix InCallback() r=roc
2014-09-28 12:07:24 -04:00
Paul Adenot
bdb778d2f4
Bug 1064117: Stop GraphDriver always in Shutdown r=jesup
2014-09-10 15:20:34 +02:00
Paul Adenot
c548b67eee
Bug 1059899 - When cubeb_stream_init fails, fallback to using a SystemClockDriver. r=jesup
2014-09-12 13:22:55 +02:00
Paul Adenot
a79cc7ea8d
Bug 1064966 - Initialize AudioCallbackDriver::mIterationDurationMS. r=jesup
...
--HG--
extra : rebase_source : 52d20570c6baa6503264e5ca55fabc8e492f3ea2
2014-09-09 18:16:01 +02:00
Paul Adenot
6a633ae6b2
Bug 1062293 - Ensure the graph stays alive when doing driver switches and audio stream shutdown operations. r=jesup
...
This basically gets a grip on the graph while doing driver switches operations
on another thread (system thread or audio thread), because those can take time.
Because the graph is refcounted, it'll be freed when the last operation
finishes, which is what we want.
This patch also only allows driver switching when the graph is in state
LIFECYCLE_RUNNING, which is what we want anyway.
--HG--
extra : rebase_source : 76365981ec909796509bd21e616b1ff8602406bd
2014-09-03 15:52:43 +02:00
Paul Adenot
0661e8b253
Bug 1062293 - Add specialized logging to track the lifetime state change of MediaStreamGraphs r=jesup
...
As noted in the comment, it is very useful to have this interleaved with the ADB
logcat on Android/b2g, because this way we can correlate gecko state with the
state of the Android HAL.
--HG--
extra : rebase_source : 80df45d0851a06daac3abeab2ea4b5bc7e58a21d
2014-08-31 14:19:48 +02:00
Ehsan Akhgari
5c071cc02e
Bug 1060980 - Fix more bad implicit constructors in the media code; r=roc
...
--HG--
extra : rebase_source : 14da50f7d2e37e04452445dea575ea4d582e8efd
2014-08-31 23:50:23 -04:00
Paul Adenot
7d14b2516c
Bug 1059132 - Bustage fix: fix printf format.
2014-08-28 19:34:35 +02:00
Paul Adenot
b11b217ab3
Bug 1059132 - Log a message and continue when we found our clock went backward while using a system clock. r=jesup
...
--HG--
extra : rebase_source : d808c5f8f32dfa1746c9f0b19828dba9b8ecdc30
2014-08-27 11:48:27 +02:00
Randell Jesup
5d75646bd9
Bug 848954 - Part 32 - Disable MSG sleep. r=padenot
...
This has a race somewhere, so we disable it for now.
The real fix will come from the Web Audio API Suspend API [0]
[0]: https://github.com/WebAudio/web-audio-api/issues/317
2014-08-26 17:12:41 +02:00
Paul Adenot
4d9c2e35fb
Bug 848954 - Part 28 - Properly stop the driver when shutting down the graph. r=jesup
...
(this was originaly present, probably caused by a bad rebase)
2014-08-26 17:04:38 +02:00
Paul Adenot
1e9aca6c1d
Bug 848954 - Part 28 - Allow to set a driver twice per iteration iff the second driver is an audio driver. r=jesup
...
This should not happen, but does. Somehow, we detect that there is no track with
audio in the graph, during the graph updates (after having ran the messages),
and then, during CreateOrDestroyAudioStream, there is a track with audio.
2014-08-26 17:04:38 +02:00
Paul Adenot
e8039f0369
Bug 848954 - Part 27 - Only attempt to sleep if the graph is still running. r=jesup
2014-08-26 17:04:36 +02:00
Paul Adenot
031bd0f622
Bug 848954 - Part 26 - Prevent a race when the MSG is going to sleep mode. r=roc
2014-08-26 17:02:31 +02:00
Paul Adenot
0b444838eb
Bug 848954 - Part 22 - Port the osx panning code to live in the AudioCallbackDriver. r=jesup
2014-08-26 17:02:31 +02:00
Paul Adenot
6628654530
Bug 848954 - Part 21 - Fix sleep/wake up code for the MSG. r=roc
2014-08-26 17:02:30 +02:00
Paul Adenot
7846782ef2
Bug 848954 - Part 20 - Remove the now useless DriverHolder class. r=roc
2014-08-26 17:02:28 +02:00
Paul Adenot
6da931e7d6
Bug 848954 - Part 18 - Start the thread after having processed the messages to make sure there are messages in the queue when processing starts. r=roc
2014-08-26 17:02:09 +02:00
Paul Adenot
c66ac1d38b
Bug 848954 - Part 16 - Make AudioCallbackDriver respect the AudioChannelType. r=roc
2014-08-26 17:02:08 +02:00
Paul Adenot
3bfd993eac
Bug 848954 - Part 15 - Allow an AudioCallbackDriver to sleep to save power. r=roc
2014-08-26 17:02:08 +02:00
Paul Adenot
ee5c66a26b
Bug 848954 - Part 14 - Run all blocking cubeb operations off-main-thread. r=roc
2014-08-26 17:02:07 +02:00
Paul Adenot
12a686451d
Bug 848954 - Part 13 - Add an RAII class to ensure another thread is not in the audio callback when shutting down. r=roc
2014-08-26 17:01:35 +02:00
Paul Adenot
6c0f9e38fb
Bug 848954 - Part 10 - Add a MediaStreamGraph driver based on an audio callback. r=roc
2014-08-26 17:01:33 +02:00
Paul Adenot
679fac5442
Bug 848954 - Part 7 - Get rid of the stack allocated message queue. r=roc
...
In the next patches, when the AudioDriver will be implemented, the audio backend
thread (that we don't control), will return from the stack frame where the
nsTArray that allows the MSG thread to exchange message queues in a efficient
manner with the main thread. We put it in the MediaStreamGraph to avoid adding
an allocation/deallocation per iteration on the MSG thread.
In addition, the graph will be able to run on different threads during its
lifetime, so we can't guarantee a stable stack frame to allocate things on
anymore.
The array are renamed with meaningful names, explaining the double-buffering
pattern: the back queue is filled by the main thread, and is swapped with the
front queue that is processed by the MSG thread.
Arrays accesses are synchronized using the driver's monitor.
2014-08-25 15:26:21 +02:00
Paul Adenot
8f4a6f19f7
Bug 848954 - Part 4 - Factor behavior for drivers that manage their thread. r=roc
2014-04-25 18:04:53 +02:00
Paul Adenot
af9bfbca22
Bug 848954 - Part 3 - Separate interval time calculation and actual processing, and give an audio-callback compatible interface to the Process function. r=roc
2014-04-25 18:04:23 +02:00
Paul Adenot
f04cfc8457
Bug 848954 - Part 2 - Put the thread management in the driver. r=roc
2014-04-25 18:03:04 +02:00
Paul Adenot
53b7efb271
Bug 848954 - Part 1 - Factor out clocks and scheduling of MSG iterations. r=roc
2014-04-25 16:09:30 +02:00