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

Issue 436053002: Make media::AudioClock track frames written to compute time. (Closed)

Created:
6 years, 4 months ago by scherkus (not reviewing)
Modified:
6 years, 4 months ago
Reviewers:
DaleCurtis
CC:
chromium-reviews, feature-media-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Make media::AudioClock track frames written to compute time. Instead of using AudioRendererAlgorithm's timestamp as the ending timestamp and counting "backwards", count "forwards" from a starting timestamp to compute the current media time. Doing so produces more accurate time calculations during periods where the playback rate is changing. last_endpoint_timestamp() is replaced by a new method that computes the amount of contiguous media data buffered by audio hardware. Using this value gives a more accurate maximum time value to use when doing linear interpolation. BUG=367343, 370634 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288445

Patch Set 1 : #

Total comments: 15

Patch Set 2 : fix std::max #

Patch Set 3 : fixes #

Patch Set 4 : fix time_cb #

Total comments: 6

Patch Set 5 : fix things up #

Total comments: 12

Patch Set 6 : #

Patch Set 7 : nits #

Patch Set 8 : rebase #

Patch Set 9 : fix time update #

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+397 lines, -271 lines) Patch
M media/filters/audio_clock.h View 1 2 3 4 1 chunk +50 lines, -34 lines 0 comments Download
M media/filters/audio_clock.cc View 1 2 3 4 5 6 7 1 chunk +96 lines, -103 lines 0 comments Download
M media/filters/audio_clock_unittest.cc View 1 2 3 chunks +210 lines, -110 lines 0 comments Download
M media/filters/audio_renderer_impl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/audio_renderer_impl.cc View 1 2 3 4 5 6 7 8 7 chunks +27 lines, -21 lines 0 comments Download
M media/filters/audio_renderer_impl_unittest.cc View 6 chunks +13 lines, -3 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
scherkus (not reviewing)
6 years, 4 months ago (2014-08-02 00:04:17 UTC) #1
DaleCurtis
The idea seems sound, but recomputing a values which seemingly only change during WroteAudio() makes ...
6 years, 4 months ago (2014-08-02 00:51:33 UTC) #2
scherkus (not reviewing)
On 2014/08/02 00:51:33, DaleCurtis wrote: > The idea seems sound, but recomputing a values which ...
6 years, 4 months ago (2014-08-02 01:55:20 UTC) #3
scherkus (not reviewing)
https://codereview.chromium.org/436053002/diff/40001/media/filters/audio_clock.cc File media/filters/audio_clock.cc (right): https://codereview.chromium.org/436053002/diff/40001/media/filters/audio_clock.cc#newcode33 media/filters/audio_clock.cc:33: int64_t played_frames = std::max(0L, TotalFrames(buffered_) - delay_frames); On 2014/08/02 ...
6 years, 4 months ago (2014-08-02 01:55:25 UTC) #4
DaleCurtis
I'm a little unclear on what you meant by each method being called once. Since ...
6 years, 4 months ago (2014-08-04 18:55:19 UTC) #5
scherkus (not reviewing)
On 2014/08/04 18:55:19, DaleCurtis wrote: > I'm a little unclear on what you meant by ...
6 years, 4 months ago (2014-08-04 21:36:02 UTC) #6
DaleCurtis
I doubt you'll see much difference on x86, but similar reductions of division on single-precision ...
6 years, 4 months ago (2014-08-04 23:28:39 UTC) #7
scherkus (not reviewing)
PTAL https://codereview.chromium.org/436053002/diff/90001/media/filters/audio_clock.cc File media/filters/audio_clock.cc (right): https://codereview.chromium.org/436053002/diff/90001/media/filters/audio_clock.cc#newcode61 media/filters/audio_clock.cc:61: // Update cached values. On 2014/08/04 18:55:19, DaleCurtis ...
6 years, 4 months ago (2014-08-05 00:55:00 UTC) #8
DaleCurtis
https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc File media/filters/audio_clock.cc (right): https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc#newcode69 media/filters/audio_clock.cc:69: if (audio_data_buffered_) This is always true at this point, ...
6 years, 4 months ago (2014-08-05 01:21:31 UTC) #9
scherkus (not reviewing)
https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc File media/filters/audio_clock.cc (right): https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc#newcode69 media/filters/audio_clock.cc:69: if (audio_data_buffered_) On 2014/08/05 01:21:31, DaleCurtis wrote: > This ...
6 years, 4 months ago (2014-08-05 01:44:01 UTC) #10
DaleCurtis
https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc File media/filters/audio_clock.cc (right): https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc#newcode124 media/filters/audio_clock.cc:124: buffered_.front().frames -= frames_to_pop; On 2014/08/05 01:44:01, scherkus wrote: > ...
6 years, 4 months ago (2014-08-05 01:45:51 UTC) #11
scherkus (not reviewing)
https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc File media/filters/audio_clock.cc (right): https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc#newcode124 media/filters/audio_clock.cc:124: buffered_.front().frames -= frames_to_pop; On 2014/08/05 01:45:51, DaleCurtis wrote: > ...
6 years, 4 months ago (2014-08-05 01:57:35 UTC) #12
DaleCurtis
lgtm https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc File media/filters/audio_clock.cc (right): https://codereview.chromium.org/436053002/diff/110001/media/filters/audio_clock.cc#newcode124 media/filters/audio_clock.cc:124: buffered_.front().frames -= frames_to_pop; On 2014/08/05 01:57:35, scherkus wrote: ...
6 years, 4 months ago (2014-08-05 02:13:48 UTC) #13
scherkus (not reviewing)
Thanks for the review. Let's sync up on Tuesday to discuss drift and discontinuities. This ...
6 years, 4 months ago (2014-08-05 03:24:59 UTC) #14
scherkus (not reviewing)
dalecurtis@ and I discussed offline -- the data that arrives via AudioSpliceHelper etc should have ...
6 years, 4 months ago (2014-08-07 20:59:45 UTC) #15
scherkus (not reviewing)
The CQ bit was checked by scherkus@chromium.org
6 years, 4 months ago (2014-08-07 20:59:56 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scherkus@chromium.org/436053002/170001
6 years, 4 months ago (2014-08-07 21:08:03 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel_swarming on tryserver.chromium.mac ...
6 years, 4 months ago (2014-08-08 02:21:24 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-08 03:11:40 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/1005)
6 years, 4 months ago (2014-08-08 03:11:41 UTC) #20
scherkus (not reviewing)
The CQ bit was checked by scherkus@chromium.org
6 years, 4 months ago (2014-08-08 17:28:22 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scherkus@chromium.org/436053002/210001
6 years, 4 months ago (2014-08-08 17:29:44 UTC) #22
commit-bot: I haz the power
6 years, 4 months ago (2014-08-08 21:56:41 UTC) #23
Message was sent while issue was closed.
Change committed as 288445

Powered by Google App Engine
This is Rietveld 408576698