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

Issue 256163005: Introduce AudioClock to improve playback delay calculations. (Closed)

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

Description

Introduce AudioClock to improve playback time calculations. The previous method for calculating playback time assumed all data currently buffered contained audio data scaled at the same rate. In reality, when the playback rate changes we enter a brief period where audio data scaled at different rates is buffered. The end result was that the media clock would jump backwards/forwards, introducing playback jank. BUG=367343 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267982

Patch Set 1 #

Total comments: 6

Patch Set 2 : AudioClock #

Total comments: 38

Patch Set 3 : comments #

Patch Set 4 : fix eos #

Unified diffs Side-by-side diffs Delta from patch set Stats (+452 lines, -63 lines) Patch
A media/filters/audio_clock.h View 1 2 1 chunk +76 lines, -0 lines 0 comments Download
A media/filters/audio_clock.cc View 1 2 1 chunk +135 lines, -0 lines 0 comments Download
A media/filters/audio_clock_unittest.cc View 1 2 1 chunk +177 lines, -0 lines 0 comments Download
M media/filters/audio_renderer_impl.h View 1 2 chunks +4 lines, -6 lines 0 comments Download
M media/filters/audio_renderer_impl.cc View 1 2 3 7 chunks +35 lines, -53 lines 0 comments Download
M media/filters/audio_renderer_impl_unittest.cc View 1 2 3 1 chunk +22 lines, -4 lines 0 comments Download
M media/media.gyp View 1 2 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
scherkus (not reviewing)
there's a failing test I'm investigating, but would like to get your feedback on API ...
6 years, 7 months ago (2014-04-29 17:22:06 UTC) #1
DaleCurtis
What you're essentially doing is creating a new clock. crogers@ advocated for a similar design ...
6 years, 7 months ago (2014-04-29 17:55:53 UTC) #2
scherkus (not reviewing)
thanks for the feedback! re "simplify the current time calculations as well" --> are you ...
6 years, 7 months ago (2014-04-29 18:19:03 UTC) #3
DaleCurtis
https://codereview.chromium.org/256163005/diff/1/media/filters/buffered_audio_tracker.h File media/filters/buffered_audio_tracker.h (right): https://codereview.chromium.org/256163005/diff/1/media/filters/buffered_audio_tracker.h#newcode29 media/filters/buffered_audio_tracker.h:29: void WroteAudio(int frames, float playback_rate); On 2014/04/29 18:19:03, scherkus ...
6 years, 7 months ago (2014-04-29 18:31:01 UTC) #4
DaleCurtis
I mean both. With the right approach, this is a piece of code that could ...
6 years, 7 months ago (2014-04-29 18:31:09 UTC) #5
scherkus (not reviewing)
PTAL https://codereview.chromium.org/256163005/diff/20001/media/filters/audio_clock.h File media/filters/audio_clock.h (right): https://codereview.chromium.org/256163005/diff/20001/media/filters/audio_clock.h#newcode34 media/filters/audio_clock.h:34: void WroteSilence(int frames, int delay_frames); went with two ...
6 years, 7 months ago (2014-04-30 19:13:57 UTC) #6
DaleCurtis
lgtm % one potential error and a bunch of up to you nits. https://codereview.chromium.org/256163005/diff/20001/media/filters/audio_clock.cc File ...
6 years, 7 months ago (2014-04-30 20:36:33 UTC) #7
DaleCurtis
Also, please rewrite the change description to be < 72 chars per line :)
6 years, 7 months ago (2014-04-30 20:37:51 UTC) #8
scherkus (not reviewing)
On 2014/04/30 20:37:51, DaleCurtis wrote: > Also, please rewrite the change description to be < ...
6 years, 7 months ago (2014-04-30 20:55:28 UTC) #9
DaleCurtis
On 2014/04/30 20:55:28, scherkus wrote: > On 2014/04/30 20:37:51, DaleCurtis wrote: > > Also, please ...
6 years, 7 months ago (2014-04-30 21:01:33 UTC) #10
scherkus (not reviewing)
there's still a CHECK() that's getting triggered in some tests going to dig in to ...
6 years, 7 months ago (2014-05-02 19:26:05 UTC) #11
DaleCurtis
Still lgtm. Telemetry tests don't seem to spit out where the crash is actually happening ...
6 years, 7 months ago (2014-05-02 19:37:06 UTC) #12
scherkus (not reviewing)
I have the gpu bot CHECK()s repro'ing locally One of the webm files they use ...
6 years, 7 months ago (2014-05-02 19:42:28 UTC) #13
DaleCurtis
Weird, all decoded output should be timestamped by the decoders. There are checks in place ...
6 years, 7 months ago (2014-05-02 19:56:07 UTC) #14
scherkus (not reviewing)
On 2014/05/02 19:56:07, DaleCurtis wrote: > Weird, all decoded output should be timestamped by the ...
6 years, 7 months ago (2014-05-02 20:18:28 UTC) #15
DaleCurtis
lgtm. What test file is it that is sending an immediate EOS?
6 years, 7 months ago (2014-05-02 20:22:18 UTC) #16
scherkus (not reviewing)
On 2014/05/02 20:22:18, DaleCurtis wrote: > lgtm. What test file is it that is sending ...
6 years, 7 months ago (2014-05-02 20:45:47 UTC) #17
DaleCurtis
Looks like vorbis audio, but it's all preroll so it's trimmed audio.
6 years, 7 months ago (2014-05-02 20:49:10 UTC) #18
scherkus (not reviewing)
The CQ bit was checked by scherkus@chromium.org
6 years, 7 months ago (2014-05-02 21:05:19 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scherkus@chromium.org/256163005/50001
6 years, 7 months ago (2014-05-02 21:05:53 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 21:21:20 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium
6 years, 7 months ago (2014-05-02 21:21:21 UTC) #22
scherkus (not reviewing)
The CQ bit was checked by scherkus@chromium.org
6 years, 7 months ago (2014-05-02 21:22:35 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scherkus@chromium.org/256163005/50001
6 years, 7 months ago (2014-05-02 21:23:25 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 21:28:09 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel on tryserver.chromium
6 years, 7 months ago (2014-05-02 21:28:09 UTC) #26
scherkus (not reviewing)
The CQ bit was checked by scherkus@chromium.org
6 years, 7 months ago (2014-05-02 21:30:15 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scherkus@chromium.org/256163005/50001
6 years, 7 months ago (2014-05-02 21:32:00 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 21:48:40 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel on tryserver.chromium
6 years, 7 months ago (2014-05-02 21:48:41 UTC) #30
scherkus (not reviewing)
The CQ bit was checked by scherkus@chromium.org
6 years, 7 months ago (2014-05-02 21:57:48 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scherkus@chromium.org/256163005/50001
6 years, 7 months ago (2014-05-02 21:58:32 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 22:01:15 UTC) #33
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 22:01:16 UTC) #34
scherkus (not reviewing)
The CQ bit was checked by scherkus@chromium.org
6 years, 7 months ago (2014-05-02 22:06:17 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scherkus@chromium.org/256163005/50001
6 years, 7 months ago (2014-05-02 22:06:31 UTC) #36
commit-bot: I haz the power
6 years, 7 months ago (2014-05-03 00:06:02 UTC) #37
Message was sent while issue was closed.
Change committed as 267982

Powered by Google App Engine
This is Rietveld 408576698