Commit Graph

432 Commits

Author SHA1 Message Date
JW Wang
89a23d426c Bug 1219169. Part 1 - Remove AbstractMediaDecoder::OnStateMachineTaskQueue(). r=jya. 2015-11-02 10:36:48 +08:00
Karl Tomlinson
6f17ae280f bug 1187785 bind frequencyIndex by value instead of reference
to test all indices, not the last one several times.

--HG--
extra : rebase_source : 8176094474ddfefcc4e021f772a211577b5ec3f8
2015-10-30 10:07:14 +13:00
Karl Tomlinson
08b9621b96 bug 1220042 make AlignedTArray base class inheritance private r=jwwang
because base class methods will not be safe with different Elements() and
Length() methods.

--HG--
extra : rebase_source : 7616f0eb12e1d8098620682f6eb9b4c5f40f873f
2015-10-29 22:58:10 +13:00
Paul Adenot
b42848e60e Bug 1218694 - Return the AudioNode connected to when calling AudioNode.connect(). r=smaug
--HG--
extra : rebase_source : c5a58a51f1f43aad2fe64d872009dee88c564503
2015-10-28 13:54:35 +09:00
Dan Minor
b08af755c4 Bug 1214545 - Update getFrequencyResponse to have NaN at index with invalid frequencies r=padenot
--HG--
extra : commitid : KEtSH8KHUDX
extra : rebase_source : fbcf1714a66629b473a693c548f2e6eebef22ee6
2015-10-20 23:36:45 -04:00
Julian Seward
8bd076f172 Bug 1216081 - OscillatorNodeEngine::mFinalFrequency is used uninitialised. r=padenot. 2015-10-20 12:59:37 +02:00
Karl Tomlinson
5db355303c bug 1020370 use int64_t to avoid overflow in subsample calcs r=padenot
ratioDen can be large when playbackRate is low.

Subsample skipping is limited to uint32_t values supported by speex resampler.

--HG--
extra : rebase_source : 26a14f212b5fd3fdd62820f458db3a7cf3673e93
extra : histedit_source : 733829a4b2ba6aab7c651f362dbc47553f9dfc59
2015-10-16 11:56:24 +13:00
Karl Tomlinson
c31207d4a3 bug 1020370 adjust assert to tolerate large skipFracNum r=padenot
--HG--
extra : rebase_source : 35b6077976ccdc4c2b9d9fd4c778c6362fdd1daa
extra : histedit_source : 7adb8e3296924a1c8ffcb4665122c40ee48f42a4
2015-10-16 11:31:45 +13:00
Karl Tomlinson
28235c90c6 mochitest for bug 913854 r=padenot
--HG--
extra : rebase_source : 8b8e282f34cda23ba924ef4f7201d59b94a7c7af
2015-10-16 01:52:37 +13:00
Karl Tomlinson
fef64ad5d0 bug 1215096 correct off-by-one error in playback position of resampled buffers r=padenot
"The behavior of an expression of the form E1 op = E2 is equivalent to E1 = E1
op E2 except that E1 is evaluated only once", which means that the subtraction
of -= was happening before conversion from double to unsigned int.

The "+ 0.5" was subtracted before the truncation toward zero, causing rounding
to nearest minus one, except when nearest was zero.

--HG--
extra : rebase_source : 3b2335da7a244245ea2fcf5c80760dc1645e6dae
2015-10-16 01:40:07 +13:00
Karl Tomlinson
145e364521 bug 1214493 restore fractional start time accidentally rounded in 13e85dc6b41b r=padenot
--HG--
extra : rebase_source : 524269e54597bffcdeafc96940cbe14b8850c6a7
2015-10-15 18:56:56 +13:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
JW Wang
d3c9b0b0df Bug 1212723. Part 2 - remove unused argument aCloneDonor from MediaDecoderReader::Init(). r=jya. 2015-10-13 15:28:57 +08:00
Baptiste Emmanuel
e080509fbe Bug 1069825 - Check if we compare two automation curves occuring at the same time during overlap checking. r=padenot 2015-06-01 20:01:48 +02:00
Baptiste Emmanuel
440512963b Bug 1110344 - Replace float by double in AudioTimelineEvent ctor to prevent a rounding issue. r=padenot
--HG--
extra : rebase_source : 5814a4bc4eec9cb0b80d3de49c09b9bb060aa01f
2015-06-03 11:58:30 +02:00
JW Wang
a072559a2a Bug 1212701. Part 1 - remove AbstractMediaDecoder::OnDecodeTaskQueue(). r=jya. 2015-10-12 12:05:49 +08:00
Karl Tomlinson
2c37fa9568 bug 1210267 remove custom AudioParam::Release and disconnect in destructor r=baku
AudioParam has no derived type (and DisconnectFromGraphAndDestroyStream calls
no virtual functions) so no need for special release.

--HG--
extra : rebase_source : 1192d8e02d9545a310f175378468c856ef8f5f99
2015-10-02 14:24:51 +13:00
Karl Tomlinson
fcc5b0442a bug 1210267 use DOMEventTargetHelper::LastRelease instead of custom Release r=baku
AudioNode already has NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE,
which performs mRefCnt.incr/decr for LastRelease(), so the kungFuDeathGrip
virtual AddRef/Release in DisconnectFromGraph() is additional noise when
debugging/tracing ownership.

Unlink() already assumes that the caller holds a reference (and it does).

--HG--
extra : rebase_source : 2ecfb16a89524588979365cfe3078df91724dad3
2015-10-01 00:14:26 +13:00
Paul Adenot
6c0eec35f6 Bug 1203616 - Test that waveshaper nodes don't corrupt their input buffer. r=karlt
--HG--
extra : rebase_source : a137eb3deef4fadfa686ff083712c1a614ec6fd8
2015-10-08 11:16:31 +02:00
Paul Adenot
e1154a6a56 Bug 1203616 - Properly scale the input buffer of a WaveShaperNode before processing it with the curve. r=karlt
--HG--
extra : rebase_source : b2505272bf0b177dfb0c6215d0e232a591b6650a
2015-10-08 11:16:31 +02:00
Andrea Marchesini
c53e405b13 Bug 1211511 - AudioChannelAgent::NotifyStartedPlaying and NotifyStoppedPlaying should use the same level of playback notification, r=roc 2015-10-07 20:06:47 +01:00
JW Wang
68837e7538 Bug 1211793 - Remove unnecessary creation of "MediaDecoder" log module. r=gerald. 2015-10-07 14:27:26 +08:00
sajitk
eb1836bb1e Bug 1180940 - Changed return type of AudioDestinationNode::CreateAudioChannelAgent method to return errors, if any methods that it calls fail. Added code to handle the return value in AudioContext::Init(), and its callers. r=baku 2015-10-05 04:35:00 +02:00
JW Wang
aadc51ecc8 Bug 1211766 - Remove AbstractMediaDecoder::GetReentrantMonitor(). r=jya. 2015-09-30 07:04:49 +08:00
Karl Tomlinson
31f93552de bug 1210266 unfriend AudioBufferSourceNode from AudioNode r=padenot
--HG--
extra : rebase_source : 8476dc3499835906378c910f879be7a2652fea81
2015-10-01 00:19:10 +13:00
Karl Tomlinson
8e20d26e10 bug 1210266 remove unused AudioNode::Callback() r=padenot
--HG--
extra : rebase_source : dd0e1f311982fb90852f8cb48f3e4517bf5fa8ce
2015-10-01 00:17:32 +13:00
Karl Tomlinson
2733a284c9 bug 1210266 remove unused AudioParam::Node() r=padenot
--HG--
extra : rebase_source : 095ffee90f8055792842f371712117ea1fcf92b9
2015-09-18 12:16:38 +12:00
Karl Tomlinson
4799b667a3 bug 1210266 use parameter index instead of node callback for sending timeline events r=padenot
--HG--
extra : rebase_source : 27a8ac26a83788c057a225fca47c49af1a021401
2015-10-01 15:48:20 +13:00
Karl Tomlinson
8d75533f8d bug 1210280 use nullptr for silent channels in UpMixDownMixChunk r=padenot
so that AccumulateInputChunk can optimize for silent channels.

--HG--
extra : rebase_source : 43228733d8586f16bab00737ffb381fbd8127fd3
2015-09-05 11:01:54 +12:00
Paul Adenot
5467473807 Bug 1209904 - Optimize OscillatorNode when its frequency is not changin and it's using ::ComputeCustom. r=karlt 2015-10-01 10:52:28 +02:00
Nigel Babu
906147b670 Backed out changeset 04430cc26dba (bug 1180940) for Mulet Gij(4) bustage again.
--HG--
extra : amend_source : 3a0164d64d841349526acd11223cd88501a996f5
2015-10-01 13:53:14 +05:30
sajitk
43d9468d87 Bug 1180940 - Changed return type of AudioDestinationNode::CreateAudioChannelAgent method to return errors, if any methods that it calls fail. Added code to handle the return value in AudioContext::Init(), and its callers. r=baku 2015-09-30 17:51:00 +02:00
JW Wang
fd23a5e794 Bug 1208933 - Remove AbstractMediaDecoder::NotifyWaitingForResourcesStatusChanged(). r=jya. 2015-09-27 21:02:18 +08:00
JW Wang
0bb44154c7 Bug 1208932 - Remove ReadMetadataFailureReason::WAITING_FOR_RESOURCES. r=jya. 2015-09-27 20:48:09 +08:00
Andreas Pehrson
937747498a Bug 1170958 - Refactor DOMMediaStream to contain a 3-stage track chain. r=roc
This lets us separate tracks by ownership like so:
* Input    - Owned by the producer of the DOMMediaStream (gUM etc.)
* Owned    - Contains Input tracks (per above) or tracks cloned tracks
             if this DOMMediaStream is a clone.
* Playback - Contains Owned tracks plus tracks addTrack()ed to this
             DOMMediaStream minus tracks removeTrack()ed from this
             DOMMediaStream.

--HG--
extra : commitid : GPSNwBVyD4j
extra : rebase_source : fba22e96c6c65a74e012509f3da67a4d7df7a244
2015-09-30 09:31:54 +08:00
Andreas Pehrson
53a6c38d0d Bug 1170958 - Allow MediaInputPort to lock to a specific input track. r=roc
Locking to specific tracks lets us dynamically remove and add single
tracks to a ProcessedMediaStream.

--HG--
extra : commitid : GPSNwBVyD4j
extra : rebase_source : 0b1b79077f95bbefc8c71de551c5e3483a7d6ac0
2015-09-30 09:31:53 +08:00
Karl Tomlinson
23b10a8cba bug 1205558 remove DelayNodeEngine::mSource r=padenot
--HG--
extra : rebase_source : 2bc303e258a0d00ff3cf03ac3cb649046c05c0fb
2015-09-29 14:39:28 +13:00
Karl Tomlinson
cc26ca0fff bug 1205558 remove unnecessary ScriptProcessorNodeEngine::mSource r=padenot
--HG--
extra : rebase_source : 11eb2a10320e4e8028266730f3208f2b8cbc314f
2015-09-29 14:30:40 +13:00
Karl Tomlinson
56758d35f3 bug 1205558 remove unused AudioNodeStream* aSource parameter r=padenot
--HG--
extra : rebase_source : 23fb5cfaa0fa3bc117183bb122bbdf032957637b
2015-09-22 17:11:52 +12:00
Karl Tomlinson
24b8c43a95 bug 1205558 use destination stream for audio node engine time r=padenot
--HG--
extra : rebase_source : 19fa80f48fac673c13345002cd8e01d1b7a5ed3d
2015-09-22 16:34:45 +12:00
Karl Tomlinson
884c5a6d1f bug 1209286 remove now unnecessary StreamTimeToDOMTime and DOMTimeToStreamTime r=padenot
--HG--
extra : rebase_source : 7da869260707220259ef804f4b3cc6237a3d5843
2015-09-29 10:46:43 +13:00
Karl Tomlinson
22f0305b78 bug 1208318 ensure that currentTime has advanced sufficiently to easily detect failure r=padenot
--HG--
extra : rebase_source : 7ebf94ac10edb5b4ebd8b76e98e8a3821578ce04
2015-09-29 13:39:24 +13:00
Karl Tomlinson
5b32edea6d bug 1208318 modify test to avoid assuming different clocks are synchronized r=padenot
--HG--
extra : rebase_source : 31ecead7358bdb7b511d5efd802f479af46aef42
2015-09-25 13:05:03 +12:00
Kaustabh Datta Choudhury
5270e212b7 Bug 1162003 - Enable run-by-dir mode on Fx desktop mac debug platform and re-enable a few tests. r=jmaher 2015-09-28 10:54:22 -04:00
Karl Tomlinson
e8c9471dea bug 1208327 make enum AudioContextOperation strongly typed and forward declare instead of including AudioContext.h r=roc
AudioContext.h is now exported only under mozilla.dom.

--HG--
extra : rebase_source : 7fc0a25a6bb8efe497a0e779dca2df5d7e3397b1
2015-09-25 08:49:03 +12:00
Karl Tomlinson
dc7019feef bug 864171 move "extra" time accounting for AudioContext with no nodes to destination stream r=padenot
--HG--
extra : rebase_source : 28cb7a858721e80d68603c4adeaea55eb17f13ba
2015-09-23 19:05:46 +12:00
Karl Tomlinson
504ac09b2d bug 1053011 align "extra" time on AudioContext with processing block size r=padenot
--HG--
extra : rebase_source : efaf55d88a5c25e01d56a701a0f88205d67424f8
2015-09-23 19:52:26 +12:00
Wes Kocher
03a1803261 Backed out 9 changesets (bug 1170958) for frequent test_getUserMedia_addTrackRemoveTrack.html failures
Backed out changeset 277c1f8098d1 (bug 1170958)
Backed out changeset aa86bb9eea95 (bug 1170958)
Backed out changeset 8af8b85a4b26 (bug 1170958)
Backed out changeset ec1bf225e9cb (bug 1170958)
Backed out changeset 4a04ddca2b6b (bug 1170958)
Backed out changeset e85c9977a311 (bug 1170958)
Backed out changeset 16b40ff04e8f (bug 1170958)
Backed out changeset ad206925c84a (bug 1170958)
Backed out changeset 2106eccec79b (bug 1170958)
2015-09-25 13:08:55 -07:00
Paul Adenot
cb424cc5a1 Bug 1200579 - Stop copying AudioParam timelines. r=karlt
--HG--
extra : rebase_source : 3acc85754acb096843c45d5ad12e8e3f7954ecdc
2015-09-25 15:57:55 +02:00