Paul Adenot
7f90ed61c6
Bug 919215 - Start the AudioStream on creation when in low-latency mode, and let it underrun. r=roc
...
The BufferedAudioStream buffers the data it gets through the Write() calls and
what is consumed by the callback. This means that if the audio producer starts
Write()ing data right after Start()ing the stream, data will accumulate in this
buffer and won't be consumed. Eventually, the buffer will be of a certain size
before it begins to be consumed by the callback, and this means an
umcompressible latency (because the data will be written at more or less the
same rate as it is produced).
This patch start the BufferedAudioStream right away when it is created, dropping
the silent AudioSegment until it finds real data (and padding with silence is
then done at the beginning). The stream will underrun, but the callback will
synthetize silence, avoiding overbuffering in the BufferedAudioStream. This
ensures minimal latency cause by the buffering.
Note that the clock will still advance, so this will not change the behavior of
content that has leading silence.
2013-11-19 10:43:15 +13:00
Randell Jesup
25107fe5c3
Bug 920325: Add WebRTC latency logging from capture to RTP and from RTP to speakers r=padenot
2013-10-25 18:13:42 -04:00
Randell Jesup
6540e33b98
backout 5f38b1bd3358 for bustage CLOSED TREE
2013-10-25 19:25:54 -04:00
Randell Jesup
f299c1fdbc
Bug 920325: Add WebRTC latency logging from capture to RTP and from RTP to speakers r=padenot
2013-10-25 18:13:42 -04:00
Ehsan Akhgari
c88ae238ac
Bug 917299 - Remove some dead code in content/ and dom/; r=bzbarsky
2013-09-17 12:49:07 -04:00
Paul Adenot
19e5ba9a55
Bug 904617: Part 3 - Log latency, and adds a python script to understand the log r=padenot,jesup,ehugg
2013-01-28 19:22:37 +01:00
Ed Morley
3cf7ed846a
Backed out changeset 81cee5ae7973 (bug 904617)
2013-09-16 08:43:47 +01:00
Paul Adenot
09d62fb48e
Bug 904617: Part 3 - Log latency, and adds a python script to understand the log r=padenot,jesup
2013-01-28 19:22:37 +01:00
Shelly Lin
196a0e94e4
Bug 882956 - Fix WebAudio stack-buffer-overflow crash. r=ehsan.
2013-06-14 15:16:41 +08:00
Ehsan Akhgari
4abd4eea22
Bug 881775 - Set the correct channel count in DownmixAndInterleave, and avoid unnecessary downmixing; r=roc
2013-06-11 17:50:21 -04:00
Shelly Lin
03b1a928de
Bug 842243 - Part 0: Modify MediaSegment and AudioSegment for use by MediaEncoder. r=roc
2013-06-03 17:59:50 +08:00
Robert O'Callahan
569f78ecf3
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
Ehsan Akhgari
81075674d3
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
Robert O'Callahan
b742aee0ca
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
f7ccb1d31c
Bug 830707. Part 2: Mix channels to output channel count when playing audio. r=jesup
...
--HG--
extra : rebase_source : a13d8ec691689e3aa57cd42c9d437f91197d4253
2013-02-01 17:27:02 +13:00
Matthew Gregan
671569bfda
Bug 833578 - Start AudioSegment playing after first write rather than waiting for AudioStream's buffer to fill. r=roc
2013-01-23 18:53:10 +13:00
Robert O'Callahan
cf8fbf13e1
Bug 827537. Refactor AudioChunk to support having separate buffers for each channel. r=jesup
...
--HG--
extra : rebase_source : 0aa26e1c3181d9fe5158520d4b33248bae0fa5d0
2012-11-22 18:04:27 +13:00
Paul Adenot
3650da83a5
Bug 815194 - Remove more ns prefixes on content/media classes + whitespace fixes. r=cpearce
2012-11-28 20:40:07 +01:00
Chris Pearce
ddedecabd0
Bug 811381 - Remove ns prefix from media code. r=roc
...
--HG--
rename : content/media/nsAudioAvailableEventManager.cpp => content/media/AudioAvailableEventManager.cpp
rename : content/media/nsAudioAvailableEventManager.h => content/media/AudioAvailableEventManager.h
rename : content/media/nsAudioStream.cpp => content/media/AudioStream.cpp
rename : content/media/nsAudioStream.h => content/media/AudioStream.h
rename : content/media/nsMediaCache.cpp => content/media/MediaCache.cpp
rename : content/media/nsMediaCache.h => content/media/MediaCache.h
rename : content/media/nsBuiltinDecoder.cpp => content/media/MediaDecoder.cpp
rename : content/media/nsBuiltinDecoder.h => content/media/MediaDecoder.h
rename : content/media/nsBuiltinDecoderReader.cpp => content/media/MediaDecoderReader.cpp
rename : content/media/nsBuiltinDecoderReader.h => content/media/MediaDecoderReader.h
rename : content/media/nsBuiltinDecoderStateMachine.cpp => content/media/MediaDecoderStateMachine.cpp
rename : content/media/nsBuiltinDecoderStateMachine.h => content/media/MediaDecoderStateMachine.h
rename : content/media/dash/nsDASHDecoder.cpp => content/media/dash/DASHDecoder.cpp
rename : content/media/dash/nsDASHDecoder.h => content/media/dash/DASHDecoder.h
rename : content/media/dash/nsDASHReader.cpp => content/media/dash/DASHReader.cpp
rename : content/media/dash/nsDASHReader.h => content/media/dash/DASHReader.h
rename : content/media/dash/nsDASHRepDecoder.cpp => content/media/dash/DASHRepDecoder.cpp
rename : content/media/dash/nsDASHRepDecoder.h => content/media/dash/DASHRepDecoder.h
rename : content/media/gstreamer/nsGStreamerDecoder.cpp => content/media/gstreamer/GStreamerDecoder.cpp
rename : content/media/gstreamer/nsGStreamerDecoder.h => content/media/gstreamer/GStreamerDecoder.h
rename : content/media/gstreamer/nsGStreamerReader.cpp => content/media/gstreamer/GStreamerReader.cpp
rename : content/media/gstreamer/nsGStreamerReader.h => content/media/gstreamer/GStreamerReader.h
rename : content/media/ogg/nsOggCodecState.cpp => content/media/ogg/OggCodecState.cpp
rename : content/media/ogg/nsOggCodecState.h => content/media/ogg/OggCodecState.h
rename : content/media/ogg/nsOggDecoder.cpp => content/media/ogg/OggDecoder.cpp
rename : content/media/ogg/nsOggDecoder.h => content/media/ogg/OggDecoder.h
rename : content/media/ogg/nsOggReader.cpp => content/media/ogg/OggReader.cpp
rename : content/media/ogg/nsOggReader.h => content/media/ogg/OggReader.h
rename : content/media/omx/nsMediaOmxDecoder.cpp => content/media/omx/MediaOmxDecoder.cpp
rename : content/media/omx/nsMediaOmxDecoder.h => content/media/omx/MediaOmxDecoder.h
rename : content/media/omx/nsMediaOmxReader.cpp => content/media/omx/MediaOmxReader.cpp
rename : content/media/omx/nsMediaOmxReader.h => content/media/omx/MediaOmxReader.h
rename : content/media/plugins/nsMediaPluginDecoder.cpp => content/media/plugins/MediaPluginDecoder.cpp
rename : content/media/plugins/nsMediaPluginDecoder.h => content/media/plugins/MediaPluginDecoder.h
rename : content/media/plugins/nsMediaPluginHost.cpp => content/media/plugins/MediaPluginHost.cpp
rename : content/media/plugins/nsMediaPluginHost.h => content/media/plugins/MediaPluginHost.h
rename : content/media/plugins/nsMediaPluginReader.cpp => content/media/plugins/MediaPluginReader.cpp
rename : content/media/plugins/nsMediaPluginReader.h => content/media/plugins/MediaPluginReader.h
rename : content/media/raw/nsRawDecoder.cpp => content/media/raw/RawDecoder.cpp
rename : content/media/raw/nsRawDecoder.h => content/media/raw/RawDecoder.h
rename : content/media/raw/nsRawReader.cpp => content/media/raw/RawReader.cpp
rename : content/media/raw/nsRawReader.h => content/media/raw/RawReader.h
rename : content/media/raw/nsRawStructs.h => content/media/raw/RawStructs.h
rename : content/media/wave/nsWaveDecoder.cpp => content/media/wave/WaveDecoder.cpp
rename : content/media/wave/nsWaveDecoder.h => content/media/wave/WaveDecoder.h
rename : content/media/wave/nsWaveReader.cpp => content/media/wave/WaveReader.cpp
rename : content/media/wave/nsWaveReader.h => content/media/wave/WaveReader.h
rename : content/media/webm/nsWebMBufferedParser.cpp => content/media/webm/WebMBufferedParser.cpp
rename : content/media/webm/nsWebMBufferedParser.h => content/media/webm/WebMBufferedParser.h
rename : content/media/webm/nsWebMDecoder.cpp => content/media/webm/WebMDecoder.cpp
rename : content/media/webm/nsWebMDecoder.h => content/media/webm/WebMDecoder.h
rename : content/media/webm/nsWebMReader.cpp => content/media/webm/WebMReader.cpp
rename : content/media/webm/nsWebMReader.h => content/media/webm/WebMReader.h
2012-11-14 11:46:40 -08:00
Robert O'Callahan
7d56e6d0f7
Bug 805254. Part 12: Simplify AudioSegment::WriteTo and related code now that the output format is known statically. r=kinetik
...
Also fixes what I think is a bug in InterleaveAndConvertBuffer converting S16 to S16.
Instead of clamping the volume, we should handle arbitrary volumes by falling back
to the float conversion path.
2012-10-25 23:09:41 +13:00
Robert O'Callahan
acc22ea0d6
Bug 805254. Part 8: Consolidate audio sample processing code using templates over the format types. r=kinetik
...
Replace nsAudioStream::Format with an AUDIO_OUTPUT_FORMAT enum value so we
can use it as a template parameter.
Introduce AudioSampleTraits<AudioSampleFormat> to give us access to the C++ type
corresponding to an enum value.
Move SampleToFloat/FloatToSample to AudioSampleFormat.h.
Introduce ConvertAudioSamples and ConvertAudioSamplesWithScale functions
and use them from various places.
Moves AudioDataValue to AudioSampleFormat.h. The name isn't great, but it'll do.
2012-10-25 23:09:40 +13:00
Robert O'Callahan
eb84abab22
Bug 805254. Part 7: Move SampleFormat to mozilla::AudioSampleFormat in its own file. r=kinetik
2012-10-25 23:09:40 +13:00
Robert O'Callahan
9bfc64887e
Bug 805254. Part 4: Remove FORMAT_U8 from nsAudioStream::SampleFormat. r=kinetik
...
We also give nsWaveReader its own separate format enum.
2012-10-25 23:09:39 +13:00
Robert O'Callahan
f237e5bab1
Bug 805254. Part 2: Rename nsAudioStream::GetFormat() to Format(), make it static, and use it instead of the MOZ_AUDIO_DATA_FORMAT macro. r=kinetik
...
Part 8 mostly replaces this patch, but it's quite difficult to reorder the patches to avoid this one.
2012-10-25 23:09:38 +13:00
Isaac Aggrey
481e7dfb0b
Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan
2012-09-28 01:57:33 -05:00
Paul Adenot
793c14133f
Bug 783953 - Rename MOZ_SAMPLE_TYPE_S16LE to MOZ_SAMPLE_TYPE_S16. r=kinetik,roc
2012-09-01 11:35:56 -04:00
Ehsan Akhgari
e368dc9c85
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Robert O'Callahan
baab5848f3
Bug 664918. Part 2: Create MediaSegment, AudioSegment and VideoSegment classes to manage intervals of media data. r=jesup
...
Also introduces a SharedBuffer class, representing a blob of binary data with threadsafe refcounting.
2012-04-30 15:11:19 +12:00