Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Issue 10831020: Refactor FFmpegAudioDecoder output timestamp logic. (Closed)

Created:
8 years, 4 months ago by acolwell GONE FROM CHROMIUM
Modified:
8 years, 4 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Refactor FFmpegAudioDecoder output timestamp logic. - These changes make the output timestamps & durations more accurate. - Isolates output timestamps from rounding effects in the input timestamps. - Fixes output timestamp error caused by the 1 frame coding delay. - Trims off starting samples when Vorbis signals negative timestamps. BUG=126183 TEST=None. Existing tests still pass.

Patch Set 1 #

Total comments: 26

Patch Set 2 : #

Patch Set 3 : Address CR comments #

Total comments: 1

Patch Set 4 : Add fix for negative Vorbis timestamps. #

Patch Set 5 : Replace round(x) with floor(0.5+x) to make windows happy. #

Total comments: 16

Patch Set 6 : Rebase and address CR comments #

Patch Set 7 : Address Dale's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -74 lines) Patch
M media/filters/ffmpeg_audio_decoder.h View 1 2 3 6 2 chunks +13 lines, -8 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 3 4 5 6 9 chunks +79 lines, -60 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder_unittest.cc View 1 2 3 2 chunks +3 lines, -6 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
acolwell GONE FROM CHROMIUM
8 years, 4 months ago (2012-07-26 00:25:51 UTC) #1
acolwell GONE FROM CHROMIUM
assigning a reviewer this time. :)
8 years, 4 months ago (2012-07-26 00:26:10 UTC) #2
DaleCurtis
Just an FYI, there's also av_frame->best_effort_timestamp, although I suspect what you're doing here is better. ...
8 years, 4 months ago (2012-07-26 00:40:16 UTC) #3
acolwell GONE FROM CHROMIUM
Addressed CR comments. Can't use AVFrame.best_effort_timestamp. It doesn't appear to be set for for audio. ...
8 years, 4 months ago (2012-07-26 01:21:34 UTC) #4
scherkus (not reviewing)
FYI I have the following todo inside ffmpeg_audio_decoder_unittest.cc 154 // We should have three decoded ...
8 years, 4 months ago (2012-07-26 01:43:08 UTC) #5
DaleCurtis
Strange, in any case, my last tests with best_effort_timestamp (pre-parser turn on though) showed it ...
8 years, 4 months ago (2012-07-26 01:49:16 UTC) #6
acolwell GONE FROM CHROMIUM
PTAL. This does fix Bug 126183. This patch discovered that content/test/data/media/bear.ogv generates timestamps that go ...
8 years, 4 months ago (2012-07-27 20:45:29 UTC) #7
scherkus (not reviewing)
LGTM http://codereview.chromium.org/10831020/diff/8002/media/filters/ffmpeg_audio_decoder_unittest.cc File media/filters/ffmpeg_audio_decoder_unittest.cc (left): http://codereview.chromium.org/10831020/diff/8002/media/filters/ffmpeg_audio_decoder_unittest.cc#oldcode156 media/filters/ffmpeg_audio_decoder_unittest.cc:156: // TODO(scherkus): timestamps are off by one packet ...
8 years, 4 months ago (2012-07-28 22:35:36 UTC) #8
DaleCurtis
lgtm
8 years, 4 months ago (2012-07-29 17:51:16 UTC) #9
acolwell GONE FROM CHROMIUM
PTAL. Now includes logic to handle negative Vorbis timestamps. This still isn't 100% for the ...
8 years, 4 months ago (2012-08-03 20:08:12 UTC) #10
scherkus (not reviewing)
lgtm w/ sanity checking q's + nits because this stuff makes my head hurt http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc ...
8 years, 4 months ago (2012-08-03 22:34:57 UTC) #11
scherkus (not reviewing)
don't forget to update CL description to include the new vorbis-specific fun times stuff
8 years, 4 months ago (2012-08-03 22:35:31 UTC) #12
acolwell GONE FROM CHROMIUM
http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc File media/filters/ffmpeg_audio_decoder.cc (right): http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc#newcode184 media/filters/ffmpeg_audio_decoder.cc:184: input->IsEndOfStream()); On 2012/08/03 22:34:57, scherkus wrote: > want to ...
8 years, 4 months ago (2012-08-03 23:14:01 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/acolwell@chromium.org/10831020/18001
8 years, 4 months ago (2012-08-03 23:14:16 UTC) #14
DaleCurtis
http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc File media/filters/ffmpeg_audio_decoder.cc (right): http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc#newcode187 media/filters/ffmpeg_audio_decoder.cc:187: demuxer_stream_->audio_decoder_config().codec() == kCodecVorbis; On 2012/08/03 22:34:57, scherkus wrote: > ...
8 years, 4 months ago (2012-08-03 23:15:36 UTC) #15
DaleCurtis
On 2012/08/03 23:15:36, DaleCurtis wrote: > http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc > File media/filters/ffmpeg_audio_decoder.cc (right): > > http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc#newcode187 > ...
8 years, 4 months ago (2012-08-03 23:15:54 UTC) #16
acolwell GONE FROM CHROMIUM
http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc File media/filters/ffmpeg_audio_decoder.cc (right): http://codereview.chromium.org/10831020/diff/5006/media/filters/ffmpeg_audio_decoder.cc#newcode187 media/filters/ffmpeg_audio_decoder.cc:187: demuxer_stream_->audio_decoder_config().codec() == kCodecVorbis; On 2012/08/03 23:15:36, DaleCurtis wrote: > ...
8 years, 4 months ago (2012-08-03 23:25:05 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/acolwell@chromium.org/10831020/17003
8 years, 4 months ago (2012-08-03 23:26:02 UTC) #18
commit-bot: I haz the power
Commit queue had an internal error. Something went really wrong, probably a crash, a hickup ...
8 years, 4 months ago (2012-08-04 01:15:38 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/acolwell@chromium.org/10831020/17003
8 years, 4 months ago (2012-08-04 02:11:45 UTC) #20
commit-bot: I haz the power
Failed to apply patch for media/filters/ffmpeg_audio_decoder.cc: While running patch -p1 --forward --force; patching file media/filters/ffmpeg_audio_decoder.cc ...
8 years, 4 months ago (2012-08-04 02:11:47 UTC) #21
acolwell GONE FROM CHROMIUM
8 years, 4 months ago (2012-08-04 02:31:35 UTC) #22
For the record this did apparently get checked in.
http://src.chromium.org/viewvc/chrome?view=rev&revision=149991

Powered by Google App Engine
This is Rietveld 408576698