diff options
author | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 20:37:00 +0000 |
---|---|---|
committer | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 20:37:00 +0000 |
commit | 8d9285c8bb6fe0eaed34ff2674e95a5ed6f8a706 (patch) | |
tree | 9762844a529c5a49197590e3317f0a63e674633f /media/base/seekable_buffer.h | |
parent | a8dd6821b85865a7af7b5488c289d38c665f3833 (diff) | |
download | chromium_src-8d9285c8bb6fe0eaed34ff2674e95a5ed6f8a706.zip chromium_src-8d9285c8bb6fe0eaed34ff2674e95a5ed6f8a706.tar.gz chromium_src-8d9285c8bb6fe0eaed34ff2674e95a5ed6f8a706.tar.bz2 |
Scale BufferedResourceLoader buffering window based on bit rate of video
This CL adds logic in the FFmpegDemuxer to compute a suggested buffering window
size based on the bit rate and playback rate of the video, then propogates the
suggested size to BufferedResourceLoader upon initialization or changes in
playback rate. BufferedResourceLoader resizes the buffer as necessary.
BUG=60215
TEST=test_shell_tests,media_unittests
Review URL: http://codereview.chromium.org/7718017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/seekable_buffer.h')
-rw-r--r-- | media/base/seekable_buffer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/base/seekable_buffer.h b/media/base/seekable_buffer.h index b32abfe..18dee8d 100644 --- a/media/base/seekable_buffer.h +++ b/media/base/seekable_buffer.h @@ -103,6 +103,11 @@ class MEDIA_EXPORT SeekableBuffer { forward_capacity_ = new_forward_capacity; } + // Sets the backward_capacity to |new_backward_capacity| bytes. + void set_backward_capacity(size_t new_backward_capacity) { + backward_capacity_ = new_backward_capacity; + } + // Returns the maximum number of bytes that should be kept in the forward // direction. size_t forward_capacity() const { return forward_capacity_; } |