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

Issue 261533002: Remove AudioBuffer::set_duration(), instead base on frames. (Closed)

Created:
6 years, 7 months ago by DaleCurtis
Modified:
6 years, 7 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, wolenetz
Visibility:
Public.

Description

Remove AudioBuffer::set_duration(), instead base on frames. wolenetz@ asked on https://codereview.chromium.org/251893002/ why we allow set_duration() to be called. It used to be required since AudioBuffers had no concept of sample rate. However, we now attach a sample rate to every AudioBuffer which allows us to enforce a valid duration for every buffer. This CL also aligns MakeAudioBuffer() to do the same thing with planar and interleaved data for the sake of easier testing. BUG=none TEST=media_unittests NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267779 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267842

Patch Set 1 : Align MakeAudioBuffer(). #

Patch Set 2 : Fix content decryptor #

Total comments: 5

Patch Set 3 : Comments. #

Patch Set 4 : Fix cast. Format. #

Patch Set 5 : Fix divide by zero case. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+319 lines, -449 lines) Patch
M content/renderer/pepper/content_decryptor_delegate.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M media/base/audio_buffer.h View 1 2 4 chunks +3 lines, -9 lines 0 comments Download
M media/base/audio_buffer.cc View 1 2 3 4 10 chunks +22 lines, -31 lines 0 comments Download
M media/base/audio_buffer_converter.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M media/base/audio_buffer_converter_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M media/base/audio_buffer_queue_unittest.cc View 16 chunks +98 lines, -118 lines 0 comments Download
M media/base/audio_buffer_unittest.cc View 15 chunks +126 lines, -172 lines 0 comments Download
M media/base/audio_discard_helper.cc View 1 chunk +1 line, -3 lines 0 comments Download
M media/base/audio_discard_helper_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M media/base/audio_splicer.cc View 1 2 3 4 chunks +7 lines, -26 lines 0 comments Download
M media/base/audio_splicer_unittest.cc View 1 2 3 5 chunks +18 lines, -17 lines 0 comments Download
M media/base/test_helpers.h View 1 1 chunk +17 lines, -26 lines 0 comments Download
M media/base/test_helpers.cc View 1 2 3 3 chunks +24 lines, -29 lines 0 comments Download
M media/filters/audio_renderer_algorithm_unittest.cc View 3 chunks +0 lines, -3 lines 0 comments Download
M media/filters/audio_renderer_impl_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M media/filters/decrypting_audio_decoder.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M media/filters/decrypting_audio_decoder_unittest.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22 (0 generated)
DaleCurtis
Per comments on the other review, this could be removed w/ a bit of yak ...
6 years, 7 months ago (2014-04-29 23:20:30 UTC) #1
DaleCurtis
Since wolenetz@ is out, over to jrummell@ who wrote most of this code.
6 years, 7 months ago (2014-04-30 20:40:35 UTC) #2
DaleCurtis
+dmichael for parameter removal in content/renderer/pepper/content_decryptor_delegate.cc
6 years, 7 months ago (2014-05-01 18:06:42 UTC) #3
dmichael (off chromium)
content/renderer/pepper lgtm
6 years, 7 months ago (2014-05-01 19:59:46 UTC) #4
wolenetz
https://codereview.chromium.org/261533002/diff/60001/media/base/audio_buffer.h File media/base/audio_buffer.h (right): https://codereview.chromium.org/261533002/diff/60001/media/base/audio_buffer.h#newcode38 media/base/audio_buffer.h:38: // TODO(jrummell): Compute duration rather than pass it in. ...
6 years, 7 months ago (2014-05-01 20:18:24 UTC) #5
jrummell
lgtm https://codereview.chromium.org/261533002/diff/60001/media/base/audio_buffer.cc File media/base/audio_buffer.cc (right): https://codereview.chromium.org/261533002/diff/60001/media/base/audio_buffer.cc#newcode35 media/base/audio_buffer.cc:35: duration_(CalculateDuration(adjusted_frame_count_, sample_rate_)) { nit: Would it be better ...
6 years, 7 months ago (2014-05-01 20:26:25 UTC) #6
DaleCurtis
https://codereview.chromium.org/261533002/diff/60001/media/base/audio_buffer.cc File media/base/audio_buffer.cc (right): https://codereview.chromium.org/261533002/diff/60001/media/base/audio_buffer.cc#newcode35 media/base/audio_buffer.cc:35: duration_(CalculateDuration(adjusted_frame_count_, sample_rate_)) { On 2014/05/01 20:26:26, jrummell wrote: > ...
6 years, 7 months ago (2014-05-01 20:33:18 UTC) #7
DaleCurtis
Thanks for review!
6 years, 7 months ago (2014-05-01 20:33:28 UTC) #8
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-05-01 20:33:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/261533002/70001
6 years, 7 months ago (2014-05-01 20:33:42 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 00:15:18 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium
6 years, 7 months ago (2014-05-02 00:15:18 UTC) #12
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-05-02 04:25:00 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/261533002/70001
6 years, 7 months ago (2014-05-02 04:25:49 UTC) #14
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-05-02 04:47:19 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/261533002/90001
6 years, 7 months ago (2014-05-02 04:47:45 UTC) #16
commit-bot: I haz the power
Change committed as 267779
6 years, 7 months ago (2014-05-02 09:55:54 UTC) #17
falken
A revert of this CL has been created in https://codereview.chromium.org/265943002/ by falken@chromium.org. The reason for ...
6 years, 7 months ago (2014-05-02 10:50:29 UTC) #18
DaleCurtis
Wow, that bot is smart, sadly not smart enough to tell me where, but in ...
6 years, 7 months ago (2014-05-02 17:27:14 UTC) #19
DaleCurtis
The CQ bit was checked by dalecurtis@chromium.org
6 years, 7 months ago (2014-05-02 17:28:11 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/261533002/110001
6 years, 7 months ago (2014-05-02 17:28:58 UTC) #21
commit-bot: I haz the power
6 years, 7 months ago (2014-05-02 17:33:01 UTC) #22
Message was sent while issue was closed.
Change committed as 267842

Powered by Google App Engine
This is Rietveld 408576698