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

Issue 8399023: Fire canplaythrough event at the proper time for audio/video (Closed)

Created:
9 years, 1 month ago by vrk (LEFT CHROMIUM)
Modified:
9 years, 1 month ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, acolwell+watch_chromium.org, annacc+watch_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing), ihf+watch_chromium.org
Visibility:
Public.

Description

Fire canplaythrough event at the proper time for audio/video In this CL, the browser fires the canplaythrough event based on an approximation of the download speed of the media instead of firing the event right away. BUG=73609 TEST=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110733

Patch Set 1 #

Patch Set 2 : Move canplaythrough logic into pipeline; fix other stuff #

Total comments: 24

Patch Set 3 : Response to acolwell's CR and reworked estimation logic #

Patch Set 4 : . #

Patch Set 5 : Reflecting in-person and WHATWG discussion #

Patch Set 6 : Adding measurement class #

Patch Set 7 : . #

Patch Set 8 : Rebase and minor fix #

Total comments: 58

Patch Set 9 : Responses to CR #

Patch Set 10 : Remove unneeded bool #

Total comments: 4

Patch Set 11 : Added tests #

Patch Set 12 : . #

Total comments: 12

Patch Set 13 : Responses to CR #

Total comments: 7

Patch Set 14 : Response to CR #

Patch Set 15 : . #

Patch Set 16 : Fix http tests #

Patch Set 17 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+690 lines, -56 lines) Patch
M media/base/demuxer.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
A media/base/download_rate_monitor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +155 lines, -0 lines 0 comments Download
A media/base/download_rate_monitor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +250 lines, -0 lines 0 comments Download
A media/base/download_rate_monitor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +156 lines, -0 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/base/pipeline.h View 1 chunk +8 lines, -4 lines 0 comments Download
M media/base/pipeline_impl.h View 1 2 3 4 5 6 7 8 4 chunks +16 lines, -1 line 0 comments Download
M media/base/pipeline_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +43 lines, -11 lines 0 comments Download
M media/filters/chunk_demuxer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M media/filters/dummy_demuxer.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/dummy_demuxer.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -4 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -0 lines 0 comments Download
M webkit/media/buffered_data_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -5 lines 0 comments Download
M webkit/media/buffered_data_source_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -4 lines 0 comments Download
M webkit/media/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M webkit/media/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +21 lines, -20 lines 0 comments Download
M webkit/media/webmediaplayer_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -2 lines 0 comments Download
M webkit/media/webmediaplayer_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
vrk (LEFT CHROMIUM)
PTAL! I need to do a bit more testing/probably need to add tests, but let ...
9 years, 1 month ago (2011-10-27 01:08:48 UTC) #1
vrk (LEFT CHROMIUM)
Made modifications based on in-person conversation with acolwell! Please take another look, thanks!!
9 years, 1 month ago (2011-10-27 23:57:48 UTC) #2
acolwell GONE FROM CHROMIUM
looking pretty good. Just a few questions/comments. http://codereview.chromium.org/8399023/diff/2001/media/base/demuxer.h File media/base/demuxer.h (right): http://codereview.chromium.org/8399023/diff/2001/media/base/demuxer.h#newcode60 media/base/demuxer.h:60: // Returns ...
9 years, 1 month ago (2011-10-28 18:24:13 UTC) #3
vrk (LEFT CHROMIUM)
Addressed acolwell's comments and uploaded the latest version of the download rate estimation logic, now ...
9 years, 1 month ago (2011-11-01 21:57:34 UTC) #4
vrk (LEFT CHROMIUM)
PTAL! Modified the CanPlayThrough heuristics to fit what we chatted about in person last week. ...
9 years, 1 month ago (2011-11-08 22:11:09 UTC) #5
acolwell GONE FROM CHROMIUM
Looking good. Just a few comments & questions. http://codereview.chromium.org/8399023/diff/24001/media/base/download_rate_monitor.cc File media/base/download_rate_monitor.cc (right): http://codereview.chromium.org/8399023/diff/24001/media/base/download_rate_monitor.cc#newcode24 media/base/download_rate_monitor.cc:24: if ...
9 years, 1 month ago (2011-11-09 00:50:21 UTC) #6
scherkus (not reviewing)
few nits but looking good! http://codereview.chromium.org/8399023/diff/24001/media/base/download_rate_monitor.cc File media/base/download_rate_monitor.cc (right): http://codereview.chromium.org/8399023/diff/24001/media/base/download_rate_monitor.cc#newcode145 media/base/download_rate_monitor.cc:145: // XXX: If the ...
9 years, 1 month ago (2011-11-09 02:55:15 UTC) #7
vrk (LEFT CHROMIUM)
Thanks for the review! Updated the CL to address comments. http://codereview.chromium.org/8399023/diff/24001/media/base/download_rate_monitor.cc File media/base/download_rate_monitor.cc (right): http://codereview.chromium.org/8399023/diff/24001/media/base/download_rate_monitor.cc#newcode24 ...
9 years, 1 month ago (2011-11-11 02:51:06 UTC) #8
acolwell GONE FROM CHROMIUM
Looks good. Just add some unit tests please. http://codereview.chromium.org/8399023/diff/33004/media/base/download_rate_monitor.cc File media/base/download_rate_monitor.cc (right): http://codereview.chromium.org/8399023/diff/33004/media/base/download_rate_monitor.cc#newcode178 media/base/download_rate_monitor.cc:178: if ...
9 years, 1 month ago (2011-11-11 21:05:39 UTC) #9
vrk (LEFT CHROMIUM)
Added tests. http://codereview.chromium.org/8399023/diff/33004/media/base/download_rate_monitor.cc File media/base/download_rate_monitor.cc (right): http://codereview.chromium.org/8399023/diff/33004/media/base/download_rate_monitor.cc#newcode178 media/base/download_rate_monitor.cc:178: if (seconds_elapsed_in_window() > 0.0) On 2011/11/11 21:05:39, ...
9 years, 1 month ago (2011-11-15 16:55:16 UTC) #10
acolwell GONE FROM CHROMIUM
LGTM Most of the comments are documentation nits at this point. http://codereview.chromium.org/8399023/diff/42006/media/base/download_rate_monitor.cc File media/base/download_rate_monitor.cc (right): ...
9 years, 1 month ago (2011-11-15 21:43:10 UTC) #11
vrk (LEFT CHROMIUM)
http://codereview.chromium.org/8399023/diff/42006/media/base/download_rate_monitor.cc File media/base/download_rate_monitor.cc (right): http://codereview.chromium.org/8399023/diff/42006/media/base/download_rate_monitor.cc#newcode180 media/base/download_rate_monitor.cc:180: // seconds until bitrate is calculated ... is that ...
9 years, 1 month ago (2011-11-15 22:41:35 UTC) #12
scherkus (not reviewing)
9 years, 1 month ago (2011-11-16 02:15:17 UTC) #13
LGTM w/ nits

http://codereview.chromium.org/8399023/diff/47004/media/base/download_rate_mo...
File media/base/download_rate_monitor.h (right):

http://codereview.chromium.org/8399023/diff/47004/media/base/download_rate_mo...
media/base/download_rate_monitor.h:22: explicit DownloadRateMonitor();
nit: explicit isn't needed

http://codereview.chromium.org/8399023/diff/47004/media/base/download_rate_mo...
media/base/download_rate_monitor.h:41: void SetTotalBytes(int64 total_bytes) {
total_bytes_ = total_bytes; }
trivial setters/getters should be unix_hacker() style and typically you don't
even need comments as it's quite obvious what's going on

set_total_bytes()

http://codereview.chromium.org/8399023/diff/47004/media/base/download_rate_mo...
media/base/download_rate_monitor.h:44: void SetLoaded(bool loaded) { loaded_ =
loaded; }
set_loaded()

http://codereview.chromium.org/8399023/diff/47004/media/base/download_rate_mo...
media/base/download_rate_monitor.h:66: explicit Sample();
no explicit

http://codereview.chromium.org/8399023/diff/47004/media/base/download_rate_mo...
File media/base/download_rate_monitor_unittest.cc (right):

http://codereview.chromium.org/8399023/diff/47004/media/base/download_rate_mo...
media/base/download_rate_monitor_unittest.cc:31: int SimulateNetwork(const
base::Time& starting_time,
nit: you call base::Time::FromDoubleT() every time so what about making this a
double and doing the conversion here?

your tests should end up less indent-heavy

http://codereview.chromium.org/8399023/diff/47004/media/media.gyp
File media/media.gyp (right):

http://codereview.chromium.org/8399023/diff/47004/media/media.gyp#newcode116
media/media.gyp:116: 'base/download_rate_monitor.h',
djb2 comes before download*

http://codereview.chromium.org/8399023/diff/47004/webkit/glue/webmediaplayer_...
File webkit/glue/webmediaplayer_impl.cc (right):

http://codereview.chromium.org/8399023/diff/47004/webkit/glue/webmediaplayer_...
webkit/glue/webmediaplayer_impl.cc:805: default:
indentation

Powered by Google App Engine
This is Rietveld 408576698