Commit Graph

136 Commits

Author SHA1 Message Date
Randell Jesup
77ee2e1b15 Bug 1035819: patch 1 - Add notification of DirectListeners and generalize Notification of events r=roc 2014-07-14 01:47:56 -04:00
Karl Tomlinson
05746f1c8d b=1020411 correct control message order with RunAfterPendingUpdates() at shutdown r=roc
--HG--
extra : transplant_source : %AE%05%92%2C%60%9FL%D0%13O%EE%7D%09ZV%87%06%E9%B6%D8
2014-07-02 18:04:54 +12:00
Eric Rahm
116ff0ea43 Bug 1027573 - Crash when measuring memory in about:memory while using Web Audio. r=roc 2014-06-20 10:29:10 -07:00
Karl Tomlinson
9d196f97b5 b=1023697 add functions to convert between track ticks and seconds, and remove global MediaTime/second conversion functions r=roc
--HG--
extra : transplant_source : %F3%D8%C168%B7%A3%13%B2p%3Ee%89TkGlD%A8%A7
2014-06-12 16:45:00 +12:00
Karl Tomlinson
7b69861556 b=1023697 add functions to convert between track rates and remove global StreamTime/tick conversion functions r=roc
--HG--
extra : transplant_source : %B6%BC%83%17%22%EE%5D%BEl%B6%17m%1C%D0N%D1C%97%60%E1
2014-06-12 16:44:59 +12:00
Karl Tomlinson
a87b3e8941 b=1023697 add methods to MediaStream for tick and time conversions r=roc
When MediaTime depends on the audio rate of the graph, the stream will know the
graph rate and so can perform the conversion.

Existing methods in StreamBuffer.h and MediaSegment.h will be removed once
clients have been changed to the new methods.

--HG--
extra : transplant_source : %155uv%90%EC%81%C8%888%C4%17%AF%ED%1B%A0B%90%5E%26
2014-06-12 16:44:56 +12:00
Karl Tomlinson
a1f60f3113 b=1014862 assert that source track resamplers are used with the correct channel count r=padenot
--HG--
extra : rebase_source : cc28665fc90cf0bfc9f113b5e25f2c57a4948c9e
2014-06-09 12:11:41 +12:00
Karl Tomlinson
04329cfcdb b=1010000 update SourceMediaStream::Finish() doc as AdvanceKnownTracksTime() info is incorrect since e526d37a9a19 r=roc
--HG--
extra : transplant_source : B%92%A3%83K%D0%8AE%8A%F32%D1E%0F%DA%0E%C0%AE%27%03
2014-05-19 08:24:01 +12:00
Star Cheng
c6183f6ddf Bug 984498: To plumb audiochannel type from AudioContext to MediaStreamGraph r=roc 2014-04-18 17:23:36 +08:00
Carsten "Tomcat" Book
f4336f1541 Backed out changeset c07bced21c89 (bug 984498) for mochitest-1 bustage on a CLOSED TREE 2014-04-25 12:09:54 +02:00
Star Cheng
59feac455c Bug 984498: To plumb audiochannel type from AudioContext to MediaStreamGraph r=roc 2014-04-18 17:23:36 +08:00
Paul Adenot
aa81ed9e24 Bug 998179 - Refactor how MediaStreamGraph get and use their sample rate. r=roc
Use the sample rate passed to the OfflineAudioContext constructor in
MediaStreamGraph::CreateOfflineInstance, and pass the preferred mixer sample
rate to the (real time) MediaStreamGraph constructor.

Then, always use this sample rate for the lifetime of the graph.

This patch needed to pass the sample rate to the AudioMixer class to avoid
relying on globals like it was done before.

--HG--
extra : rebase_source : 2802208819887605fe26a7040998fc328b3c9a57
2014-04-23 11:20:56 +02:00
Carsten "Tomcat" Book
47979f8e8f Backed out changeset 1f410dde84d9 (bug 984498) 2014-04-23 08:20:37 +02:00
Star Cheng
857419fd92 Bug 984498: To plumb audiochannel type from AudioContext to MediaStreamGraph r=padenot 2014-04-23 09:58:38 +08:00
Eric Rahm
314e9711f0 Bug 967817 - Finish memory reporters for Web Audio. r=roc, njn 2014-04-13 11:08:10 -07:00
Randell Jesup
1977552fae Bug 919215: Drop queued audio data on low-latency startup, make AudioStream::Init() async r=roc,padenot 2014-04-09 15:59:07 -04:00
Paul Adenot
c906c38e32 Bug 982490 - Ensure for MSG cycle that each MediaStream write the same number of frames to their AudioStream. r=jesup,roc 2014-03-24 11:06:06 +01:00
Paul Adenot
651e03feb0 Bug 818822 - Resample all inputs of the MediaStreamGraph to the ideal audio rate. r=roc 2014-03-24 11:06:05 +01:00
Randell Jesup
f04d6425a9 Backed out changeset 5349ecd9c313 (bug 818822) 2014-04-07 15:40:55 -04:00
Randell Jesup
a8633fc661 Backed out changeset 87f437be7de5 (bug 982490) 2014-04-07 15:37:56 -04:00
Paul Adenot
3b43fdba8c Bug 982490 - Ensure for MSG cycle that each MediaStream write the same number of frames to their AudioStream. r=jesup,roc 2014-03-24 11:06:06 +01:00
Paul Adenot
3e5a0fb811 Bug 818822 - Resample all inputs of the MediaStreamGraph to the ideal audio rate. r=roc 2014-03-24 11:06:05 +01:00
Randell Jesup
2dfec0638c Backed out 965c62289427:cb894b5d342f for perma-orange on b2g emulator M10 r=backout 2014-04-02 17:11:12 -04:00
Paul Adenot
a996edae64 Bug 982490 - Ensure for MSG cycle that each MediaStream write the same number of frames to their AudioStream. r=jesup,roc 2014-03-24 11:06:06 +01:00
Paul Adenot
d3b8229033 Bug 818822 - Resample all inputs of the MediaStreamGraph to the ideal audio rate. r=roc 2014-03-24 11:06:05 +01:00
Daniel Holbert
0a7b04c924 Bug 984786 part 5: Give NS_INLINE_DECL_*REFCOUNTING classes private/protected destructor & MOZ_FINAL annotation where appropriate, in /content/media. r=kinetik 2014-04-02 09:21:11 -07:00
Karl Tomlinson
5ae65fd2c5 b=932400 rename ProduceOutput to ProcessInput r=roc
--HG--
extra : transplant_source : m0%91%3D%99%EB.%20%28%BD%B4%F4%A5%3F%0C%13%22%BA%FD%06
2014-03-05 10:53:55 +13:00
Chris Pearce
aa8aee7920 Bug 968016 - Use a SharedThreadPool of size 1 for the Media State Machine thread. r=kinetik
This makes it easy to share the state machine thread, and for it to shut down
automatically when the last reference is dropped to it.
2014-02-18 11:53:53 +13:00
Paul Adenot
77fe8ccc32 Bug 960057 - When an HTMLMediaElement outputs to a MediaStream, make sure to install the refill callback in any case. r=roc DONTBUILD 2014-02-14 10:38:58 -08:00
Paul Adenot
8185373937 Backed out changeset 4d0197840932 (bug 960057) for invalid bug number in the commit message. 2014-02-17 13:54:17 +01:00
Paul Adenot
34a3734b1a Bug 960059 - When an HTMLMediaElement outputs to a MediaStream, make sure to install the refill callback in any case. r=roc
--HG--
extra : rebase_source : a690159d6395ed7bab2a053bbb1cc65e11bb8be6
2014-02-14 10:38:58 -08:00
Robert O'Callahan
09bac2f130 Bug 943461. Part 13: Keep producing silence in AudioNodeStreams' mLastChunks even after they've finished r=padenot
Without this the last before-finished audio block gets picked up by downstream
ObtainInputBlock calls.

--HG--
extra : rebase_source : d7f804cea59454bdb0aa5931d19bcc123e0d16cb
2013-12-10 13:49:03 +13:00
Robert O'Callahan
27ac5e476a Bug 943461. Part 11: Don't tear down an OfflineAudioContext until its current time has actually reached its end, to ensure that all relevant stream state changes have been forwarded to the main thread. r=padenot
--HG--
extra : rebase_source : 32b9a4cf4c39edfabf5be17cec50a676f1ad4641
2013-12-09 18:08:02 +13:00
Robert O'Callahan
0e1cc53aae Bug 943461. Part 5: Don't allow a stream to finish before it has produced output up to mStateComputedTime. r=padenot
--HG--
extra : rebase_source : 9bf003c246b63b1dd64665024533fda74a8e1fa4
2013-12-06 09:23:57 +13:00
Paul Adenot
371ad746eb Bug 916384 - Stop calling onaudioprocess on the ScriptProcessorNode it has no inputs or outputs. r=roc
Quoting the spec: "audioprocess events are only dispatched if the
ScriptProcessorNode has at least one input or one output connected".

--HG--
extra : rebase_source : bbf52a183a55b75d394a885624a4080a9467fac4
2013-12-12 15:31:51 +01:00
Paul Adenot
45ee5216e9 Bug 916384 and 944707 - Backed out fa872452b89d and 012b1baf2b19 for crashes on a CLOSED TREE. 2013-12-11 16:31:35 +01:00
Paul Adenot
b7e2b9858e Bug 916384 - Stop calling onaudioprocess on the ScriptProcessorNode if it has no inputs and outputs. r=roc
Quoting the spec: "audioprocess events are only dispatched if the
ScriptProcessorNode has at least one input or one output connected".

--HG--
extra : rebase_source : 93881fb4395744dc0adbb6df7ee146ef70ce42d2
2013-12-10 14:41:41 +01:00
Robert O'Callahan
d51f35eb1a Bug 938022. Part 5: Add aCurrentTime parameter to MediaStreamListener::NotifyOutput and fire notifications when the MediaStreamGraph is in a good state. r=padenot
--HG--
extra : rebase_source : 79edce8650fdb7af315df5006ec3b91dc9fd869f
2013-11-26 00:59:49 +13:00
Chris Double
9e246ccf6b Bug 939716 - Destructor for MediaStreamGraph should be virtual - r=roc
The destructor for MediaStreamGraph is non-virtual but it has a
derived class, MediaStreamGraphImpl, that overrides the destructor.
This destructor won't be called if an instance is deleted using a
pointer type of MediaStreamGraph.

It's unclear whether this actually happens but MediaStreamGraph.cpp
has code that creates a MediaStreamGraphImpl and returns it as a
MediaStreamGraph.

--HG--
extra : rebase_source : 9d006e5bf9bb056b5a54fc7aec159c26376c1459
2013-11-19 02:09:47 +13:00
Karl Tomlinson
7d5f234734 b=923301 use MediaStreamGraph to dispatch PlayingRefChangeHandlers r=roc
This reduces the number of events dispatched to the main thread
and ensures these run in order with other pending updates.

--HG--
extra : transplant_source : %5E%235%DEz%EB%7D%C6%C7%F8%AF%A3%84%1F%F9%5B%87D%B3%13
2013-10-25 12:12:33 +13:00
Karl Tomlinson
5e0ead518c b=923301 remove now-unused GetCurrentGraphUpdateIndex() and rename mGraphUpdatesSent to mNextGraphUpdateIndex r=roc
--HG--
extra : transplant_source : %B6%E8%FF%F8%CA%CCWo%D0%82s%FC%92C%F5L%D9%3D%81%88
2013-10-25 12:12:00 +13:00
Karl Tomlinson
d0796ca005 b=923301 add MediaStreamGraph::RunAfterPendingUpdates() r=roc
--HG--
extra : transplant_source : %89%21%AE%87%C7%9C%07%28%3D%60T%83%16n%DC%C9O%87iy
2013-10-25 12:07:29 +13:00
Paul Adenot
00111b2b51 Bug 918861 - Allow the MSG to choose a better samplerate than 48000Hz. r=roc
--HG--
extra : rebase_source : 2181ccbbdca370031d1d3ae5b44ef4e37a3e948c
2013-10-17 15:44:52 +02:00
Benoit Jacob
229d2760cd Bug 913847 - Include MainThreadUtils.h instead of nsThreadUtils.h - r=ehsan 2013-09-19 09:54:42 -04:00
Paul Adenot
a37178b018 Bug 881959 - Clamp the DelayNode.delayTime to 128/AudioContext.sampleRate when in a cycle. r=ehsan
--HG--
extra : rebase_source : 7cf8945371bb6ff169ad61a8ccdda0ece36b5e83
2013-09-02 15:15:24 +02:00
Ehsan Akhgari
7763e90cd9 Bug 881959 - Tell the MediaStreamGraph when changes to the graph occur. r=roc
--HG--
extra : rebase_source : f5c0021e35fa0b66cc45434b5d23742ff3cc3019
2013-09-13 18:12:07 +02:00
Wes Kocher
0b90687d1e Backed out changeset 040522aacba4 (bug 913847) 2013-09-18 17:18:56 -07:00
Benoit Jacob
5526ea7b69 Bug 913847 - Include MainThreadUtils.h instead of nsThreadUtils.h - r=ehsan 2013-09-18 18:50:32 -04:00
Ed Morley
63e17f1c16 Backed out changeset fe576415129e (bug 881959) 2013-09-17 17:14:52 +01:00
Ed Morley
72dc9a81ef Backed out changeset 2aa38a1a2b06 (bug 881959) 2013-09-17 17:14:42 +01:00