gecko/content
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
..
base Bug 753885 - Part 2: Add JSOPTION_ALLOW_XML, making E4X support optional per-context. r=Waldo. 2012-05-30 15:05:59 -05:00
canvas Bug 750527 - Rebind program if current program is relinked - r=bjacob 2012-05-30 17:00:38 -07:00
events Merge m-c to m-i. 2012-05-25 11:15:32 +02:00
html Bug 758481 - When seeking in an unbuffered range after having ended a media, networkState is NETWORK_IDLE r=chris.double 2012-05-31 14:30:23 +12:00
mathml/content Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
media Bug 758833 - Track and trim opus preskip samples - r=doublec 2012-05-31 16:03:14 +12:00
smil Bug 752902 - Call Unlink before clearing time value specs; r=dholbert 2012-05-23 08:21:23 +09:00
svg Bug 756988 - Mark some animation feature strings as supported. r=jwatt 2012-05-25 14:45:53 +01:00
test Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
xbl Bug 757485, remove nsIXBLService and use nsXBLService directly, r=bz 2012-05-23 14:46:04 -04:00
xml Bug 743581: Removes nsCRT::strlen(const PRUnichar*). f=sgautherie r=dougt 2012-05-30 18:43:39 +01:00
xslt Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
xtf Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
xul Bug 753885 - Part 1: Rename JSOPTION_XML to JSOPTION_MOAR_XML, and other cleanups. r=Waldo. 2012-05-30 15:05:58 -05:00
Makefile.in Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00