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

Issue 259453003: Introduce AudioDiscardHelper. Refactor audio decoders to use it. (Closed)

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

Description

Introduce AudioDiscardHelper. Refactor audio decoders to use it. We've long had duplicated code in the opus and ffmpeg audio decoders based around discarding samples from the front of back of output buffers. This change standarizes this into a better tested helper class. This paves the way for a later change which will expand discard_padding() for use by media source. It also fixed the chained ogg case with opus by allowing non-monotonic timestamps for the opus decoder. BUG=175281, 360961 TEST=new unittest. existing tests pass. NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266953

Patch Set 1 #

Patch Set 2 : Simplify! #

Total comments: 48

Patch Set 3 : Comments. #

Total comments: 7

Patch Set 4 : Fix comments. #

Patch Set 5 : Fix x64 type. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+480 lines, -174 lines) Patch
M media/base/audio_buffer.h View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
A media/base/audio_discard_helper.h View 1 2 1 chunk +63 lines, -0 lines 0 comments Download
A media/base/audio_discard_helper.cc View 1 2 1 chunk +114 lines, -0 lines 0 comments Download
A media/base/audio_discard_helper_unittest.cc View 1 2 1 chunk +261 lines, -0 lines 0 comments Download
M media/base/test_helpers.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.h View 1 2 3 2 chunks +2 lines, -7 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 9 chunks +23 lines, -77 lines 0 comments Download
M media/filters/opus_audio_decoder.h View 2 chunks +3 lines, -12 lines 0 comments Download
M media/filters/opus_audio_decoder.cc View 1 2 7 chunks +9 lines, -71 lines 0 comments Download
M media/media.gyp View 1 2 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
DaleCurtis
wolenetz: Have a look! I'm a little iffy on the name, but AudioDecoderHelper seemed too ...
6 years, 8 months ago (2014-04-24 02:02:29 UTC) #1
DaleCurtis
Despite our earlier discussion, this is now ready for review :) Turns out we don't ...
6 years, 8 months ago (2014-04-25 00:02:05 UTC) #2
wolenetz
First round of comments. https://codereview.chromium.org/259453003/diff/50009/media/base/audio_discard_helper.cc File media/base/audio_discard_helper.cc (right): https://codereview.chromium.org/259453003/diff/50009/media/base/audio_discard_helper.cc#newcode31 media/base/audio_discard_helper.cc:31: last_input_timestamp_(kNoTimestamp()) { nit: is any ...
6 years, 7 months ago (2014-04-28 21:52:07 UTC) #3
DaleCurtis
Just comments. I'll resolve your nits in the next patch set. https://codereview.chromium.org/259453003/diff/50009/media/base/audio_discard_helper.cc File media/base/audio_discard_helper.cc (right): ...
6 years, 7 months ago (2014-04-28 22:03:50 UTC) #4
wolenetz
Thanks for rapid response :) A couple replies to PS3 comments: https://codereview.chromium.org/259453003/diff/50009/media/base/audio_discard_helper.cc File media/base/audio_discard_helper.cc (right): ...
6 years, 7 months ago (2014-04-28 22:37:56 UTC) #5
wolenetz
On 2014/04/28 22:37:56, wolenetz wrote: > Thanks for rapid response :) > A couple replies ...
6 years, 7 months ago (2014-04-28 22:41:40 UTC) #6
DaleCurtis
PTAL. https://codereview.chromium.org/259453003/diff/50009/media/base/audio_discard_helper.cc File media/base/audio_discard_helper.cc (right): https://codereview.chromium.org/259453003/diff/50009/media/base/audio_discard_helper.cc#newcode31 media/base/audio_discard_helper.cc:31: last_input_timestamp_(kNoTimestamp()) { On 2014/04/28 21:52:07, wolenetz wrote: > ...
6 years, 7 months ago (2014-04-28 23:09:02 UTC) #7
wolenetz
All nits now. lgtm % nits: https://codereview.chromium.org/259453003/diff/50009/media/filters/ffmpeg_audio_decoder.cc File media/filters/ffmpeg_audio_decoder.cc (right): https://codereview.chromium.org/259453003/diff/50009/media/filters/ffmpeg_audio_decoder.cc#newcode269 media/filters/ffmpeg_audio_decoder.cc:269: discard_helper_->Reset(discard_frames); On 2014/04/28 ...
6 years, 7 months ago (2014-04-29 00:22:43 UTC) #8
DaleCurtis
Thanks for review. I'll rebase part II momentarily. https://codereview.chromium.org/259453003/diff/50009/media/filters/ffmpeg_audio_decoder.cc File media/filters/ffmpeg_audio_decoder.cc (right): https://codereview.chromium.org/259453003/diff/50009/media/filters/ffmpeg_audio_decoder.cc#newcode269 media/filters/ffmpeg_audio_decoder.cc:269: discard_helper_->Reset(discard_frames); ...
6 years, 7 months ago (2014-04-29 00:28:59 UTC) #9
DaleCurtis
https://codereview.chromium.org/259453003/diff/110001/media/filters/opus_audio_decoder.cc File media/filters/opus_audio_decoder.cc (right): https://codereview.chromium.org/259453003/diff/110001/media/filters/opus_audio_decoder.cc#newcode435 media/filters/opus_audio_decoder.cc:435: discard_helper_->TimeDeltaToFrames(config_.seek_preroll())); On 2014/04/29 00:28:59, DaleCurtis wrote: > On 2014/04/29 ...
6 years, 7 months ago (2014-04-29 00:38:13 UTC) #10
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-04-29 00:38:25 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/259453003/130011
6 years, 7 months ago (2014-04-29 00:39:09 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 04:54:28 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_x64_rel
6 years, 7 months ago (2014-04-29 04:54:29 UTC) #14
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-04-29 05:10:58 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/259453003/150001
6 years, 7 months ago (2014-04-29 05:12:07 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 06:06:22 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 7 months ago (2014-04-29 06:06:23 UTC) #18
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-04-29 06:13:27 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/259453003/150001
6 years, 7 months ago (2014-04-29 06:14:17 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 06:49:09 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_rel
6 years, 7 months ago (2014-04-29 06:49:09 UTC) #22
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-04-29 06:51:32 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/259453003/150001
6 years, 7 months ago (2014-04-29 06:52:30 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 07:08:42 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 7 months ago (2014-04-29 07:08:43 UTC) #26
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-04-29 07:27:15 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/259453003/150001
6 years, 7 months ago (2014-04-29 07:29:23 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 08:24:34 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium
6 years, 7 months ago (2014-04-29 08:24:34 UTC) #30
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-04-29 16:20:24 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/259453003/150001
6 years, 7 months ago (2014-04-29 16:21:06 UTC) #32
DaleCurtis
The CQ bit was unchecked by dalecurtis@chromium.org
6 years, 7 months ago (2014-04-29 20:22:05 UTC) #33
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-04-29 20:22:11 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/259453003/150001
6 years, 7 months ago (2014-04-29 20:41:38 UTC) #35
commit-bot: I haz the power
6 years, 7 months ago (2014-04-29 20:46:58 UTC) #36
Message was sent while issue was closed.
Change committed as 266953

Powered by Google App Engine
This is Rietveld 408576698