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

Issue 160300: Missing buffered attribute for <video>/<audio> (Closed)

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

Description

Missing buffered attribute for <video>/<audio> BUG=16056 TEST=LayoutTests/media/video-buffered.html The current implementation of the buffered attribute for <video> and <audio> is broken. There are several problems around this attribute: 1. We don't have any caching on disk, so we only keep a recent range of bytes close to current playback position. 2. WebKit reports buffered as one range (0, max_time_buffered). But we only cache a short partial range which doesn't start with 0. The correct implementation is a list of ranges buffered. But this has to go into WebKit first. 3. We don't have an accurate mapping between byte offset < - > timestamp. So the current implementation is to lie about what we have buffered. We always say we have buffered everything before the current download position. And we only report one range. The calculation of time is also based on scaling the duration with current buffered bytes. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=22087

Patch Set 1 #

Patch Set 2 : fix again #

Patch Set 3 : again #

Patch Set 4 : again #

Total comments: 2

Patch Set 5 : done #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -2 lines) Patch
M media/base/mock_filters.h View 1 chunk +12 lines, -0 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 3 4 1 chunk +16 lines, -1 line 0 comments Download
M media/base/pipeline_impl_unittest.cc View 3 chunks +36 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Alpha Left Google
11 years, 4 months ago (2009-07-28 23:36:47 UTC) #1
scherkus (not reviewing)
unit test! you can follow a similar pattern as the SetDuration helper (sync to tip ...
11 years, 4 months ago (2009-07-29 18:04:46 UTC) #2
Alpha Left Google
http://codereview.chromium.org/160300/diff/1002/1003 File media/base/pipeline_impl.cc (right): http://codereview.chromium.org/160300/diff/1002/1003#newcode224 Line 224: return base::TimeDelta::FromMilliseconds(duration_.InMilliseconds() * On 2009/07/29 18:04:46, scherkus wrote: ...
11 years, 4 months ago (2009-07-30 01:45:07 UTC) #3
scherkus (not reviewing)
11 years, 4 months ago (2009-07-30 01:50:52 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld 408576698