diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 02:17:53 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 02:17:53 +0000 |
commit | 08a78639c036ebe4152a9e901a7bfdb41beda7d0 (patch) | |
tree | e588230a7f66fd9469fd85f7874d8cb84fd9aa5b /media/base/mock_data_source_host.h | |
parent | efcde1301756eb49e85640e488d350f7bdf46df2 (diff) | |
download | chromium_src-08a78639c036ebe4152a9e901a7bfdb41beda7d0.zip chromium_src-08a78639c036ebe4152a9e901a7bfdb41beda7d0.tar.gz chromium_src-08a78639c036ebe4152a9e901a7bfdb41beda7d0.tar.bz2 |
Track buffered byte ranges correctly in media::Pipeline.
Previously, the interaction was:
BufferedDataSource: hey Pipeline, I just read byte X
Pipeline: cool story bro! I'll just pretend you've read every single byte from 0 to X.
Now the interaction is:
BufferedDataSource: hey Pipeline, I just read bytes X-Y
Pipeline: neato! I'll just add that range to my list of buffered ranges.
The most noticeable outcome of this change is that seeking in a media format that requires reading a seek index from the end of the file (e.g. WebM w/ CUES at the end) no longer results in an almost-instant claim of having buffered the entire video just because a seek was completed (esp. dramatic when viewing a very large file, such as a multi-hour video).
BUG=103513,127355
TEST=besides unittests, this allows a cleaned-up version of http/tests/media/video-buffered.html to be un-SKIPped!
Review URL: https://chromiumcodereview.appspot.com/10451049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139452 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/mock_data_source_host.h')
-rw-r--r-- | media/base/mock_data_source_host.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/base/mock_data_source_host.h b/media/base/mock_data_source_host.h index 9af893d..a1a2365 100644 --- a/media/base/mock_data_source_host.h +++ b/media/base/mock_data_source_host.h @@ -19,7 +19,7 @@ class MockDataSourceHost : public DataSourceHost { // DataSourceHost implementation. MOCK_METHOD1(SetTotalBytes, void(int64 total_bytes)); - MOCK_METHOD1(SetBufferedBytes, void(int64 buffered_bytes)); + MOCK_METHOD2(AddBufferedByteRange, void(int64 start, int64 end)); MOCK_METHOD1(SetNetworkActivity, void(bool network_activity)); private: |