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

2331 Коммитов

Автор SHA1 Сообщение Дата
Bobby Holley e42f8208f6 Bug 1147555 - Implement logging for MediaTimer. r=mattwoodrow 2015-03-30 20:06:38 -07:00
Bobby Holley 9f31ecca48 Bug 1147555 - Invert the ordering of our priority queue. r=mattwoodrow 2015-03-30 20:06:38 -07:00
Carsten "Tomcat" Book 60382cb6ba Backed out changeset bf22c9e5c5a3 (bug 1094764) for crashtest failures on a CLOSED TREE 2015-03-30 15:14:09 +02:00
Paul Adenot 6ee36e38f6 Bug 1094764 - Implement AudioContext.suspend and friends. r=roc,ehsan
- Relevant spec text:
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-suspend-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-resume-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-close-Promise
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
    - http://webaudio.github.io/web-audio-api/#widl-AudioContext-onstatechange

- In a couple words, the behavior we want:
    - Closed context cannot have new nodes created, but can do decodeAudioData,
    and create buffers, and such.
    - OfflineAudioContexts don't support those methods, transitions happen at
    startRendering and at the end of processing. onstatechange is used to make
    this observable.
    - (regular) AudioContexts support those methods. The promises and
    onstatechange should be resolved/called when the operation has actually
    completed on the rendering thread.  Once a context has been closed, it
    cannot transition back to "running". An AudioContext switches to "running"
    when the audio callback start running, this allow authors to know how long
    the audio stack takes to start running.
    - MediaStreams that feed in/go out of a suspended graph should respectively
    not buffer at the graph input, and output silence
    - suspended context should not be doing much on the CPU, and we should try
    to pause audio streams if we can (this behaviour is the main reason we need
    this in the first place, for saving battery on mobile, and CPU on all
    platforms)

- Now, the implementation:
    - AudioNodeStreams are now tagged with a context id, to be able to operate
    on all the streams of a given AudioContext on the Graph thread without
    having to go and lock everytime to touch the AudioContext. This happens in
    the AudioNodeStream ctor. IDs are of course constant for the lifetime of the
    node.
    - When an AudioContext goes into suspended mode, streams for this
    AudioContext are moved out of the mStreams array to a second array,
    mSuspendedStreams. Streams in mSuspendedStream are not ordered, and are not
    processed.
    - The MSG will automatically switch to a SystemClockDriver when it finds
    that there are no more AudioNodeStream/Stream with an audio track. This is
    how pausing the audio subsystem and saving battery works. Subsequently, when
    the MSG finds that there are only streams in mSuspendedStreams, it will go
    to sleep (block on a monitor), so we save CPU, but it does not shut itself
    down. This is mostly not a new behaviour (this is what the MSG does since
    the refactoring), but is important to note.
    - Promises are gripped (addref-ed) on the main thread, and then shepherd
    down other threads and to the GraphDriver, if needed (sometimes we can
    resolve them right away). They move between threads as void* to prevent
    calling methods on them, as they are not thread safe. Then, the driver
    executes the operation, and when it's done (initializing and closing audio
    streams can take some time), we send the promise back to the main thread,
    and resolve it, casting back to Promise* after asserting we're back on the
    main thread. This way, we can send them back on the main thread once an
    operation has complete (suspending an audio stream, starting it again on
    resume(), etc.), without having to do bookkeeping between suspend calls and
    their result. Promises are not thread safe, so we can't move them around
    AddRef-ed.
    - The stream destruction logic now takes into account that a stream can be
    destroyed while not being in mStreams.
    - A graph can now switch GraphDriver twice or more per iteration, for
    example if an author goes suspend()/resume()/suspend() in the same script.
    - Some operation have to be done on suspended stream, so we now use double
    for-loop around mSuspendedStreams and mStreams in some places in
    MediaStreamGraph.cpp.
    - A tricky part was making sure everything worked at AudioContext
    boundaries.  TrackUnionStream that have one of their input stream suspended
    append null ticks instead.
    - The graph ordering algorithm had to be altered to not include suspended
    streams.
    - There are some edge cases (adding a stream on a suspended graph, calling
    suspend/resume when a graph has just been close()d).
2015-02-27 18:22:05 +01:00
Edwin Flores 157fb06549 Bug 1142835 - Null check mPlugin on GMPAudioDecoderParent shutdown - r=cpearce 2015-03-30 14:58:19 +13:00
Jan-Ivar Bruaroey 924f8ae71f Bug 1046245 - IO on STS thread + cleanup BackgroundChild on shutdown. r=jesup 2015-03-29 13:43:43 -04:00
Jan-Ivar Bruaroey c6676519f2 Bug 1046245 - enumerateDevices w/non-blocking e10s, nsICryptoHMAC, clear cookies, lambdas. r=keeler, florian, billm, jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey 95f7adab84 Bug 1046245 - enumerateDevices origin-unique ids persisted to disk. r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey 8af3083f44 Bug 1046245 - enumerateDevices session-persisted hmac id. r=jesup 2015-02-23 11:50:48 -05:00
Jan-Ivar Bruaroey 7538e95524 Bug 1046245 - enumerateDevices returns label for pages w/active gUM or persistent permissions. r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey b711b1abcf Bug 1046245 - enumerateDevices (harmless interface version) r=smaug, r=jesup 2015-03-03 09:51:05 -05:00
Nicolas Silva 52be9f47b5 Bug 1132854 - Remove useless ThebesIntSize conversion helper. r=Bas 2015-03-29 16:59:15 +02:00
Nicolas Silva e3eaf89e3f Bug 1132854 - Make nsIntSize a typedef of gfx::IntSize. r=Bas, roc 2015-03-29 16:59:08 +02:00
Andrew McCreight 46dfeaba0b Bug 1148070 - Change nsIClassInfo::getHelperForLanguage() to getScriptableHelper(). r=bholley 2015-03-29 07:52:54 -07:00
Randell Jesup 2b3486247c Backed out 6 changesets (bug 1046245) on a CLOSED TREE 2015-03-29 01:42:32 -04:00
Jan-Ivar Bruaroey 6379bfb0be Bug 1046245 - IO on STS thread + cleanup BackgroundChild on shutdown. r=jesup 2015-03-28 19:02:46 -04:00
Jan-Ivar Bruaroey cdd0b089a5 Bug 1046245 - enumerateDevices w/non-blocking e10s, nsICryptoHMAC, clear cookies, lambdas. r=keeler, r=florian, r=billm, r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey c4161900da Bug 1046245 - enumerateDevices origin-unique ids persisted to disk. r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey 34c27979df Bug 1046245 - enumerateDevices session-persisted hmac id. r=jesup 2015-02-23 11:50:48 -05:00
Jan-Ivar Bruaroey 2c6d1d99bc Bug 1046245 - enumerateDevices returns label for pages w/active gUM or persistent permissions. r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey a0143ecf52 Bug 1046245 - enumerateDevices (harmless interface version). r=smaug, r=jesup 2015-03-03 09:51:05 -05:00
Phil Ringnalda 24b4f38005 Back out 6 changesets (bug 1046245) for thinking that MSVC would have anything to do with a __PRETTY_FUNCTION__
CLOSED TREE

Backed out changeset 9e3ecca831d8 (bug 1046245)
Backed out changeset 87dc145f4da8 (bug 1046245)
Backed out changeset 01606cf19a77 (bug 1046245)
Backed out changeset 2ed2b15fe940 (bug 1046245)
Backed out changeset 2b99b193828a (bug 1046245)
Backed out changeset d1ac67faccbb (bug 1046245)
2015-03-28 19:57:17 -07:00
Jan-Ivar Bruaroey f3376e46f8 Bug 1046245 - IO on STS thread + cleanup BackgroundChild on shutdown. r=jesup 2015-03-28 19:02:46 -04:00
Jan-Ivar Bruaroey 222e93c87c Bug 1046245 - enumerateDevices w/non-blocking e10s, nsICryptoHMAC, clear cookies, lambdas. r=keeler, r=florian, r=billm, r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey 1668e7a628 Bug 1046245 - enumerateDevices origin-unique ids persisted to disk. r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey 7d79ddc696 Bug 1046245 - enumerateDevices session-persisted hmac id. r=jesup 2015-02-23 11:50:48 -05:00
Jan-Ivar Bruaroey 6bea0d068b Bug 1046245 - enumerateDevices returns label for pages w/active gUM or persistent permissions. r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey 08e703b65e Bug 1046245 - enumerateDevices (harmless interface version). r=smaug, r=jesup 2015-03-03 09:51:05 -05:00
Ryan VanderMeulen 003e8f5278 Backed out 6 changesets (bug 1046245) for bustage on a CLOSED TREE.
Backed out changeset 222c2f9e3bc9 (bug 1046245)
Backed out changeset 4251eef464a2 (bug 1046245)
Backed out changeset 592f4cc23197 (bug 1046245)
Backed out changeset 5bfb9a1c0550 (bug 1046245)
Backed out changeset e966a5df87b6 (bug 1046245)
Backed out changeset 609f3ca64004 (bug 1046245)
2015-03-28 16:24:25 -04:00
Jan-Ivar Bruaroey f350dbadee Bug 1046245 - IO on STS thread + cleanup BackgroundChild on shutdown. r=jesup 2015-03-28 11:45:42 -04:00
Jan-Ivar Bruaroey 59e13faed0 Bug 1046245 - enumerateDevices w/non-blocking e10s, nsICryptoHMAC, clear cookies, lambdas. r=keeler, r=florian, r=billm, r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey 6a70b84a54 Bug 1046245 - enumerateDevices origin-unique ids persisted to disk. r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey 600361d553 Bug 1046245 - enumerateDevices session-persisted hmac id. r=jesup 2015-02-23 11:50:48 -05:00
Jan-Ivar Bruaroey 4a058ae74a Bug 1046245 - enumerateDevices returns label for pages w/active gUM or persistent permissions. r=jesup 2015-03-03 09:51:05 -05:00
Jan-Ivar Bruaroey f33f50277c Bug 1046245 - enumerateDevices (harmless interface version). r=smaug, r=jesup 2015-03-03 09:51:05 -05:00
Edwin Flores dd924e1125 Bug 1148699 - Fix race in CDM Session IDs - r=cpearce 2015-03-28 20:03:32 +13:00
Bobby Holley 4666516a8c Bug 1145686 - Assert state machine thread for SetState. r=jww
We assert in CheckInDecodeComplete as well for good measure, since that's the
last caller of SetState that doesn't already assert it.
2015-03-27 16:26:03 -07:00
Bobby Holley 01705d6512 Bug 1145686 - Make MDSM::StartBuffering happen on the state machine thread. r=jww 2015-03-27 16:26:02 -07:00
Bobby Holley 896a455d03 Bug 1145686 - Make MDSM::Shutdown happen on the state machine thread. r=jww 2015-03-27 16:26:02 -07:00
Daniel Holbert a8488fd0b6 Bug 1135541: Annotate new method "IsStillValid" in EME code as 'override'. rs=ehsan 2015-03-27 14:04:16 -07:00
Andrea Marchesini e6f385fb3d Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Bobby Holley 70685709f1 Bug 1144519 - Rename MediaDecoder::OnDecodeThread to MediaDecoder::OnDecodeTaskQueue. r=jya 2015-03-27 11:50:21 -07:00
Bobby Holley 3c6cda710d Bug 1144519 - Switch MediaDecoderReader subclasses to use OnTaskQueue(). r=jya 2015-03-27 11:50:20 -07:00
Bobby Holley e9a60fe021 Bug 1144519 - Rename MediaDecoderReader::OnDecodeThread to MediaDecoderReader::OnTaskQueue. r=jya 2015-03-27 11:50:20 -07:00
Bobby Holley bf4c9334cc Bug 1144519 - Rename MDSM::OnDecodeThread to MDSM::OnDecodeTaskQueue. r=jya 2015-03-27 11:50:19 -07:00
Bobby Holley aa048233f5 Bug 1144519 - Rename OnStateMachineThread-like functions to reflect the fact that it's a task queue. r=jya 2015-03-27 11:50:19 -07:00
Sotaro Ikeda 3a579f22dc Bug 1147435 - Fix SetDormant() handling in MediaOmxCommonDecoder r=cpearce 2015-03-26 20:57:42 -07:00
Geoff Brown 53daff6584 Bug 1140148 - Update mochitest manifests for Android 4.3 emulator; r=dminor 2015-03-26 20:35:35 -06:00
Ehsan Akhgari 55d22e403d Bug 1148230 - Eliminate the duplicate subexpression
This is leftover from bug 815643.  In that bug,
|destinationChannelL->length()| and |destinationChannelR->length()| both
end up being |destinationBus->mDuration| and I forgot to eliminate the
common subexpression.
2015-03-26 20:58:23 -04:00
Wes Kocher 5b6f65bcdb Merge m-c to inbound a=merge CLOSED TREE 2015-03-26 17:46:35 -07:00