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

Issue 16103007: Privitize WaitTillDataReady() and DataReady(). (Closed)

Created:
7 years, 6 months ago by DaleCurtis
Modified:
7 years, 6 months ago
CC:
chromium-reviews, MAD, jar (doing other things), jam, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, Ilya Sherman
Visibility:
Public.

Description

Privitize WaitTillDataReady() and DataReady(). There's no reason for these to be called all over the code base when we know the limited circumstances under which they must be called. Making these private allows for a considerable cleanup of code. The one sketchy part about this CL is removing PollAndStartIfDataReady() for OSX. I believe stream startup times are long enough that data will always be ready though. If this is not the case and our OSX stats for DataReady() plummet, we can find a simpler solution then polling. This change also fixes inaccuracy with the UMA histogram since previously we were reporting DataReady() after WaitTilDataReady() had already been called. BUG=none TEST=audio plays w/o glitching on mac, win, linux. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204172

Patch Set 1 : Rebase. #

Total comments: 6

Patch Set 2 : Nits. #

Patch Set 3 : Gotta catch'em all! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -156 lines) Patch
M content/browser/renderer_host/media/audio_sync_reader.h View 2 chunks +9 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/audio_sync_reader.cc View 1 2 chunks +30 lines, -2 lines 0 comments Download
M media/audio/audio_io.h View 1 chunk +0 lines, -4 lines 0 comments Download
M media/audio/audio_low_latency_input_output_unittest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M media/audio/audio_output_controller.h View 1 10 chunks +14 lines, -33 lines 0 comments Download
M media/audio/audio_output_controller.cc View 1 7 chunks +14 lines, -77 lines 0 comments Download
M media/audio/audio_output_controller_unittest.cc View 1 3 chunks +4 lines, -8 lines 0 comments Download
M media/audio/audio_output_resampler.cc View 1 2 chunks +0 lines, -7 lines 0 comments Download
M media/audio/linux/alsa_output.cc View 1 chunk +1 line, -3 lines 0 comments Download
M media/audio/pulse/pulse_input.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M media/audio/pulse/pulse_output.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M media/audio/pulse/pulse_unified.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M media/audio/virtual_audio_output_stream.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M media/audio/win/waveout_output_win.cc View 2 chunks +0 lines, -11 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
DaleCurtis
7 years, 6 months ago (2013-05-29 22:57:29 UTC) #1
DaleCurtis
+justinlin for the virtual_audio_output_stream.cc change.
7 years, 6 months ago (2013-05-29 23:00:12 UTC) #2
justinlin
On 2013/05/29 23:00:12, DaleCurtis wrote: > +justinlin for the virtual_audio_output_stream.cc change. lgtm for virtual_audio_output_stream.cc
7 years, 6 months ago (2013-05-30 18:06:05 UTC) #3
henrika (OOO until Aug 14)
LGTM w/ nits. However, it is not 100% clear to me that the removal of ...
7 years, 6 months ago (2013-06-03 07:57:12 UTC) #4
henrika (OOO until Aug 14)
https://codereview.chromium.org/16103007/diff/2001/content/browser/renderer_host/media/audio_sync_reader.cc File content/browser/renderer_host/media/audio_sync_reader.cc (right): https://codereview.chromium.org/16103007/diff/2001/content/browser/renderer_host/media/audio_sync_reader.cc#newcode171 content/browser/renderer_host/media/audio_sync_reader.cc:171: const base::TimeDelta kMaxWait = base::TimeDelta::FromMilliseconds(20); Is it OK to ...
7 years, 6 months ago (2013-06-03 07:57:17 UTC) #5
DaleCurtis
crogers: Any other comments? https://codereview.chromium.org/16103007/diff/2001/content/browser/renderer_host/media/audio_sync_reader.cc File content/browser/renderer_host/media/audio_sync_reader.cc (right): https://codereview.chromium.org/16103007/diff/2001/content/browser/renderer_host/media/audio_sync_reader.cc#newcode171 content/browser/renderer_host/media/audio_sync_reader.cc:171: const base::TimeDelta kMaxWait = base::TimeDelta::FromMilliseconds(20); ...
7 years, 6 months ago (2013-06-04 00:35:41 UTC) #6
Chris Rogers
Thanks Dale, definitely an improvement! lgtm
7 years, 6 months ago (2013-06-04 19:25:18 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/16103007/16001
7 years, 6 months ago (2013-06-04 19:54:27 UTC) #8
commit-bot: I haz the power
7 years, 6 months ago (2013-06-05 06:12:37 UTC) #9
Message was sent while issue was closed.
Change committed as 204172

Powered by Google App Engine
This is Rietveld 408576698