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

Issue 6625059: Implementing preload=metadata for video (Closed)

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

Description

Implementing preload=metadata for video This patch implements the logic necessary to respect the preload attribute when it is set to MetaData. This also refactors the BufferedResourceLoader to determine its buffering techniques based on a DeferStrategy value. BUG=16482, 76555 TEST=media/video-preload.html, test_shell_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80465

Patch Set 1 #

Patch Set 2 : Adjust to pipeline changes #

Patch Set 3 : Added comments; made modifications for preload=none #

Patch Set 4 : Cleanup defer strategy, fix logic bug #

Total comments: 37

Patch Set 5 : Strategy is enum, not object #

Total comments: 26

Patch Set 6 : Fixes based on code review #

Total comments: 4

Patch Set 7 : Fixing enums #

Total comments: 10

Patch Set 8 : Fix nits and media unittest compiler errors #

Patch Set 9 : Fixed tests and added unit tests #

Total comments: 2

Patch Set 10 : fix indent #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -154 lines) Patch
M media/base/filters.h View 1 2 3 4 5 6 7 3 chunks +19 lines, -0 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M media/base/pipeline.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M media/base/pipeline_impl.h View 1 2 3 4 5 6 7 4 chunks +15 lines, -0 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 3 4 8 chunks +27 lines, -5 lines 0 comments Download
M media/filters/adaptive_demuxer.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/adaptive_demuxer.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M media/filters/file_data_source.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/filters/file_data_source.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/glue/media/buffered_data_source.h View 1 2 3 4 5 6 7 4 chunks +17 lines, -0 lines 0 comments Download
M webkit/glue/media/buffered_data_source.cc View 1 2 3 4 5 6 7 8 9 5 chunks +42 lines, -8 lines 0 comments Download
M webkit/glue/media/buffered_resource_loader.h View 1 2 3 4 5 6 7 4 chunks +27 lines, -10 lines 0 comments Download
M webkit/glue/media/buffered_resource_loader.cc View 1 2 3 4 5 6 7 5 chunks +84 lines, -35 lines 0 comments Download
M webkit/glue/media/buffered_resource_loader_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +43 lines, -93 lines 0 comments Download
M webkit/glue/media/simple_data_source.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/media/simple_data_source.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/glue/webmediaplayer_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
vrk (LEFT CHROMIUM)
So this still needs finishing up in terms of polish and robustness, but I wanted ...
9 years, 9 months ago (2011-03-07 19:10:41 UTC) #1
vrk (LEFT CHROMIUM)
Will need to merge with acolwell's DataSource refactor after it lands! (http://codereview.chromium.org/6480050/) Luckily it doesn't ...
9 years, 9 months ago (2011-03-07 21:45:20 UTC) #2
acolwell GONE FROM CHROMIUM
You'll probably want to wait until my changes (http://codereview.chromium.org/6480050/) and Ami's changes (http://codereview.chromium.org/6648004/) land. Pipeline ...
9 years, 9 months ago (2011-03-08 22:25:51 UTC) #3
vrk (LEFT CHROMIUM)
Cool, sounds good!
9 years, 9 months ago (2011-03-08 22:42:13 UTC) #4
vrk (LEFT CHROMIUM)
Updated this patch to be compatible with the changes made in Pipeline. Adding preload=metadata also ...
9 years, 9 months ago (2011-03-24 01:39:31 UTC) #5
vrk (LEFT CHROMIUM)
Hey all FYI, I updated this patch a little bit to clean up the code, ...
9 years, 9 months ago (2011-03-25 02:00:43 UTC) #6
acolwell GONE FROM CHROMIUM
Initial set of comments. I think the defer_strategy stuff should be reworked. All of the ...
9 years, 9 months ago (2011-03-25 04:35:28 UTC) #7
vrk (LEFT CHROMIUM)
> I think the defer_strategy stuff should be reworked. All of the friending and > ...
9 years, 9 months ago (2011-03-25 05:55:56 UTC) #8
vrk (LEFT CHROMIUM)
WHOOPS OK ignore me, I just thought of a way simpler and superior way to ...
9 years, 9 months ago (2011-03-25 15:02:25 UTC) #9
vrk (LEFT CHROMIUM)
Phew ok! Rewrote state objects -> enums. That was how I originally had written it, ...
9 years, 9 months ago (2011-03-25 21:33:32 UTC) #10
acolwell GONE FROM CHROMIUM
Looks good. Just a few more comments http://codereview.chromium.org/6625059/diff/18001/webkit/glue/media/buffered_data_source.cc File webkit/glue/media/buffered_data_source.cc (right): http://codereview.chromium.org/6625059/diff/18001/webkit/glue/media/buffered_data_source.cc#newcode166 webkit/glue/media/buffered_data_source.cc:166: BufferedDataSource::ChooseDeferStrategy() { ...
9 years, 9 months ago (2011-03-25 23:08:13 UTC) #11
vrk (LEFT CHROMIUM)
Fixed and replied to stuff! I also updated the latest patch to match my changes ...
9 years, 9 months ago (2011-03-29 00:53:00 UTC) #12
acolwell GONE FROM CHROMIUM
LGTM http://codereview.chromium.org/6625059/diff/18001/webkit/glue/media/buffered_resource_loader.cc File webkit/glue/media/buffered_resource_loader.cc (right): http://codereview.chromium.org/6625059/diff/18001/webkit/glue/media/buffered_resource_loader.cc#newcode345 webkit/glue/media/buffered_resource_loader.cc:345: if (buffer_->forward_bytes() > buffer_->forward_capacity()) { Ok. I think ...
9 years, 9 months ago (2011-03-29 05:52:03 UTC) #13
vrk (LEFT CHROMIUM)
Thanks for the review, acolwell! http://codereview.chromium.org/6625059/diff/25001/media/base/filters.h File media/base/filters.h (right): http://codereview.chromium.org/6625059/diff/25001/media/base/filters.h#newcode53 media/base/filters.h:53: PRELOAD_NONE, On 2011/03/29 05:52:03, ...
9 years, 8 months ago (2011-03-30 17:41:43 UTC) #14
acolwell GONE FROM CHROMIUM
LGTM On 2011/03/30 17:41:43, Victoria Kirst wrote: > Thanks for the review, acolwell! > > ...
9 years, 8 months ago (2011-03-30 19:48:22 UTC) #15
scherkus (not reviewing)
looks awesome!! minor style nits http://codereview.chromium.org/6625059/diff/34001/media/filters/file_data_source.cc File media/filters/file_data_source.cc (right): http://codereview.chromium.org/6625059/diff/34001/media/filters/file_data_source.cc#newcode119 media/filters/file_data_source.cc:119: void FileDataSource::SetPreload(Preload preload) { ...
9 years, 8 months ago (2011-03-31 23:40:21 UTC) #16
scherkus (not reviewing)
oh that means LGTM :)
9 years, 8 months ago (2011-03-31 23:40:28 UTC) #17
vrk (LEFT CHROMIUM)
Thanks everyone! The WebKit side of this landed (thanks scherkus!) and DEPS were rolled appropriately ...
9 years, 8 months ago (2011-04-01 22:52:12 UTC) #18
vrk (LEFT CHROMIUM)
Oops, I forgot about unit tests. But try bots reminded me! The old, existing tests ...
9 years, 8 months ago (2011-04-05 00:56:17 UTC) #19
scherkus (not reviewing)
LGTM w/ 1 µ-nit http://codereview.chromium.org/6625059/diff/44001/webkit/glue/media/buffered_data_source.cc File webkit/glue/media/buffered_data_source.cc (right): http://codereview.chromium.org/6625059/diff/44001/webkit/glue/media/buffered_data_source.cc#newcode386 webkit/glue/media/buffered_data_source.cc:386: BufferedDataSource::ChooseDeferStrategy() { nit: method name ...
9 years, 8 months ago (2011-04-05 06:22:45 UTC) #20
acolwell GONE FROM CHROMIUM
LGTM On 2011/04/05 00:56:17, Victoria Kirst wrote: > Oops, I forgot about unit tests. But ...
9 years, 8 months ago (2011-04-05 15:56:18 UTC) #21
vrk (LEFT CHROMIUM)
9 years, 8 months ago (2011-04-05 16:17:41 UTC) #22
Awesome! Thanks everyone, will land today!

http://codereview.chromium.org/6625059/diff/44001/webkit/glue/media/buffered_...
File webkit/glue/media/buffered_data_source.cc (right):

http://codereview.chromium.org/6625059/diff/44001/webkit/glue/media/buffered_...
webkit/glue/media/buffered_data_source.cc:386:
BufferedDataSource::ChooseDeferStrategy() {
On 2011/04/05 06:22:45, scherkus wrote:
> nit: method name should be completely un-indented

Done.

Powered by Google App Engine
This is Rietveld 408576698