Commit Graph

125 Commits

Author SHA1 Message Date
Dragana Damjanovic
b658f9d97e Bug 647010 - Limit when HTTP authentication dialog is shown. Block cross-origin http auth prompts with pref. r=mayhemer, r=tanvi 2015-04-01 06:56:00 -04:00
Alastor Wu
5f4ff6530f Bug 1107534 - Using audio channels type to capture different stream. r=roc 2015-03-31 10:14:00 +08:00
Mike Hommey
c39e359c7d Bug 1138293 - Use malloc/free/realloc/calloc instead of moz_malloc/moz_free/moz_realloc/moz_calloc. r=njn
The distinction between moz_malloc/moz_free and malloc/free is not
interesting. We are inconsistent in our use of one or the other, and
I wouldn't be surprised if we are mixing them anyways.
2015-03-31 12:32:49 +09: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
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
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
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
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Wes Kocher
5e68488fa0 Bug 1145816 - Disable test_mediaStreamAudioDestinationNode.html as well for frequent timeouts CLOSED TREE 2015-03-20 16:22:05 -07:00
Ryan VanderMeulen
edd40992cc Bug 1145816 - Disable test_mediaElementAudioSourceNodePassThrough.html on Android for being nearly perma-timeout.
CLOSED TREE
2015-03-20 17:15:43 -04:00
Boris Zbarsky
dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Daniel Holbert
082fd9cd7f Bug 1142841: Convert all nsRefPtr<nsIRunnable> to nsCOMPtr<nsIRunnable>. r=ehsan
This patch was generated by a script.  Here's the source of the script for
future reference:

find . \( -iname "*.cpp" -o -iname "*.h" \) | \
  xargs -n 1 sed -i "s/nsRefPtr<nsIRunnable>/nsCOMPtr<nsIRunnable>/g"
2015-03-17 09:29:17 -07:00
Jonathan Griffin
d1c61bc9b6 Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08:00
Paul Adenot
1a25b47c65 Bug 1141282 - Test the type of the attributes of the DynamicCompressoNode, and make sure it returns sane values. r=ehsan 2015-03-12 14:36:40 +01:00
Paul Adenot
ada66aa858 Bug 1141282 - DynamicCompressorNode's readonly 'reduction' should be a float. r=ehsan 2015-03-12 14:36:39 +01:00
Andreas Pehrson
35fb84dfd4 Bug 1081819 - Let the output stream itself process input data from MediaStreamAudioDestinationNode::mStream. r=roc 2015-03-02 17:08:40 +08:00
Phil Ringnalda
df31a989de Backed out 3 changesets (bug 1081819) for frequent mochitest-e10s failures
Backed out changeset b78fd38002f5 (bug 1081819)
Backed out changeset ff063b9a1ea2 (bug 1081819)
Backed out changeset 322d60fc413e (bug 1081819)
2015-03-07 18:14:05 -08:00
Andreas Pehrson
307e15ba05 Bug 1081819 - Let the output stream itself process input data from MediaStreamAudioDestinationNode::mStream. r=roc 2015-03-02 17:08:40 +08:00
Bobby Holley
845ad750dc Bug 1135170 - Stop updating playback position from Ogg seek and remove MediaDecoder::UpdatePlaybackPosition. r=mattwoodrow
The ogg reader makes two adjustments to the seek time - the first is to clamp it
between start and end time, which MDSM already does. The second is to subtract
SEEK_OPUS_PREROLL from the target. If we wanted to, we could return this as the
resolve value in the seek promise and handle the update in the MDSM. But I think
DropVideoUpToSeekTarget should actually handle this just fine.
2015-03-06 19:17:00 -08:00
Paul Adenot
437014581d Bug 1130077 - Bump the number of iterations to prevent failures on slow machines. r=ehsan 2015-03-05 13:30:12 +01:00
Geoff Brown
46b3719da5 Bug 1138468 - Disable test_audioBufferSourceNodeNeutered.html on android debug; r=trivial 2015-03-05 10:47:41 -07:00
Sotaro Ikeda
b3535ec3a6 Bug 1128357 Patch 2: Don't dispatch seeking/seeked events when coming out of dormant mode r=cpearce 2015-03-04 17:33:40 -08:00
Andreas Pehrson
9b19093204 Bug 1129263 - Part 6. Remove DOMMediaStream::TrackTypeHints. r=roc,jesup 2015-02-09 15:23:34 +08:00
Anthony Jones
69c0b09ad3 Bug 1138253 - Count dropped frames directly; r=cpearce 2015-03-03 17:46:48 +13:00
Paul Adenot
052a2913a9 Bug 1118622 - Apply the gain to AnalyserNode data prior to sending on the main thread. r=ehsan 2015-01-29 18:05:23 +01:00
Ankit Goyal
07ae88b846 Bug 1131529 - Update the maximum FFT size in AnalyserNode to be 2^15. r=padenot 2015-02-16 16:03:07 +01:00
Ryan VanderMeulen
51f96dd133 Bug 1127845 - Skip test_audioBufferSourceNodeNeutered.html for being nearly permafail on Windows. 2015-02-05 14:02:21 -05:00
Paul Adenot
b40239c553 Bug 1128494 - Change the default panning model of the PannerNode to "equalpower". r=smaug
--HG--
extra : rebase_source : 34877a4b518ac354cf1732a16f70b1659986aabc
2015-02-03 11:25:37 +01:00
Carsten "Tomcat" Book
876bf0ff6a Backed out changeset f9101e882c96 (bug 1128494) for dt-tests regression on a CLOSED TREE 2015-02-03 13:08:53 +01:00
Paul Adenot
8671cd4722 Bug 1128494 - Change the default panning model of the PannerNode to "equalpower". r=smaug 2015-02-03 11:25:37 +01:00
Mike Hommey
a35dbaeebf Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Masatoshi Kimura
6cc5dabbee Bug 1111290 - Part 3: Remove TypedEnum.h and fold TypedEnumInternal.h into TypedEnumBits.h. r=waldo 2015-01-26 07:22:11 +09:00
Masatoshi Kimura
be535304d8 Bug 1111290 - Part 1: Remove MOZ_(BEGIN|END)_ENUM_CLASS. r=waldo 2015-01-26 07:22:07 +09:00
Sotaro Ikeda
4f70eb3f49 Bug 1124957 - Fix typo of Dormant r=cpearce 2015-01-23 07:00:39 -08:00
Paul Adenot
96c8cd7b84 Bug 1119266 - Properly wrap the table index in ComputeCustom on ARM. r=karlt
On ARM, casting a negative float to an unsigned integer yields zero, whereas on
x86, it wraps. When the OscillatorNode had a negative frequency, the code would
just interpolate between the first and second value of the wave table, instead
of interpolating backward.
2015-01-12 13:32:11 +01:00
Masatoshi Kimura
9656ec51c3 Bug 895582 - Get rid of MOZ_ENUM_TYPE. r=waldo 2015-01-21 22:35:19 +09:00
Brian Smith
497ba72908 Bug 1119072, Part 5: Work around problem with cmath and M_PI on VS2015, r=ehsan
--HG--
extra : rebase_source : f4973d8a8d1c56a0b843d0258ca739cd4b12f780
2015-01-08 15:27:16 -08:00
Sotaro Ikeda
e662668d12 Bug 1110343 - Suppress redundant loadedmetadata event when dormant exit r=cpearce 2015-01-16 07:56:19 -08:00
Ryan VanderMeulen
d76cb5ba6d Bug 1061675- Disable test_mozaudiochannel.html on Android 2.3 due to frequent failures. 2015-01-16 09:59:57 -05:00
Chris Peterson
9e23388ca8 Bug 1118076 - Remove MOZ_THIS_IN_INITIALIZER_LIST. r=Waldo 2015-01-06 21:39:46 -08:00
Ehsan Akhgari
4354953b4f Bug 1118486 - Part 1: Use = delete instead of MOZ_DELETE directly; r=Waldo
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:

#!/bin/bash

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "*/.git*" \
       ! -wholename "obj-*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00
Paul Adenot
84a2b0acc4 Bug 1119266 - Disable test_oscillatorNodeNegativeFrequency.html for failures on Android, on a CLOSED TREE. 2015-01-08 16:28:08 +01:00
Paul Adenot
373349f693 Bug 916285 - Fix bustage on windows. 2015-01-05 15:30:53 +01:00
Paul Adenot
6e708c08e0 Bug 916285 - Make OscillatorNode handle negative frequencies. r=karlt
--HG--
extra : rebase_source : d45d11150406208e936ac3e78a1cdb1ce22684fb
2014-12-01 16:10:54 -08:00
Paul Adenot
3e1a7b67fc Bug 997870 - Optimize OscillatorNodeEngine::ComputeCustom a little. r=karlt
--HG--
extra : rebase_source : 6d88a2154196c8c34521e246061e9581b98f70a1
2014-12-10 15:34:14 +01:00
Paul Adenot
f0c8594900 Bug 1106649 - Use band-limited wave tables to implement basic waveforms. r=karlt
--HG--
extra : rebase_source : c75a338a6887f811727ac068e4d84970a7796367
2014-12-01 16:09:56 -08:00
Ryan VanderMeulen
3d55a15384 Backed out 4 changesets (bug 1106649, bug 916285, bug 997870) for test_periodicWave.html failures.
Backed out changeset 43e2d930ba6f (bug 916285)
Backed out changeset 011c2f2f5899 (bug 916285)
Backed out changeset b7303f56216b (bug 997870)
Backed out changeset a2b0a16b8898 (bug 1106649)

CLOSED TREE
2015-01-05 14:22:29 -05:00