Commit Graph

19 Commits

Author SHA1 Message Date
Matthew Gregan
bad7993d06 Bug 1067414 - Convert CubebUtils from a class of statics to a namespace. 2014-09-15 18:09:00 +12:00
Ryan VanderMeulen
d8b24f507f Backed out changesets a68c9d18ffa5 and 750e7aaf09cb (bug 1067414) for causing bug 1068658. a=me 2014-09-17 14:39:17 -04:00
Matthew Gregan
e2c1465f2d Bug 1067414 - Convert CubebUtils from a class of statics to a namespace. r=jesup
--HG--
extra : rebase_source : 14c9e6709d5cc4fe978ee7ccc6d4f1988c09dd73
2014-09-15 18:09:00 +12:00
Paul Adenot
9ea3573709 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
2635504554 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
f76451d2e9 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
1f6d49a3b7 Bug 848954 - Part 25 - Add documentation on some driver's members. r=roc 2014-08-26 17:02:31 +02:00
Paul Adenot
a487cecd3f 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
2618f0a77f Bug 848954 - Part 21 - Fix sleep/wake up code for the MSG. r=roc 2014-08-26 17:02:30 +02:00
Paul Adenot
a3533d7c93 Bug 848954 - Part 20 - Remove the now useless DriverHolder class. r=roc 2014-08-26 17:02:28 +02:00
Paul Adenot
4dffa09424 Bug 848954 - Part 15 - Allow an AudioCallbackDriver to sleep to save power. r=roc 2014-08-26 17:02:08 +02:00
Paul Adenot
a61c50b315 Bug 848954 - Part 14 - Run all blocking cubeb operations off-main-thread. r=roc 2014-08-26 17:02:07 +02:00
Paul Adenot
d73a6771b0 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
d410cae05a 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
5856b1e3a4 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
7e987d0735 Bug 848954 - Part 4 - Factor behavior for drivers that manage their thread. r=roc 2014-04-25 18:04:53 +02:00
Paul Adenot
f6e2e2b753 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
abc95a4adc Bug 848954 - Part 2 - Put the thread management in the driver. r=roc 2014-04-25 18:03:04 +02:00
Paul Adenot
f4c5b13dbd Bug 848954 - Part 1 - Factor out clocks and scheduling of MSG iterations. r=roc 2014-04-25 16:09:30 +02:00