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

Issue 8229013: Fix problem when we did not play beginning of HTML5 audio stream in low latency mode. (Closed)

Created:
9 years, 2 months ago by enal
Modified:
9 years, 2 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, dpranke+watch-content_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, jam, Paweł Hajdan Jr., acolwell+watch_chromium.org, annacc+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing)
Visibility:
Public.

Description

Fix problem when we did not play beginning of HTML5 audio stream in low latency mode. Problem manifested itself on Mac because Mac code is especially sensitive to timing, and because Mac code ignores length of data in buffer -- it assumes buffer is always full, and gives to OS the entire buffer (zeroed out in that case). Fix consists of 2 parts: * When starting audio stream, send request for the data -- previously code depended on data length in the buffer being 0, so it assumed no data would be played, and data would be returned starting from 2nd request. * Implement polling "is data ready?" when starting new stream. Start physical stream only after first chunk data is available (or after ~9ms had passed, to correctly handle "old" clients not writing metadata into buffer). Polling is not continuous, it is done by task delayed by 3ms. Fix is definitely not necessary on Windows, where we have mechanism that handles "bad" timing when requesting new data, but I decided it is better to implement it on all platforms. Added test. BUG=98674 TEST=Go to http://www.jimmysparkle.me/dump/chrome-bug/ and listen to the audio stream. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105311

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -2 lines) Patch
M content/browser/renderer_host/media/audio_sync_reader.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_sync_reader.cc View 1 2 chunks +14 lines, -1 line 0 comments Download
M media/audio/audio_output_controller.h View 1 4 chunks +19 lines, -0 lines 0 comments Download
M media/audio/audio_output_controller.cc View 1 3 chunks +43 lines, -1 line 0 comments Download
M media/audio/audio_output_controller_unittest.cc View 1 3 chunks +54 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
enal
9 years, 2 months ago (2011-10-11 16:39:51 UTC) #1
acolwell GONE FROM CHROMIUM
Looks good. Just a few questions and please add some unit tests. http://codereview.chromium.org/8229013/diff/1/media/audio/audio_output_controller.cc File media/audio/audio_output_controller.cc ...
9 years, 2 months ago (2011-10-12 20:14:03 UTC) #2
enal1
Addressed what I could, explained what I could not, added unit test. http://codereview.chromium.org/8229013/diff/1/media/audio/audio_output_controller.cc File media/audio/audio_output_controller.cc ...
9 years, 2 months ago (2011-10-13 00:39:22 UTC) #3
acolwell GONE FROM CHROMIUM
LGTM http://codereview.chromium.org/8229013/diff/1/media/audio/audio_output_controller.h File media/audio/audio_output_controller.h (right): http://codereview.chromium.org/8229013/diff/1/media/audio/audio_output_controller.h#newcode111 media/audio/audio_output_controller.h:111: // returns false. Ok. Sorry to hear this. ...
9 years, 2 months ago (2011-10-13 00:52:47 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enal@chromium.org/8229013/5001
9 years, 2 months ago (2011-10-13 01:57:37 UTC) #5
commit-bot: I haz the power
Try job failure for 8229013-5001 on mac_rel for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=1823 Step "update" is always ...
9 years, 2 months ago (2011-10-13 02:02:38 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enal@chromium.org/8229013/5001
9 years, 2 months ago (2011-10-13 14:04:40 UTC) #7
commit-bot: I haz the power
9 years, 2 months ago (2011-10-13 16:18:06 UTC) #8
Change committed as 105311

Powered by Google App Engine
This is Rietveld 408576698