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

Issue 248012: Change how <video> fetch a resource to make it friendly to sparse caching (Closed)

Created:
11 years, 2 months ago by Alpha Left Google
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Change how <video> fetch a resource to make it friendly to sparse caching BUG=16013 TEST=test_shell_tests --gtest_filter=Buffered* Also video on a server that doesn't support range request will still work. How <video> used to fetch a resource: 1. Fetch the whole file to get the header 2. Fetch a small range (1, 1) to determine if server supports range request 3. If [2] was successful, then fetch the file with range request if necessary If [2] failed, prevent range request by telling ffmpeg this is streaming New way of fetching a resource for <video>: 1. Fetch (0, 1023) to get the header (This needs more experiment). 2. If [1] was successful, then request later on will be made partial If [1] failed, prevent range request by telling ffmpeg this is streaming By doing this change we can eliminate one request before we can start the file. And with the help of sparse cache, we would be able to reuse the first 1KB fetched even we need to fetch the index at the end of file. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27587

Patch Set 1 #

Total comments: 16

Patch Set 2 : style #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -178 lines) Patch
M webkit/glue/media/buffered_data_source.h View 1 6 chunks +12 lines, -15 lines 4 comments Download
M webkit/glue/media/buffered_data_source.cc View 1 11 chunks +35 lines, -67 lines 1 comment Download
M webkit/glue/media/buffered_data_source_unittest.cc View 1 17 chunks +94 lines, -96 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
Alpha Left Google
11 years, 2 months ago (2009-09-26 01:06:42 UTC) #1
scherkus (not reviewing)
http://codereview.chromium.org/248012/diff/1/2 File webkit/glue/media/buffered_data_source.cc (right): http://codereview.chromium.org/248012/diff/1/2#newcode233 Line 233: if (url_.SchemeIs(kHttpScheme) || url_.SchemeIs(kHttpsScheme)) { hrmm this method ...
11 years, 2 months ago (2009-09-29 06:36:48 UTC) #2
Alpha Left Google
http://codereview.chromium.org/248012/diff/1/2 File webkit/glue/media/buffered_data_source.cc (right): http://codereview.chromium.org/248012/diff/1/2#newcode233 Line 233: if (url_.SchemeIs(kHttpScheme) || url_.SchemeIs(kHttpsScheme)) { On 2009/09/29 06:36:48, ...
11 years, 2 months ago (2009-09-29 22:59:32 UTC) #3
scherkus (not reviewing)
11 years, 2 months ago (2009-09-29 23:10:34 UTC) #4
LGTM some tiny nits

http://codereview.chromium.org/248012/diff/4001/5001
File webkit/glue/media/buffered_data_source.cc (right):

http://codereview.chromium.org/248012/diff/4001/5001#newcode573
Line 573: loader_ = CreateLoader(0, 1024);
ok.. might have to request this be made a constant :)

kHeaderBytes or kInitialBytes or something

http://codereview.chromium.org/248012/diff/4001/5002
File webkit/glue/media/buffered_data_source.h (right):

http://codereview.chromium.org/248012/diff/4001/5002#newcode142
Line 142: // True if resource loading is deffered.
deffered -> deferred

http://codereview.chromium.org/248012/diff/4001/5002#newcode145
Line 145: // True if resource loading is completed.
is -> has

http://codereview.chromium.org/248012/diff/4001/5002#newcode148
Line 148: // True if a range request is made.
is -> was

http://codereview.chromium.org/248012/diff/4001/5002#newcode151
Line 151: // True if response data received is a partial range.
is -> was

http://codereview.chromium.org/248012/diff/4001/5003
File webkit/glue/media/buffered_data_source_unittest.cc (right):

http://codereview.chromium.org/248012/diff/4001/5003#newcode470
Line 470: EXPECT_CALL(*data_source_, CreateLoader(0, 1024))
you can also use the constant here etc...

Powered by Google App Engine
This is Rietveld 408576698