summaryrefslogtreecommitdiffstats
path: root/media/base/data_source.h
diff options
context:
space:
mode:
authorfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-30 02:17:53 +0000
committerfischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-30 02:17:53 +0000
commit08a78639c036ebe4152a9e901a7bfdb41beda7d0 (patch)
treee588230a7f66fd9469fd85f7874d8cb84fd9aa5b /media/base/data_source.h
parentefcde1301756eb49e85640e488d350f7bdf46df2 (diff)
downloadchromium_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/data_source.h')
-rw-r--r--media/base/data_source.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/media/base/data_source.h b/media/base/data_source.h
index a394a03..7ce965f 100644
--- a/media/base/data_source.h
+++ b/media/base/data_source.h
@@ -18,9 +18,8 @@ class MEDIA_EXPORT DataSourceHost {
// Set the total size of the media file.
virtual void SetTotalBytes(int64 total_bytes) = 0;
- // Sets the total number of bytes that are buffered on the client and ready to
- // be played.
- virtual void SetBufferedBytes(int64 buffered_bytes) = 0;
+ // Notify the host that byte range [start,end] has been buffered.
+ virtual void AddBufferedByteRange(int64 start, int64 end) = 0;
// Sets the flag to indicate current network activity.
virtual void SetNetworkActivity(bool is_downloading_data) = 0;