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

Issue 10915123: Adds media::AudioPullFifo class to Chrome. (Closed)

Created:
8 years, 3 months ago by henrika (OOO until Aug 14)
Modified:
8 years, 3 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, scherkus (not reviewing)
Visibility:
Public.

Description

Adds media::AudioPullFifo class to Chrome. A FIFO (First In First Out) buffer to handle mismatches in buffer sizes between a provider and consumer. The consumer will pull data from this FIFO. If data is already available in the FIFO, it is provided to the consumer. If insufficient data is available to satisfy the request, the FIFO will ask the provider for more data to fulfill a request. BUG=none TEST=--gtest_filter=AudioPullFifoTest.*

Patch Set 1 #

Patch Set 2 : Finalized AudioPullFifo and added unit test #

Total comments: 9

Patch Set 3 : AudioFIFO changes based on comments from Andrew #

Total comments: 8

Patch Set 4 : Adds start_frame parameter to AudioFifo::Consume() #

Patch Set 5 : Removed read_frames param and improved core implementation #

Patch Set 6 : Added TODOs from Dale #

Total comments: 3

Patch Set 7 : Last cleanup and changes based on feedback from Andrew #

Patch Set 8 : Now builds on all platforms #

Total comments: 12

Patch Set 9 : More changes proposed by Dale #

Patch Set 10 : Added Clear() method #

Total comments: 6

Patch Set 11 : Rebased #

Patch Set 12 : Nits #

Patch Set 13 : just do it #

Patch Set 14 : removed #

Patch Set 15 : again #

Patch Set 16 : test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+787 lines, -105 lines) Patch
A .gitmodules View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +496 lines, -0 lines 0 comments Download
M media/base/audio_fifo.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +11 lines, -11 lines 0 comments Download
M media/base/audio_fifo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +21 lines, -28 lines 0 comments Download
M media/base/audio_fifo_unittest.cc View 1 2 3 8 chunks +46 lines, -66 lines 0 comments Download
A media/base/audio_pull_fifo.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +62 lines, -0 lines 0 comments Download
A media/base/audio_pull_fifo.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +59 lines, -0 lines 0 comments Download
A media/base/audio_pull_fifo_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +89 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
henrika (OOO until Aug 14)
Initial raw version. Compiles but I have not tested it at all. Dale: feel free ...
8 years, 3 months ago (2012-09-06 15:14:03 UTC) #1
henrika (OOO until Aug 14)
Added unit test and cleaned things up. Ready for review now.
8 years, 3 months ago (2012-09-07 11:36:53 UTC) #2
henrika (OOO until Aug 14)
Will add AudioFifo changes based on feedback from Andrew to this CL as well.
8 years, 3 months ago (2012-09-07 11:38:21 UTC) #3
DaleCurtis
https://chromiumcodereview.appspot.com/10915123/diff/2001/media/base/audio_pull_fifo.cc File media/base/audio_pull_fifo.cc (right): https://chromiumcodereview.appspot.com/10915123/diff/2001/media/base/audio_pull_fifo.cc#newcode11 media/base/audio_pull_fifo.cc:11: AudioPullFifo::AudioPullFifo(int channels, int frames, Do we really need |read_frames|? ...
8 years, 3 months ago (2012-09-07 13:48:38 UTC) #4
scherkus (not reviewing)
few nits -- leaving it up to dale/crogers to review the in-depth bits https://chromiumcodereview.appspot.com/10915123/diff/6002/media/base/audio_fifo.h File ...
8 years, 3 months ago (2012-09-07 14:19:03 UTC) #5
scherkus (not reviewing)
also can you update the CL description to include a few more details on use, ...
8 years, 3 months ago (2012-09-07 14:23:57 UTC) #6
henrika (OOO until Aug 14)
I had a long discussion with Dale and we decided to change the design so ...
8 years, 3 months ago (2012-09-07 16:06:42 UTC) #7
DaleCurtis
https://chromiumcodereview.appspot.com/10915123/diff/11002/media/base/audio_pull_fifo.cc File media/base/audio_pull_fifo.cc (right): https://chromiumcodereview.appspot.com/10915123/diff/11002/media/base/audio_pull_fifo.cc#newcode24 media/base/audio_pull_fifo.cc:24: DCHECK(destination); Add a DCHECK_LE(frames_to_consume, destination->frames()); https://chromiumcodereview.appspot.com/10915123/diff/11002/media/base/audio_pull_fifo.cc#newcode33 media/base/audio_pull_fifo.cc:33: read_cb_.Run(bus_.get()); This ...
8 years, 3 months ago (2012-09-07 16:24:00 UTC) #8
henrika (OOO until Aug 14)
http://codereview.chromium.org/10915123/diff/6002/media/base/audio_fifo.h File media/base/audio_fifo.h (right): http://codereview.chromium.org/10915123/diff/6002/media/base/audio_fifo.h#newcode24 media/base/audio_fifo.h:24: // This call crash fail if the allocated space ...
8 years, 3 months ago (2012-09-10 07:23:04 UTC) #9
henrika (OOO until Aug 14)
PTAL Dale and Andrew. Dale, I clean up the version we came up with last ...
8 years, 3 months ago (2012-09-10 07:25:28 UTC) #10
DaleCurtis
LGTM % nits. Thanks Henrik! https://chromiumcodereview.appspot.com/10915123/diff/11004/media/base/audio_pull_fifo.cc File media/base/audio_pull_fifo.cc (right): https://chromiumcodereview.appspot.com/10915123/diff/11004/media/base/audio_pull_fifo.cc#newcode7 media/base/audio_pull_fifo.cc:7: #include "media/base/audio_pull_fifo.h" Needs to ...
8 years, 3 months ago (2012-09-10 08:28:25 UTC) #11
henrika (OOO until Aug 14)
Done. http://codereview.chromium.org/10915123/diff/11004/media/base/audio_pull_fifo.cc File media/base/audio_pull_fifo.cc (right): http://codereview.chromium.org/10915123/diff/11004/media/base/audio_pull_fifo.cc#newcode7 media/base/audio_pull_fifo.cc:7: #include "media/base/audio_pull_fifo.h" On 2012/09/10 08:28:26, DaleCurtis wrote: > ...
8 years, 3 months ago (2012-09-10 09:35:30 UTC) #12
DaleCurtis
lgtm!
8 years, 3 months ago (2012-09-10 09:40:53 UTC) #13
scherkus (not reviewing)
lgtm w/ nits http://codereview.chromium.org/10915123/diff/3015/media/base/audio_fifo.h File media/base/audio_fifo.h (right): http://codereview.chromium.org/10915123/diff/3015/media/base/audio_fifo.h#newcode24 media/base/audio_fifo.h:24: // Push() will crash if the ...
8 years, 3 months ago (2012-09-10 10:56:35 UTC) #14
henrika (OOO until Aug 14)
http://codereview.chromium.org/10915123/diff/3015/media/base/audio_fifo.h File media/base/audio_fifo.h (right): http://codereview.chromium.org/10915123/diff/3015/media/base/audio_fifo.h#newcode24 media/base/audio_fifo.h:24: // Push() will crash if the allocated space is ...
8 years, 3 months ago (2012-09-10 11:14:23 UTC) #15
scherkus (not reviewing)
8 years, 3 months ago (2012-09-10 16:27:43 UTC) #16
Due to henrika's checkout self-immolating I uploaded a rebased copy as
http://codereview.chromium.org/10914178/ and landed as r155744

Powered by Google App Engine
This is Rietveld 408576698