Commit Graph

284 Commits

Author SHA1 Message Date
Randell Jesup
585e01b267 Bug 1054166: Mirror Add/RemoveListener in Add/RemoveDirectListener r=roc 2014-08-17 02:09:21 -04:00
Paul Adenot
6297bc58f8 Bug 1046930 - Fix loop index when sending the status of the microphone to the AudioStream. r=jesup 2014-08-01 15:29:19 +02:00
Karl Tomlinson
8ff2a07095 b=1033122 be consistent about speex_resampler symbol visibility r=khuey
When "speex/speex_resampler.h" was included, another exported header (in
dist/include) would find the speex/speex_resampler.h in dist/include before
dist/system_wrappers.  Visibility of undefined symbols depended on the order
of includes.

This patch changes includes to <speex/speex_resampler.h> so that
WRAP_SYSTEM_INCLUDES works as expected but removes the wrapper when not using
GKMEDIAS_SHARED_LIBRARY.

--HG--
extra : rebase_source : 93ca1dbdd6b489647624326e78539f44c60d0b34
2014-07-02 14:21:34 +12:00
Paul Adenot
8368a7bfe6 Bug 1027713 - Part 5 - Trigger the panning logic on stream creation. r=jesup
UpdateStreamOrder is not called often because it's expensive (it's called only
when the graph topology changed), and it's earlier in the MSG loop than the
audio stream creation, so we need to tell the newly created AudioStream that a
microphone is active on creation as well.

The panning logic is also now triggered on stream start, because it is async.
2014-07-29 18:45:05 +02:00
Paul Adenot
ae5c8c7f2b Bug 1027713 - Part 4 - Pan audio to the right when we are using gUM and outputing sound using MacBookPro speakers. r=jesup 2014-07-29 18:45:03 +02:00
Karl Tomlinson
8cf6207e6c b=1022945 only AppendToTrack before SourceMediaStreams are destroyed r=roc
--HG--
extra : rebase_source : 016877261fb7a10b6d99abd17a8ca26b222d38c4
2014-07-25 09:23:59 +12:00
Karl Tomlinson
362bf935fb b=1022945 null MediaInputPort::mGraph when removing port from graph r=roc
This shouldn't be necessary, if clients do the right things, but provides some
safety, in case they don't.

--HG--
extra : rebase_source : e64d663c27f03eff35f538c205cd66d42420d9e4
2014-07-25 09:18:38 +12:00
Karl Tomlinson
475c0c12d9 b=1022945 null MediaStream::mGraph before removing stream from graph r=roc
and use mGraph to test whether SourceMediaStreams are destroyed.

--HG--
extra : rebase_source : 03df9e7ab14ecd627dfeb333b79713a7b619f215
2014-07-25 09:09:22 +12:00
Karl Tomlinson
3f2f349681 b=1022945 remove SetStreamOrderDirty call from ProcessedMediaStream::DestroyImpl r=roc
The stream order is only important if there are connections, in which case
MediaInputPort::Disconnect() calls SetStreamOrderDirty().

MediaStreamGraphImpl::RemoveStream() also calls SetStreamOrderDirty(), which
ensures that mFirstCycleBreaker is updated when necessary.

--HG--
extra : rebase_source : b437f0d078a481725579456d91acc32353e1221a
2014-07-25 08:36:07 +12:00
Karl Tomlinson
a7a9ce2d81 b=1041466 don't remove one too many streams from the SCC stack r=roc
Also reduce the number of ProcessedMediaStream* static_casts and use a new
variable name |removed| to emphasize what is happening.

--HG--
extra : rebase_source : 50b6c5e2d97a2e4ffbf9db993e1327de8c1d7b36
2014-07-24 21:58:01 +12:00
Wes Kocher
a77e5f5308 Backed out 8 changesets (bug 1023947, bug 1027713) for frequent Cppunit test failures
Backed out changeset 03edb1ab3182 (bug 1027713)
Backed out changeset ad05dc816fa0 (bug 1023947)
Backed out changeset a56aad94c7c9 (bug 1023947)
Backed out changeset 63af4528bd9c (bug 1023947)
Backed out changeset b6bb38846333 (bug 1027713)
Backed out changeset c0045bb1849e (bug 1027713)
Backed out changeset 274b2b25d167 (bug 1027713)
Backed out changeset e0bba6f4966f (bug 1027713)
2014-07-24 13:57:03 -07:00
Paul Adenot
9499df2a4c Bug 1027713 - Part 5 - Trigger the panning logic on stream creation. r=jesup
UpdateStreamOrder is not called often because it's expensive (it's called only
when the graph topology changed), and it's earlier in the MSG loop than the
audio stream creation, so we need to tell the newly created AudioStream that a
microphone is active on creation as well.

The panning logic is also now triggered on stream start, because it is async.
2014-07-24 17:05:24 +02:00
Paul Adenot
0a01a0eb15 Bug 1027713 - Part 4 - Pan audio to the right when we are using gUM and outputing sound using MacBookPro speakers. r=jesup
--HG--
extra : rebase_source : d77a3e6d17b237dc46301a34ed36b6d3e8e0aeda
2014-07-24 17:05:23 +02:00
Karl Tomlinson
9c5ba748c6 b=932400 change stream ordering to get feedback DelayNode output before supplying input r=roc
Previously downstream nodes from DelayNodes in cycles sometimes received stale
output from the previous MSG iteration.

Also, if two cycles share a common path, they will now *both* be treated as
cycles, either by muting or by enforcing minimum delay.  Previously, marking
one cycle first could prevent detection of other cycles in the same SCC.

--HG--
extra : rebase_source : 82892c538c5ce514165b5f975474df15b99e3d2b
2014-07-17 12:55:55 +12:00
Karl Tomlinson
d733f40c91 b=932400 remove refcount manipulation of streams when reordering for processing r=roc
--HG--
extra : rebase_source : f99f4220b53a28a32e9a294b67f4db6218113d73
2014-07-07 11:52:25 +12:00
Randell Jesup
ee8f20f154 Bug 1035819: patch 1 - Add notification of DirectListeners and generalize Notification of events r=roc 2014-07-14 01:47:56 -04:00
Eric Rahm
39dc6549a4 Bug 1036679 - MediaStreamGraph shutdown can hang if happening in conjunction with a memory report. r=roc 2014-07-09 17:22:37 -07:00
Karl Tomlinson
c0e5a1422e 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
Karl Tomlinson
74ef5b1730 b=1027963 count ticks remaining in PlayAudio() better when blocking changes r=padenot
The previous code could result in an infinite loop.

--HG--
extra : transplant_source : %DB%20%2C%A3%26%A1%B0%00E%0B%85v%DC%1F0%F1%81Tm%9B
2014-07-01 18:21:57 +12:00
Paul Adenot
812ddf8e87 Bug 1028458 - Don't try to use a resampler when resampling segments to graph rate if we haven't instanciated one yet. r=karlt
--HG--
extra : rebase_source : 3b7696b3e89c1be0e338893578d81088f7182a3b
2014-06-26 14:01:01 +02:00
Benoit Jacob
577be64bf4 Bug 1028588 - Fix dangerous public destructors in content/media/ - r=cpearce,smaug 2014-06-24 12:36:43 -04:00
JW Wang
21312d0686 Bug 750258 - include |nextCurrentTime| when calculating whether to call NotifyBlockingChanged(). r=roc 2014-06-22 20:21:00 +02:00
Eric Rahm
f203ad2a35 Bug 1027573 - Crash when measuring memory in about:memory while using Web Audio. r=roc 2014-06-20 10:29:10 -07:00
Nicholas Nethercote
bb9d51e11e Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg.
--HG--
extra : rebase_source : 5eb756b17a97e751deb0f47e909fdb35533cb23b
2014-05-20 23:06:54 -07:00
Karl Tomlinson
1a7b58ab55 b=1023697 use audio ticks for graph time units r=roc
--HG--
extra : transplant_source : 8%BA%9D%5C%E32%05x%A79K%08TH%A7%F4%F2tg%EC
2014-06-12 16:45:00 +12:00
Karl Tomlinson
919d411be0 b=1023697 use 0 for initial graph time r=roc
We could get away with 1 as an initial time when units were 1/(1<<20) seconds
but when graph time units are audio samples, an initial value of 1 will mean
that the first audio block produced has 1 frame fewer.

--HG--
extra : transplant_source : %FF%D5%AF%A9%C7%EA%C4%D7%ED%8F%CC%AC%E4%5E%FF%D0%87%8D%3AN
2014-06-12 16:45:00 +12:00
Karl Tomlinson
204d77eaf8 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
186aab0feb b=1023697 record the graph tick rate on StreamBuffer and its Tracks for StreamTime calculations r=roc
--HG--
extra : transplant_source : 8%B4%DB%A4%FE%2C%B7%235%7F%7D5%2C%FA%BA%0D%9E%CC%7E%11
2014-06-12 16:44:59 +12:00
Karl Tomlinson
a9a8a4cee4 b=995690 don't advance audio output stream position 1 tick beyond what has been produced r=roc
This may result in repeating a sample sometimes due to rounding effects, but
that should only happen once per unblocked sequence of track frames.

--HG--
extra : transplant_source : %0C%E9%A4jq%286%96%B1%A9%AE%9F%1Cr%DCK%8F%AF%92i
2014-06-12 16:41:29 +12:00
Karl Tomlinson
2d4e3075a2 b=995690 correct mLastTickWritten to only advance when not blocked r=roc
mLastTickWritten and offset are stream positions, which do not advance when
the stream is blocked.

--HG--
extra : transplant_source : %15%7B%E5%E9.%89%BC%1E%F8%92%FD%3D%CB%10%FC%AD%EAT%90-
2014-06-12 16:40:51 +12:00
Karl Tomlinson
0ad2c41273 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
bf3d4ed619 b=1016177 reduce MEDIA_TIME_MAX to not overflow when multiplying by sample rates r=roc
MediaTimes are multiplied by sample rates when converting to ticks.

This new maximum leaves 24 bits to count seconds, which corresponds to 194
days.

TimeVarying::GetAt() can return INT64_MAX, which may be > GRAPH_TIME_MAX.

The "Start time too early" assertion would now fail because conversion of
STREAM_TIME_MAX to ticks no longer overflows.

--HG--
extra : rebase_source : b49c95315d0c633f191ff68aab0b5b7aa04c6e38
2014-06-05 22:08:05 +12:00
Karl Tomlinson
6f94b1e656 b=1015025 use a consistent reference timestamp for graph time to avoid accumulating drift from rounding to MediaTime r=roc
--HG--
extra : transplant_source : 2%B9y%D4%80%DA/qqx%C5%F5%86%8CoT%B9S%19%D9
2014-05-26 11:26:52 +12:00
Kyle Huey
941a5ee91b Bug 996133: Remove unnecessary NS_DISPATCH_NORMAL arguments to NS_DispatchToMainThread. r=ehsan 2014-05-23 12:53:17 -07:00
Paul Adenot
b3817a670f Backed out changeset 8dd41701dd92 (bug 989921) on a CLOSED TREE 2014-05-22 14:49:10 +02:00
Paul Adenot
6b08a02243 Bug 989921 - Allow the MediaStreamGraph mixer to send data back to multiple consumers. r=jesup 2014-05-22 13:40:51 +02:00
Karl Tomlinson
7d54d52097 b=1010000 update mTracksKnownTime when finishing a stream r=roc
and use this in StreamBuffer::GetAllTracksEnd() to detect when no more tracks
will be added.

--HG--
extra : transplant_source : %B7A-%7EV%94%E1%CE%15%1C%15%7B%84%D5%F1%1D%A2%CF%EC%15
2014-05-19 08:26:54 +12:00
Paul Adenot
2e00926d9d Bug 998711. r=jesup 2014-04-25 15:15:21 +02:00
Birunthan Mohanathas
504b581650 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Star Cheng
bb4b02ccc8 Bug 984498: To plumb audiochannel type from AudioContext to MediaStreamGraph r=roc 2014-04-18 17:23:36 +08:00
Carsten "Tomcat" Book
e3186c8910 Backed out changeset c07bced21c89 (bug 984498) for mochitest-1 bustage on a CLOSED TREE 2014-04-25 12:09:54 +02:00
Star Cheng
5fa7e47c34 Bug 984498: To plumb audiochannel type from AudioContext to MediaStreamGraph r=roc 2014-04-18 17:23:36 +08:00
Paul Adenot
bbf8c9bb33 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
4a9ab93246 Backed out changeset 1f410dde84d9 (bug 984498) 2014-04-23 08:20:37 +02:00
Star Cheng
975949c758 Bug 984498: To plumb audiochannel type from AudioContext to MediaStreamGraph r=padenot 2014-04-23 09:58:38 +08:00
Jan Beich
f34bd92e17 Bug 996433 - Sprinkle MOZ_WEBRTC ifdefs to unbreak --disable-webrtc after bug 694814. r=jesup 2014-04-21 09:15:34 +02:00
Eric Rahm
1e1f443953 Bug 967817 - Finish memory reporters for Web Audio. r=roc, njn 2014-04-13 11:08:10 -07:00
Paul Adenot
d2d43ae249 Bug 997229 - Don't call IdealAudioRate on an offline MediaStreamGraph r=roc
--HG--
extra : rebase_source : 44aec47b98965a663600a84c630c0f89239842a6
2014-04-17 11:15:47 +02:00
Randell Jesup
095ff2b262 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
Jan Beich
306d4e2156 Bug 995543 - Unbreak libc++ build after bug 982490 by using more portable mozilla::Abs. r=jesup 2014-04-13 15:41:07 -04:00