gecko/content/media
Ralph Giles 1945df87b2 Bug 758833 - Track and trim opus preskip samples - r=doublec
We trim the initial few samples out of the opus decoder,
to give the output time to converge, and to correct for
the encoding delay. Encoders store the delay in the preskip
field of the Ogg encapsulation header.

The previous code to do this was a hack based on the granulepos
values and could fail on some inputs. Instead, keep a count
of how many samples we want to trip, and remove packet data
until that value matches the preskip value from the header.

The value is set to the preskip value from the header when
the decoder is initialized. We also need to do this after
seek. To do this we add a specialized nsOggReader::ResetDecode
method which takes a boolean argument, set to true when
we are seeking to the start of the stream. In that case,
the method resets the skip count.

There is still an issue after general seeks. The spec recommends
trimming a full 80 ms (3840 frames) to allow the decoder to fully
settle from the previous state. It's tricky to do this inside
nsOpusState because it doesn't know where it is in the stream.

Also add some debug output to track the decode behaviour.
2012-05-31 16:03:14 +12:00
..
gstreamer Bug 756372 - Change |seeking| to prevent seeking in WebM livestream. r=kinetik 2012-05-18 13:35:43 -04:00
ogg Bug 758833 - Track and trim opus preskip samples - r=doublec 2012-05-31 16:03:14 +12:00
raw Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
test Bug 759095 - upgrade license to MPL 2, and other licensing cleanups. 2012-05-29 16:52:43 +01:00
wave Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
webm Bug 726903 - Remove force_stereo_mode pref hack. r=roc 2012-05-24 14:40:09 +12:00
AudioSegment.cpp Bug 664918. Part 2: Create MediaSegment, AudioSegment and VideoSegment classes to manage intervals of media data. r=jesup 2012-04-30 15:11:19 +12:00
AudioSegment.h Bug 754643 - Enable FAIL_ON_WARNINGS in content/media; r=cpearce f=roc 2012-05-18 10:29:38 +02:00
FileBlockCache.cpp Bug 736342 - Add AsyncBlockWriter, which defers file writes to another thread. r=roc 2012-03-28 13:04:20 +13:00
FileBlockCache.h Bug 736342 - Add AsyncBlockWriter, which defers file writes to another thread. r=roc 2012-03-28 13:04:20 +13:00
Makefile.in Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
MediaResource.cpp Bug 500784 - Video/Audio files over 2^31 bytes now return proper durations; r=cpearce 2012-05-31 14:33:15 +12:00
MediaResource.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
MediaSegment.h Bug 664918. Part 2: Create MediaSegment, AudioSegment and VideoSegment classes to manage intervals of media data. r=jesup 2012-04-30 15:11:19 +12:00
MediaStreamGraph.cpp Bug 758583. Must acquire SourceMediaStream lock before MediaStreamGraph lock. r=jesup 2012-05-29 21:10:45 +12:00
MediaStreamGraph.h Bug 750258. Ensure that MediaStreamListener::NotifyBlockingChanged is always called for a new listener, and similar for NotifyFinished called on an already-finished stream. Rely on this to set readyState correctly for media elements consuming a stream. r=jesup,cpearce 2012-05-24 22:37:14 +12:00
nsAudioAvailableEventManager.cpp Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsAudioAvailableEventManager.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsAudioStream.cpp Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsAudioStream.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsBuiltinDecoder.cpp Fix bustage for bug 755533 2012-05-28 11:08:59 +12:00
nsBuiltinDecoder.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsBuiltinDecoderReader.cpp Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsBuiltinDecoderReader.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsBuiltinDecoderStateMachine.cpp Bug 750769. Prevent mCurrentFrameTime from advancing during DecodeSeek. r=cpearce 2012-05-22 21:56:02 +12:00
nsBuiltinDecoderStateMachine.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsDOMMediaStream.cpp Bug 664918 followup: Add missing */ terminator on emacs modeline in header comment for new files nsDOMMediaStream.cpp and MediaStreamGraph.cpp. (no review, comment-only) DONTBUILD 2012-05-11 10:35:36 -07:00
nsDOMMediaStream.h Bug 664918. Part 5: Create SourceMediaStream, a MediaStream with an API allowing data to be injected into it by some source. r=jesup 2012-04-30 15:11:40 +12:00
nsIDOMMediaStream.idl Bug 664918. Part 4: Create nsDOMMediaStream, a DOM object wrapping an underlying MediaStream. r=smaug,jesup 2012-04-30 15:11:34 +12:00
nsMediaCache.cpp Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsMediaCache.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsMediaDecoder.cpp Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
nsMediaDecoder.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
SharedBuffer.h Bug 664918. Part 2: Create MediaSegment, AudioSegment and VideoSegment classes to manage intervals of media data. r=jesup 2012-04-30 15:11:19 +12:00
StreamBuffer.cpp Bug 664918 followup: Add missing */ terminator on emacs modeline in header comment for new file StreamBuffer.cpp. (no review, comment-only) DONTBUILD 2012-05-07 11:22:44 -07:00
StreamBuffer.h Bug 664918. Part 2: Create MediaSegment, AudioSegment and VideoSegment classes to manage intervals of media data. r=jesup 2012-04-30 15:11:19 +12:00
TimeVarying.h Bug 664918. Part 1: Create TimeVarying<T> class to represent values that change over time. r=jesup 2012-04-30 15:11:08 +12:00
VideoFrameContainer.cpp Bug 708116. Factor out logic for updating the current frame of a video element into a helper object. r=doublec 2012-02-15 17:35:01 +13:00
VideoFrameContainer.h Bug 708116. Factor out logic for updating the current frame of a video element into a helper object. r=doublec 2012-02-15 17:35:01 +13:00
VideoSegment.h Bug 664918. Part 2: Create MediaSegment, AudioSegment and VideoSegment classes to manage intervals of media data. r=jesup 2012-04-30 15:11:19 +12:00
VideoUtils.cpp Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
VideoUtils.h Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00