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

Issue 2796193002: fix canplaythrough (Closed)

Created:
3 years, 8 months ago by hubbe
Modified:
3 years, 7 months ago
CC:
apacible+watch_chromium.org, chromium-reviews, erickung+watch_chromium.org, feature-media-reviews_chromium.org, miu+watch_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

fix canplaythrough This makes canplaythrough follow the spec. It fires when we estimate that we have enough data to play to the end, or when we stop downloading because the buffer is full. We do this by keeping a time series in BufferedDataSourceHostImpl which is used to estimate the download speed over the last 10 seconds. BUG=73609 Review-Url: https://codereview.chromium.org/2796193002 Cr-Commit-Position: refs/heads/master@{#469797} Committed: https://chromium.googlesource.com/chromium/src/+/b2d3efd2ec18ffd52c3dacfece9862366b565a3d

Patch Set 1 #

Patch Set 2 : event-driven, better rate estimator #

Patch Set 3 : test compile fix #

Total comments: 16

Patch Set 4 : comments addressed #

Patch Set 5 : test added #

Patch Set 6 : comments addressed #

Total comments: 35

Patch Set 7 : comments addressed #

Total comments: 1

Patch Set 8 : merged #

Patch Set 9 : shortcut for fully buffered data #

Patch Set 10 : no bytes left to download -> canplay #

Patch Set 11 : not downloading -> canplaythrough = true #

Total comments: 18

Patch Set 12 : comments addressed #

Patch Set 13 : tick clock fixes #

Patch Set 14 : merged #

Patch Set 15 : merged #

Total comments: 8

Patch Set 16 : nits fixed, now behind a flag #

Patch Set 17 : merged #

Total comments: 2

Patch Set 18 : kSpecCompliantCanPlayThrough #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -40 lines) Patch
M media/base/media_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +7 lines, -6 lines 0 comments Download
M media/base/media_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M media/blink/buffered_data_source_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +32 lines, -1 line 0 comments Download
M media/blink/buffered_data_source_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +125 lines, -4 lines 0 comments Download
M media/blink/buffered_data_source_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +80 lines, -2 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +13 lines, -2 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +50 lines, -24 lines 0 comments Download
M media/blink/webmediaplayer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 114 (77 generated)
hubbe
I suspect I will need to update some tests....
3 years, 8 months ago (2017-04-05 00:12:57 UTC) #3
DaleCurtis
Can you update the CL description with some more details on what you're doing here? ...
3 years, 8 months ago (2017-04-05 00:18:07 UTC) #5
hubbe
On 2017/04/05 00:18:07, DaleCurtis wrote: > Can you update the CL description with some more ...
3 years, 8 months ago (2017-04-05 21:11:33 UTC) #10
DaleCurtis
Need to look more closely, but I think this will trample the have_enough vs have_nothing ...
3 years, 8 months ago (2017-04-05 23:20:03 UTC) #19
mlamouri (slow - plz ping)
Left a couple of comments while reading the CL. Also, maybe you could have a ...
3 years, 8 months ago (2017-04-06 11:32:56 UTC) #21
chcunningham
https://codereview.chromium.org/2796193002/diff/40001/media/blink/buffered_data_source_host_impl.cc File media/blink/buffered_data_source_host_impl.cc (right): https://codereview.chromium.org/2796193002/diff/40001/media/blink/buffered_data_source_host_impl.cc#newcode60 media/blink/buffered_data_source_host_impl.cc:60: download_history_.back() = std::make_pair(now, bytes_so_far); why not always push_back? iiuc ...
3 years, 8 months ago (2017-04-06 16:55:41 UTC) #22
hubbe
PTAL I re-wrote some parts of how the download_history_ queue is handled and added more ...
3 years, 8 months ago (2017-04-06 21:25:38 UTC) #31
DaleCurtis
I think we should land a Media.TimeUntilPlayback UMA before this, which records the time from ...
3 years, 8 months ago (2017-04-06 22:51:40 UTC) #34
mlamouri (slow - plz ping)
https://codereview.chromium.org/2796193002/diff/40001/media/blink/buffered_data_source_host_impl.cc File media/blink/buffered_data_source_host_impl.cc (right): https://codereview.chromium.org/2796193002/diff/40001/media/blink/buffered_data_source_host_impl.cc#newcode119 media/blink/buffered_data_source_host_impl.cc:119: double download_rate = 1.0E20; On 2017/04/06 at 21:25:38, hubbe ...
3 years, 8 months ago (2017-04-07 11:23:45 UTC) #39
hubbe
still need to fix tests... https://codereview.chromium.org/2796193002/diff/100001/media/blink/buffered_data_source_host_impl.cc File media/blink/buffered_data_source_host_impl.cc (right): https://codereview.chromium.org/2796193002/diff/100001/media/blink/buffered_data_source_host_impl.cc#newcode11 media/blink/buffered_data_source_host_impl.cc:11: const double kDownloadHistoryWindowSeconds = ...
3 years, 8 months ago (2017-04-07 19:35:51 UTC) #40
chcunningham
I think this loogs good, but I'm about to go OOO for a week so ...
3 years, 8 months ago (2017-04-08 00:52:46 UTC) #41
mlamouri (slow - plz ping)
On 2017/04/08 at 00:52:46, chcunningham wrote: > I think this loogs good, but I'm about ...
3 years, 8 months ago (2017-04-10 12:38:47 UTC) #42
hubbe
ALL YOUR TEST ARE BELONG TO US PTAL
3 years, 8 months ago (2017-04-25 21:11:15 UTC) #59
DaleCurtis
Did you notice any changes in time to play for telemetry tests? I don't remember ...
3 years, 8 months ago (2017-04-25 21:45:28 UTC) #60
sandersd (OOO until July 31)
https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h File media/blink/buffered_data_source_host_impl.h (right): https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h#newcode82 media/blink/buffered_data_source_host_impl.h:82: std::deque<std::pair<base::TimeTicks, uint64_t>> download_history_; I'm a bit worried about the ...
3 years, 8 months ago (2017-04-25 22:00:57 UTC) #61
hubbe
(most) comments addressed. Going to do a telemetry run now. PTAL https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.cc File media/blink/buffered_data_source_host_impl.cc (right): ...
3 years, 8 months ago (2017-04-25 23:47:03 UTC) #66
DaleCurtis
https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h File media/blink/buffered_data_source_host_impl.h (right): https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h#newcode82 media/blink/buffered_data_source_host_impl.h:82: std::deque<std::pair<base::TimeTicks, uint64_t>> download_history_; On 2017/04/25 at 23:47:03, hubbe wrote: ...
3 years, 8 months ago (2017-04-26 00:11:26 UTC) #67
hubbe
https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h File media/blink/buffered_data_source_host_impl.h (right): https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h#newcode82 media/blink/buffered_data_source_host_impl.h:82: std::deque<std::pair<base::TimeTicks, uint64_t>> download_history_; On 2017/04/26 00:11:26, DaleCurtis wrote: > ...
3 years, 8 months ago (2017-04-26 00:24:27 UTC) #68
sandersd (OOO until July 31)
On 2017/04/26 00:24:27, hubbe wrote: > https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h > File media/blink/buffered_data_source_host_impl.h (right): > > https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h#newcode82 > ...
3 years, 8 months ago (2017-04-26 00:28:31 UTC) #71
hubbe
On 2017/04/26 00:28:31, sandersd wrote: > On 2017/04/26 00:24:27, hubbe wrote: > > > https://codereview.chromium.org/2796193002/diff/200001/media/blink/buffered_data_source_host_impl.h ...
3 years, 7 months ago (2017-04-28 20:12:03 UTC) #84
DaleCurtis
Per https://codereview.chromium.org/2796193002#msg34 we should land a UMA to help us understand how long this delays ...
3 years, 7 months ago (2017-05-01 19:05:52 UTC) #85
DaleCurtis
(otherwise CL lg2m, but this has the potential for a lot of fallout, so we ...
3 years, 7 months ago (2017-05-01 19:06:16 UTC) #86
hubbe
On 2017/05/01 19:06:16, DaleCurtis wrote: > (otherwise CL lg2m, but this has the potential for ...
3 years, 7 months ago (2017-05-01 21:19:48 UTC) #89
DaleCurtis
On 2017/05/01 at 21:19:48, hubbe wrote: > On 2017/05/01 19:06:16, DaleCurtis wrote: > > (otherwise ...
3 years, 7 months ago (2017-05-01 21:22:13 UTC) #90
chromium-reviews
On Mon, May 1, 2017 at 2:22 PM, <dalecurtis@chromium.org> wrote: > On 2017/05/01 at 21:19:48, ...
3 years, 7 months ago (2017-05-01 21:24:51 UTC) #91
hubbe
https://codereview.chromium.org/2796193002/diff/280001/media/blink/buffered_data_source_host_impl.cc File media/blink/buffered_data_source_host_impl.cc (right): https://codereview.chromium.org/2796193002/diff/280001/media/blink/buffered_data_source_host_impl.cc#newcode73 media/blink/buffered_data_source_host_impl.cc:73: // If the difference between the last entry and ...
3 years, 7 months ago (2017-05-01 21:26:11 UTC) #92
DaleCurtis
On 2017/05/01 at 21:24:51, chromium-reviews wrote: > On Mon, May 1, 2017 at 2:22 PM, ...
3 years, 7 months ago (2017-05-01 21:29:30 UTC) #93
hubbe
On 2017/05/01 21:29:30, DaleCurtis wrote: > On 2017/05/01 at 21:24:51, chromium-reviews wrote: > > On ...
3 years, 7 months ago (2017-05-01 21:31:01 UTC) #94
DaleCurtis
On 2017/05/01 at 21:31:01, hubbe wrote: > > They would if autoplay fails because of ...
3 years, 7 months ago (2017-05-01 21:42:08 UTC) #95
hubbe
On 2017/05/01 21:42:08, DaleCurtis wrote: > On 2017/05/01 at 21:31:01, hubbe wrote: > > > ...
3 years, 7 months ago (2017-05-01 21:48:37 UTC) #96
hubbe
On 2017/05/01 21:48:37, hubbe wrote: > On 2017/05/01 21:42:08, DaleCurtis wrote: > > On 2017/05/01 ...
3 years, 7 months ago (2017-05-04 22:36:23 UTC) #99
DaleCurtis
lgtm then, thanks! https://codereview.chromium.org/2796193002/diff/320001/media/base/media_switches.h File media/base/media_switches.h (right): https://codereview.chromium.org/2796193002/diff/320001/media/base/media_switches.h#newcode100 media/base/media_switches.h:100: MEDIA_EXPORT extern const base::Feature kCanPlayThrough; kSpecCompliantCanPlayThrough?
3 years, 7 months ago (2017-05-04 22:56:51 UTC) #100
hubbe
https://codereview.chromium.org/2796193002/diff/320001/media/base/media_switches.h File media/base/media_switches.h (right): https://codereview.chromium.org/2796193002/diff/320001/media/base/media_switches.h#newcode100 media/base/media_switches.h:100: MEDIA_EXPORT extern const base::Feature kCanPlayThrough; On 2017/05/04 22:56:51, DaleCurtis_OOO_May_5_To_May23 ...
3 years, 7 months ago (2017-05-05 20:30:34 UTC) #103
hubbe
https://codereview.chromium.org/2796193002/diff/320001/media/base/media_switches.h File media/base/media_switches.h (right): https://codereview.chromium.org/2796193002/diff/320001/media/base/media_switches.h#newcode100 media/base/media_switches.h:100: MEDIA_EXPORT extern const base::Feature kCanPlayThrough; On 2017/05/04 22:56:51, DaleCurtis_OOO_May_5_To_May23 ...
3 years, 7 months ago (2017-05-05 20:30:34 UTC) #104
chcunningham
Still lgtm for me.
3 years, 7 months ago (2017-05-05 22:23:28 UTC) #105
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2796193002/340001
3 years, 7 months ago (2017-05-05 23:18:47 UTC) #110
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 23:28:23 UTC) #114
Message was sent while issue was closed.
Committed patchset #18 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/b2d3efd2ec18ffd52c3dacfece98...

Powered by Google App Engine
This is Rietveld 408576698