Commit Graph

1587 Commits

Author SHA1 Message Date
Ehsan Akhgari
8a790ac960 Bug 836599 - Part 1: Make MediaStream aware of its owner graph; r=roc
We need to make sure that MediaStream doesn't assume that it belongs
to the global graph so that we can have multiple graphs coexisting.
2013-02-01 14:43:36 -05:00
John Schoenick
bb3a613b83 Bug 837427 - Include gstreamer cflags in content/media/webaudio; r=ehsan 2013-02-05 13:34:19 -05:00
Ehsan Akhgari
f39e83f1de Bug 836076 - Part 3: Make AudioParams call back into their owning node when they're modified; r=roc
We need this in order to update the MediaStreamGraph thread when an
AudioParam changes.  This enables each AudioParam to be registered with
a callback from its owner node, so that the owner node can have custom
processing code for each AudioParam's mutation.
2013-01-28 18:59:29 -05:00
Ehsan Akhgari
332078a8e8 Bug 836076 - Part 2: Make it possible to send AudioEventTimeline objects as commands to the MSG thread; r=roc 2013-01-28 17:42:27 -05:00
Ehsan Akhgari
b25088eff4 Bug 836076 - Part 1: Move AudioEventTimeline.h to content/media; r=roc
--HG--
rename : content/media/webaudio/AudioEventTimeline.h => content/media/AudioEventTimeline.h
2013-01-28 17:21:43 -05:00
Ehsan Akhgari
1bf3a44ce2 Bug 804387. Part 11: Fix testcase to expect correct sample rate. r=roc
--HG--
extra : rebase_source : aabab48ccaa6cbfacc2d22a425574d6e5b4109ee
2013-01-25 16:44:28 -05:00
Ehsan Akhgari
c9672d8e62 Bug 804387. Part 10: Add a mechanism for ensuring that we don't attempt to allocate an input port if the input node is not hooked up to MSG yet. r=roc
--HG--
extra : rebase_source : dc3a202cbb94c266f6df4b0c1b5247522fc76658
2013-01-25 16:39:51 -05:00
Robert O'Callahan
088271f880 Bug 804387. Part 9: Update WebAudio implementation to integrate with AudioNodeStream. r=ehsan
This is a mega-patch that was too hard to disentangle. Here's what it does:
-- Create infrastructure around AudioNode::UpdateOutputEnded to detect
when a node can no longer produce any output. When that becomes true,
disconnect it from the AudioNode graph.
-- Have AudioNode implement JSBindingFinalized to use as input in
UpdateOutputEnded.
-- Give every AudioNode a MediaStream, and give every connection
a MediaInputPort.
-- Actually play the audio that reaches the AudioContext's destination node.
-- Force AudioContext to use the audio sample rate defined by MediaStreamGraph.
-- Fix AudioBufferSourceNode's start and stop methods to possibly throw and
take default 'when' parameters.
-- Create an AudioNodeStream for AudioBufferSourceNode and give it a
AudioBufferSourceNodeEngine that does what's needed. Set parameters for
this engine in the start() and stop() methods.
-- Create AudioBuffer::GetThreadSharedChannelsForRate, which is responsible
for stealing the contents of any JS array buffers, and bundling them up
into a thread-shared read-only buffer object which can be used as
part of an AudioChunk. This method will also be responsible for
resampling and caching as necessary.

--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
extra : rebase_source : 9fa0ec0efa304acd6513e427103d6339c78efa53
2013-02-05 12:07:25 +13:00
Robert O'Callahan
f76919f8a0 Bug 804387. Part 8: Create AudioNodeEngine and AudioNodeStream. r=jesup
Modifies MediaStreamGraph to always advance its time by a multiple of
WEBAUDIO_BLOCK_SIZE.

--HG--
extra : rebase_source : 99524b09edd4ac0e1bc6607f2ba14925bc2f11c2
2013-01-14 11:46:57 +13:00
Robert O'Callahan
945784894e Bug 804387. Part 7.5: Make Web Audio tests context-rate-independent (disabling some decodeAudioData tests). r=ehsan
--HG--
extra : rebase_source : c625c50a08da1871e79851c2a824b0e3ea170eba
2013-02-05 10:57:36 +13:00
Robert O'Callahan
7654ac0348 Bug 804387. Part 7.2: Let BiquadFilterNode use the actual context sample rate. r=ehsan
--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
extra : rebase_source : 3d50af2ff2dff9fa047d59d0f3c815dec5cc686c
2013-02-05 10:55:50 +13:00
Robert O'Callahan
edc4fc64a2 Bug 804387. Part 7: Use a static_cast instead of dynamic check when processing ProcessedMediaStream message. r=jesup
--HG--
extra : rebase_source : 3eb9264b706e19ac19ebf2377a33871be4cbe981
2013-02-04 23:04:26 +13:00
Robert O'Callahan
e24fa5a4c9 Bug 804387. Part 6: ChangeExplicitBlockerCountImpl takes a GraphTime, not a StreamTime. r=jesup
--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
extra : rebase_source : c51cb893c9b6121e00a38f105f2efd2e8d70094d
2013-02-04 23:04:26 +13:00
Robert O'Callahan
32ddb352da Bug 804387. Part 5: Add MediaStream::GraphTimeToStreamTimeOptimistic and MediaStream::StreamTimeToGraphTime. r=jesup
--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
extra : rebase_source : 0e08f9bb0c544b44ab4953a0f00cae233cd488c7
2013-02-04 23:04:26 +13:00
Robert O'Callahan
a83ff07d2b Bug 804387. Part 4: Move MediaStreamGraphImpl to its own header file. r=jesup
--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
extra : rebase_source : 3413667aa3a11c634f703db4031e3c2b0b1e018e
2013-02-04 23:04:25 +13:00
Robert O'Callahan
2785a28dd0 Bug 804387. Part 3: When a global underrun happens, don't insert blocked time, just cut that time out of the entire MediaStreamGraph timeline instead. r=jesup
--HG--
extra : rebase_source : 94f166e66f5401130b27867dd2b5ca039c704f14
2013-02-04 23:04:25 +13:00
Robert O'Callahan
07374ef1bf Bug 804387. Part 2: Fix misleading parameter name; these are NOT exactly microseconds. r=jesup
--HG--
extra : rebase_source : da23d4a4e5a9804b3c3ca19183ae048bf6012152
2013-02-04 23:04:25 +13:00
Robert O'Callahan
1a0f7249d1 Bug 804387. Part 1.5: Clean up main-thread MediaStream event listeners. r=jesup
There is no need for these to be independent objects in general and we
don't need to addref/release them. We can just require the caller to
remove them before they die.
We can also save some refcount churn by having
DispatchToMainThreadAfterStreamStateUpdate take already_AddRefed.

--HG--
extra : rebase_source : 751114a1befd73b405dff3ee986496efb6f76201
2013-02-04 23:04:24 +13:00
Robert O'Callahan
96c21b198b Bug 804387. Part 1: Make AllocateInputPort addref the returned port. r=jesup
--HG--
extra : rebase_source : a0e4d7889598577a540f132f4190225ecf12fdfb
2012-11-23 11:25:05 +13:00
Ehsan Akhgari
631b308649 Backed out 14 changesets (bug 804387) because of Android M2 crashes
Backed out changeset 80e8530f06ea (bug 804387)
Backed out changeset 3de2271ad47f (bug 804387)
Backed out changeset 00f86870931c (bug 804837)
Backed out changeset 0e3f20927c50 (bug 804387)
Backed out changeset e6ef90038007 (bug 804387)
Backed out changeset 0ad6f67a95f9 (bug 804387)
Backed out changeset d0772aba503c (bug 804387)
Backed out changeset 5477b87ff03e (bug 804387)
Backed out changeset 1d7ec5adc49f (bug 804387)
Backed out changeset 11f4d740cd6c (bug 804387)
Backed out changeset e6254d8997ab (bug 804387)
Backed out changeset 372322f3264d (bug 804387)
Backed out changeset 53d5ed687612 (bug 804387)
Backed out changeset 000b88ac40a7 (bug 804387)
2013-02-05 01:29:28 -05:00
Ehsan Akhgari
748ef8700c Backed out 3 changesets (bug 836076) becasue bug 804387 is getting backed out
Backed out changeset d567b1bb34ad (bug 836076)
Backed out changeset 51f7c9e31f9a (bug 836076)
Backed out changeset 901c735274bc (bug 836076)

--HG--
rename : content/media/AudioEventTimeline.h => content/media/webaudio/AudioEventTimeline.h
2013-02-05 01:28:38 -05:00
Ehsan Akhgari
ded3e498cd Bug 836076 - Part 3: Make AudioParams call back into their owning node when they're modified; r=roc
We need this in order to update the MediaStreamGraph thread when an
AudioParam changes.  This enables each AudioParam to be registered with
a callback from its owner node, so that the owner node can have custom
processing code for each AudioParam's mutation.
2013-01-28 18:59:29 -05:00
Ehsan Akhgari
3b924bf73e Bug 836076 - Part 2: Make it possible to send AudioEventTimeline objects as commands to the MSG thread; r=roc 2013-01-28 17:42:27 -05:00
Ehsan Akhgari
2b60abd278 Bug 836076 - Part 1: Move AudioEventTimeline.h to content/media; r=roc
--HG--
rename : content/media/webaudio/AudioEventTimeline.h => content/media/AudioEventTimeline.h
2013-01-28 17:21:43 -05:00
Ehsan Akhgari
52b9fcea54 Bug 804387. Part 11: Fix testcase to expect correct sample rate. r=roc 2013-01-25 16:44:28 -05:00
Ehsan Akhgari
979dd3370b Bug 804387. Part 10: Add a mechanism for ensuring that we don't attempt to allocate an input port if the input node is not hooked up to MSG yet. r=roc 2013-01-25 16:39:51 -05:00
Robert O'Callahan
45c5e4a1ad Bug 804837. Part 9: Update WebAudio implementation to integrate with AudioNodeStream. r=ehsan
This is a mega-patch that was too hard to disentangle. Here's what it does:
-- Create infrastructure around AudioNode::UpdateOutputEnded to detect
when a node can no longer produce any output. When that becomes true,
disconnect it from the AudioNode graph.
-- Have AudioNode implement JSBindingFinalized to use as input in
UpdateOutputEnded.
-- Give every AudioNode a MediaStream, and give every connection
a MediaInputPort.
-- Actually play the audio that reaches the AudioContext's destination node.
-- Force AudioContext to use the audio sample rate defined by MediaStreamGraph.
-- Fix AudioBufferSourceNode's start and stop methods to possibly throw and
take default 'when' parameters.
-- Create an AudioNodeStream for AudioBufferSourceNode and give it a
AudioBufferSourceNodeEngine that does what's needed. Set parameters for
this engine in the start() and stop() methods.
-- Create AudioBuffer::GetThreadSharedChannelsForRate, which is responsible
for stealing the contents of any JS array buffers, and bundling them up
into a thread-shared read-only buffer object which can be used as
part of an AudioChunk. This method will also be responsible for
resampling and caching as necessary.
2013-02-05 12:07:25 +13:00
Robert O'Callahan
f4306b8a20 Bug 804387. Part 8: Create AudioNodeEngine and AudioNodeStream. r=jesup
Modifies MediaStreamGraph to always advance its time by a multiple of
WEBAUDIO_BLOCK_SIZE.
2013-01-14 11:46:57 +13:00
Robert O'Callahan
6cc145cc76 Bug 804387. Part 7.5: Make Web Audio tests context-rate-independent (disabling some decodeAudioData tests). r=ehsan 2013-02-05 10:57:36 +13:00
Robert O'Callahan
110a477f0e Bug 804387. Part 7.2: Let BiquadFilterNode use the actual context sample rate. r=ehsan 2013-02-05 10:55:50 +13:00
Robert O'Callahan
6a9acef289 Bug 804387. Part 7: Use a static_cast instead of dynamic check when processing ProcessedMediaStream message. r=jesup 2013-02-04 23:04:26 +13:00
Robert O'Callahan
e68da80237 Bug 804387. Part 6: ChangeExplicitBlockerCountImpl takes a GraphTime, not a StreamTime. r=jesup 2013-02-04 23:04:26 +13:00
Robert O'Callahan
05be93cc6b Bug 804387. Part 5: Add MediaStream::GraphTimeToStreamTimeOptimistic and MediaStream::StreamTimeToGraphTime. r=jesup 2013-02-04 23:04:26 +13:00
Robert O'Callahan
be9e936592 Bug 804387. Part 4: Move MediaStreamGraphImpl to its own header file. r=jesup
--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
2013-02-04 23:04:25 +13:00
Robert O'Callahan
5350b6e757 Bug 804387. Part 3: When a global underrun happens, don't insert blocked time, just cut that time out of the entire MediaStreamGraph timeline instead. r=jesup 2013-02-04 23:04:25 +13:00
Robert O'Callahan
900a1da80e Bug 804387. Part 2: Fix misleading parameter name; these are NOT exactly microseconds. r=jesup 2013-02-04 23:04:25 +13:00
Robert O'Callahan
e924eeca9a Bug 804387. Part 1.5: Clean up main-thread MediaStream event listeners. r=jesup
There is no need for these to be independent objects in general and we
don't need to addref/release them. We can just require the caller to
remove them before they die.
We can also save some refcount churn by having
DispatchToMainThreadAfterStreamStateUpdate take already_AddRefed.
2013-02-04 23:04:24 +13:00
Robert O'Callahan
11a2cb4a33 Bug 804387. Part 1: Make AllocateInputPort addref the returned port. r=jesup 2012-11-23 11:25:05 +13:00
Chris Pearce
a0a8f9ba33 Bug 836927 - Bustage fix. r=bustage 2013-02-05 10:57:29 +13:00
Chris Pearce
67fcb5bebb Bug 836927 - Make WMFByteStream bug compatible with WMF's IMFByteStream implementation. r=padenot 2013-02-05 10:34:23 +13:00
Chris Pearce
7ca4ca34ee Bug 830172 - Use a shared nsIThreadPool instead of one MFWorkQueue per WMFByteStream instance. r=padenot 2013-02-05 10:33:52 +13:00
Ehsan Akhgari
15a672004e Export MediaBufferDecoder.h, no bug 2013-02-04 13:16:57 -05:00
Paul Adenot
3c65fa8d38 Bug 804875 - Change the test, because mozFrameDelay can be 0, on a CLOSED TREE. 2013-02-04 17:37:53 +01:00
Paul Adenot
844ae24f16 Bug 804875 - Fix bustage on a CLOSED TREE. r=me 2013-02-04 15:21:44 +01:00
Matthew Gregan
807e9f0e6e Bug 835075 - Modify the mochitest. r=padenot 2013-02-04 14:08:47 +01:00
Paul Adenot
17f7e6edef Bug 804875 - Reset all the members of the VideoFrameComtainer in the Reset method. r=kinetik 2013-01-31 15:41:05 +01:00
Paul Adenot
34b0e94778 Bug 804875 - Test to check that media elements are reset appropriatly on source change. r=kinetik 2012-12-28 22:54:23 +01:00
Paul Adenot
7712541f3b Bug 804875 - Reset media element when loading a new src. r=kinetik 2012-12-27 16:21:30 +01:00
Ehsan Akhgari
b3f344575f Bug 792263 follow-up: Use class instead of struct to satisfy pesky compiler warnings (or rather, errors)
--HG--
extra : rebase_source : 900df4204ac807bb9d8e35d2837971905ecde151
2013-02-01 18:11:25 -05:00
Ehsan Akhgari
1090ae9f96 Bug 792263 - Implement decodeAudioData; r=bzbarsky,cpearce,padenot 2013-02-01 17:13:23 -05:00