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

Unified Diff: media/base/seekable_buffer.h

Issue 9395057: Fix muted audio when playback rate != 1.0 or 0.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_util.cc ('k') | media/base/seekable_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/seekable_buffer.h
diff --git a/media/base/seekable_buffer.h b/media/base/seekable_buffer.h
index 56a7cebd6c9b021d7763121898ac7e5f48baf558..eb7ba84d745fbe9842f25418d88a59bbbea38c7a 100644
--- a/media/base/seekable_buffer.h
+++ b/media/base/seekable_buffer.h
@@ -60,8 +60,10 @@ class MEDIA_EXPORT SeekableBuffer {
size_t Read(uint8* data, size_t size);
// Copies up to |size| bytes from current position to |data|. Returns
- // number of bytes copied. Doesn't advance current position.
- size_t Peek(uint8* data, size_t size);
+ // number of bytes copied. Doesn't advance current position. Optionally
+ // starts at a |forward_offset| from current position.
+ size_t Peek(uint8* data, size_t size) { return Peek(data, size, 0); }
+ size_t Peek(uint8* data, size_t size, size_t forward_offset);
// Returns pointer to the current chunk of data that is being consumed.
// If there is no data left in the buffer false is returned, otherwise
@@ -137,7 +139,8 @@ class MEDIA_EXPORT SeekableBuffer {
// of bytes read. The current read position will be moved forward by the
// number of bytes read. If |data| is NULL, only the current read position
// will advance but no data will be copied.
- size_t InternalRead(uint8* data, size_t size, bool advance_position);
+ size_t InternalRead(
+ uint8* data, size_t size, bool advance_position, size_t forward_offset);
// A helper method that moves the current read position forward by |size|
// bytes.
« no previous file with comments | « media/audio/audio_util.cc ('k') | media/base/seekable_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698