Last Comment Bug 759399 - nsOggReader preroll support
: nsOggReader preroll support
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Timothy B. Terriberry (:derf)
:
: Maire Reavy [:mreavy]
Mentors:
Depends on: 674225 759490
Blocks: 759612
  Show dependency treegraph
 
Reported: 2012-05-29 10:44 PDT by Ralph Giles (:rillian) needinfo me
Modified: 2012-06-01 08:40 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Handle preroll correctly during an Opus seek (10.82 KB, patch)
2012-05-29 13:48 PDT, Timothy B. Terriberry (:derf)
cajbir.bugzilla: review+
Details | Diff | Splinter Review

Description Ralph Giles (:rillian) needinfo me 2012-05-29 10:44:27 PDT
The Opus decoder requires some time to converge after a seek. The spec recommends players start decoding 80 ms (3840 samples at 48 kHz) before the intended seek target and discard that initial output.

This is generally referred to as 'preroll'. It makes the most sense to handle this in nsOggReader (or nsBuiltinDecoder) where seeking is implemented. In particular, the preroll target must be clipped against the start of the stream, the time origen, or even buffered ranges, and the Reader is what's keeping track of where the decoder is in the stream.

This bug is about extending the seek logic in nsOggReader to start the decoder 80 ms ahead of the seek target. The existing logic in nsBuiltinDecoderReader::DecodeToTarget will then discard the extra samples up to the real seek point.
Comment 1 Timothy B. Terriberry (:derf) 2012-05-29 13:48:21 PDT
Created attachment 628098 [details] [diff] [review]
Handle preroll correctly during an Opus seek
Comment 2 Timothy B. Terriberry (:derf) 2012-05-31 10:36:58 PDT
Greenish on try: https://tbpl.mozilla.org/?tree=Try&rev=351135ba6c51
Comment 3 Timothy B. Terriberry (:derf) 2012-05-31 11:14:52 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8b7fca9d4bb
Comment 4 Ed Morley [:emorley] 2012-06-01 08:40:16 PDT
https://hg.mozilla.org/mozilla-central/rev/a8b7fca9d4bb

Note You need to log in before you can comment on or make changes to this bug.