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

Issue 1714593003: Introduce media::AudioPushFifo and a couple of use cases (and clean-ups). (Closed)

Created:
4 years, 10 months ago by miu
Modified:
4 years, 10 months ago
CC:
avayvod+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, imcheng+watch_chromium.org, isheriff+watch_chromium.org, jam, jasonroberts+watch_google.com, mcasas+watch_chromium.org, miu+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, xjz+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce media::AudioPushFifo and a couple of use cases (and clean-ups). The media::AudioPushFifo is yet another FIFO for audio data. It is the "push" version of the existing media::AudioPullFifo. Two audio-handling implementations are switched over to using the new AudioPushFifo in this change, with a few more to follow in later changes: 1. Cast Receiver glue: While there was no FIFO before, one will be required due to future refactoring work in the MediaStream audio framework. In addition, a time value calculation was fixed, to adhere to the media::AudioCapturerSource interface contract. 2. content::WebAudioCapturerSource: The code using the AudioFifo implementation was simplified by using AudioPushFifo instead. BUG=577881, 577874 Committed: https://crrev.com/7e920b99ed879f2b08393ff0e5664f60281e274e Cr-Commit-Position: refs/heads/master@{#377457}

Patch Set 1 : #

Patch Set 2 : Fix Win compile issue. #

Total comments: 24

Patch Set 3 : Addressed all review comments. Now called AudioPushFifo. REBASED #

Total comments: 10

Patch Set 4 : Address dale's 2nd round comments. Added Flush() with more unit testing. #

Total comments: 8

Patch Set 5 : addressed last round of comments #

Patch Set 6 : Fix unittest compile breakage caused by recent method rename. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+540 lines, -77 lines) Patch
M chrome/renderer/media/cast_receiver_audio_valve.h View 1 2 3 1 chunk +27 lines, -11 lines 0 comments Download
M chrome/renderer/media/cast_receiver_audio_valve.cc View 1 2 3 1 chunk +40 lines, -11 lines 0 comments Download
M chrome/renderer/media/cast_receiver_session.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/media/cast_receiver_session_delegate.cc View 1 chunk +3 lines, -9 lines 0 comments Download
M chrome/renderer/media/cast_rtp_stream.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/media/webaudio_capturer_source.h View 1 2 3 4 3 chunks +18 lines, -6 lines 0 comments Download
M content/renderer/media/webaudio_capturer_source.cc View 1 2 3 4 4 chunks +30 lines, -38 lines 0 comments Download
M media/base/BUILD.gn View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
A media/base/audio_push_fifo.h View 1 2 3 4 1 chunk +73 lines, -0 lines 0 comments Download
A media/base/audio_push_fifo.cc View 1 2 3 4 1 chunk +86 lines, -0 lines 0 comments Download
A media/base/audio_push_fifo_unittest.cc View 1 2 3 4 5 1 chunk +256 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (15 generated)
miu
dalecurtis: PTAL at media/* olka: PTAL at content/renderer/media/webaudio_capturer_source.* xjz: PTAL at all files with "cast" ...
4 years, 10 months ago (2016-02-19 01:29:05 UTC) #4
o1ka
adding grunell as a reviewer - I'm sure he is interested in this change
4 years, 10 months ago (2016-02-19 09:36:54 UTC) #6
DaleCurtis
It seems like this is the opposite of AudioPullFIFO. I.e. it's a AudioPushFifo? AudioBlockFIFO allows ...
4 years, 10 months ago (2016-02-20 00:07:22 UTC) #7
xjz
lgtm. nits: https://codereview.chromium.org/1714593003/diff/40001/chrome/renderer/media/cast_receiver_audio_valve.cc File chrome/renderer/media/cast_receiver_audio_valve.cc (right): https://codereview.chromium.org/1714593003/diff/40001/chrome/renderer/media/cast_receiver_audio_valve.cc#newcode22 chrome/renderer/media/cast_receiver_audio_valve.cc:22: rechunker_.SetSampleRate(params.sample_rate()); Need to check returning true? https://codereview.chromium.org/1714593003/diff/40001/media/base/audio_rechunker.cc ...
4 years, 10 months ago (2016-02-20 01:53:05 UTC) #8
o1ka
Looks good, could you explain more on "exactly re-chunk" vs "not exactly"? How clients are ...
4 years, 10 months ago (2016-02-22 13:04:48 UTC) #9
miu
Now that Dale pointed out that there's an AudioPullFifo, I turned my AudioRechunker into an ...
4 years, 10 months ago (2016-02-23 04:27:41 UTC) #11
DaleCurtis
Just reviewed AudioPullFifo, lgtm do you want to support any kind of flush functionality? https://codereview.chromium.org/1714593003/diff/60001/media/base/audio_push_fifo.cc ...
4 years, 10 months ago (2016-02-23 20:34:26 UTC) #12
xjz
lgtm https://codereview.chromium.org/1714593003/diff/60001/media/base/audio_push_fifo.cc File media/base/audio_push_fifo.cc (right): https://codereview.chromium.org/1714593003/diff/60001/media/base/audio_push_fifo.cc#newcode21 media/base/audio_push_fifo.cc:21: audio_queue_.reset(); Is it possible that there are still ...
4 years, 10 months ago (2016-02-23 22:03:02 UTC) #13
miu
https://codereview.chromium.org/1714593003/diff/60001/media/base/audio_push_fifo.cc File media/base/audio_push_fifo.cc (right): https://codereview.chromium.org/1714593003/diff/60001/media/base/audio_push_fifo.cc#newcode21 media/base/audio_push_fifo.cc:21: audio_queue_.reset(); On 2016/02/23 22:03:02, xjz wrote: > Is it ...
4 years, 10 months ago (2016-02-23 23:32:34 UTC) #15
o1ka
nice! lgtm. https://codereview.chromium.org/1714593003/diff/100001/media/base/audio_push_fifo.h File media/base/audio_push_fifo.h (right): https://codereview.chromium.org/1714593003/diff/100001/media/base/audio_push_fifo.h#newcode45 media/base/audio_push_fifo.h:45: void Reset(int frames_per_buffer); match parameter name with ...
4 years, 10 months ago (2016-02-24 09:23:30 UTC) #16
Irfan
couple nits from a quick scan https://codereview.chromium.org/1714593003/diff/100001/content/renderer/media/webaudio_capturer_source.h File content/renderer/media/webaudio_capturer_source.h (right): https://codereview.chromium.org/1714593003/diff/100001/content/renderer/media/webaudio_capturer_source.h#newcode96 content/renderer/media/webaudio_capturer_source.h:96: // DeviliverRebufferedAudio(). DeliverRebufferedAudio ...
4 years, 10 months ago (2016-02-24 19:04:30 UTC) #18
miu
Thanks irfan and o1ka. All comments addressed. https://codereview.chromium.org/1714593003/diff/100001/content/renderer/media/webaudio_capturer_source.h File content/renderer/media/webaudio_capturer_source.h (right): https://codereview.chromium.org/1714593003/diff/100001/content/renderer/media/webaudio_capturer_source.h#newcode96 content/renderer/media/webaudio_capturer_source.h:96: // DeviliverRebufferedAudio(). ...
4 years, 10 months ago (2016-02-24 22:16:42 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1714593003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1714593003/140001
4 years, 10 months ago (2016-02-24 22:17:36 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/26671) cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 10 months ago (2016-02-24 22:35:13 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1714593003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1714593003/160001
4 years, 10 months ago (2016-02-25 00:17:08 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:160001)
4 years, 10 months ago (2016-02-25 01:39:31 UTC) #30
commit-bot: I haz the power
4 years, 10 months ago (2016-02-25 01:40:44 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/7e920b99ed879f2b08393ff0e5664f60281e274e
Cr-Commit-Position: refs/heads/master@{#377457}

Powered by Google App Engine
This is Rietveld 408576698